/*
Magma - Abstraction layer over Khronos Vulkan API.
Copyright (C) 2018-2024 Victor Coda.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "pch.h"
#pragma hdrstop
#include "streamInsertOperators.h"

#define MAGMA_OUTPUT_ENUMERATION(identifier) case identifier: out << MAGMA_STRINGIZE(identifier); return out;
#define MAGMA_OUTPUT_UNKNOWN default: out << "<unknown>"; return out;

std::ostream& operator<<(std::ostream& out, VkResult result)
{
    switch (result)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SUCCESS)
    MAGMA_OUTPUT_ENUMERATION(VK_NOT_READY)
    MAGMA_OUTPUT_ENUMERATION(VK_TIMEOUT)
    MAGMA_OUTPUT_ENUMERATION(VK_EVENT_SET)
    MAGMA_OUTPUT_ENUMERATION(VK_EVENT_RESET)
    MAGMA_OUTPUT_ENUMERATION(VK_INCOMPLETE)

    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_OUT_OF_HOST_MEMORY)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_OUT_OF_DEVICE_MEMORY)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INITIALIZATION_FAILED)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_DEVICE_LOST)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_MEMORY_MAP_FAILED)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_LAYER_NOT_PRESENT)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_EXTENSION_NOT_PRESENT)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_FEATURE_NOT_PRESENT)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INCOMPATIBLE_DRIVER)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_TOO_MANY_OBJECTS)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_FORMAT_NOT_SUPPORTED)
#if VK_HEADER_VERSION >= 29
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_FRAGMENTED_POOL)
#endif
#if VK_HEADER_VERSION >= 131
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_UNKNOWN)
#endif
#ifdef VK_VERSION_1_1
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_OUT_OF_POOL_MEMORY)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INVALID_EXTERNAL_HANDLE)
#endif
#if VK_HEADER_VERSION >= 131
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_FRAGMENTATION)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS)
#endif

    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_SURFACE_LOST_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_NATIVE_WINDOW_IN_USE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SUBOPTIMAL_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_OUT_OF_DATE_KHR)
#ifdef VK_KHR_display_swapchain
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INCOMPATIBLE_DISPLAY_KHR)
#endif
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_VALIDATION_FAILED_EXT)
#ifdef VK_NV_glsl_shader
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INVALID_SHADER_NV)
#endif
#if VK_HEADER_VERSION >= 89
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT)
#endif
#ifdef VK_EXT_global_priority
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_NOT_PERMITTED_EXT)
#endif
#ifdef VK_EXT_full_screen_exclusive
    MAGMA_OUTPUT_ENUMERATION(VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkStructureType structureType)
{
    switch (structureType)
    { // Only Vulkan 1.0.0 structure types
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_APPLICATION_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_SUBMIT_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_BIND_SPARSE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_FENCE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_EVENT_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_MEMORY_BARRIER)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_PRESENT_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR)
#if VK_HEADER_VERSION == 1
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT)
#else
    MAGMA_OUTPUT_ENUMERATION(VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkSystemAllocationScope allocationScope)
{
    switch (allocationScope)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)
    MAGMA_OUTPUT_ENUMERATION(VK_SYSTEM_ALLOCATION_SCOPE_OBJECT)
    MAGMA_OUTPUT_ENUMERATION(VK_SYSTEM_ALLOCATION_SCOPE_CACHE)
    MAGMA_OUTPUT_ENUMERATION(VK_SYSTEM_ALLOCATION_SCOPE_DEVICE)
    MAGMA_OUTPUT_ENUMERATION(VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkInternalAllocationType allocationType)
{
    switch (allocationType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkFormat format)
{
    switch (format)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_UNDEFINED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R4G4_UNORM_PACK8)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R4G4B4A4_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B4G4R4A4_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R5G6B5_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B5G6R5_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R5G5B5A1_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B5G5R5A1_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A1R5G5B5_UNORM_PACK16)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8_SRGB)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8_SRGB)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8_SRGB)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8_SRGB)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R8G8B8A8_SRGB)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8A8_SRGB)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_UNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_SNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_USCALED_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_SSCALED_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_UINT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_SINT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A8B8G8R8_SRGB_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2R10G10B10_UNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2R10G10B10_SNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2R10G10B10_USCALED_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2R10G10B10_SSCALED_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2R10G10B10_UINT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2R10G10B10_SINT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2B10G10R10_UNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2B10G10R10_SNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2B10G10R10_USCALED_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2B10G10R10_SSCALED_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2B10G10R10_UINT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_A2B10G10R10_SINT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_SNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_USCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_SSCALED)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R16G16B16A16_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32B32_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32B32_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32B32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32B32A32_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32B32A32_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R32G32B32A32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64B64_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64B64_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64B64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64B64A64_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64B64A64_SINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R64G64B64A64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B10G11R11_UFLOAT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_E5B9G9R9_UFLOAT_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_D16_UNORM)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_X8_D24_UNORM_PACK32)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_D32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_S8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_D16_UNORM_S8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_D24_UNORM_S8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_D32_SFLOAT_S8_UINT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC1_RGB_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC1_RGB_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC1_RGBA_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC1_RGBA_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC2_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC2_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC3_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC3_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC4_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC4_SNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC5_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC5_SNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC6H_UFLOAT_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC6H_SFLOAT_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC7_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_BC7_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_EAC_R11_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_EAC_R11_SNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_EAC_R11G11_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_EAC_R11G11_SNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_4x4_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_4x4_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_5x4_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_5x4_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_5x5_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_5x5_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_6x5_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_6x5_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_6x6_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_6x6_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_8x5_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_8x5_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_8x6_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_8x6_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_8x8_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_8x8_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x5_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x5_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x6_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x6_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x8_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x8_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x10_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_10x10_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_12x10_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_12x10_SRGB_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_12x12_UNORM_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_ASTC_12x12_SRGB_BLOCK)
#ifdef VK_IMG_format_pvrtc
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG)
#endif // VK_IMG_format_pvrtc
#ifdef VK_KHR_sampler_ycbcr_conversion
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G8B8G8R8_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B8G8R8G8_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R10X6_UNORM_PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R12X4_UNORM_PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G16B16G16R16_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_B16G16R16G16_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR)
#endif // VK_KHR_sampler_ycbcr_conversion
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageType imageType)
{
    switch (imageType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_TYPE_1D)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_TYPE_2D)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_TYPE_3D)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageTiling imageTiling)
{
    switch (imageTiling)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_TILING_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_TILING_LINEAR)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkPhysicalDeviceType deviceType)
{
    switch (deviceType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PHYSICAL_DEVICE_TYPE_OTHER)
    MAGMA_OUTPUT_ENUMERATION(VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
    MAGMA_OUTPUT_ENUMERATION(VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
    MAGMA_OUTPUT_ENUMERATION(VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU)
    MAGMA_OUTPUT_ENUMERATION(VK_PHYSICAL_DEVICE_TYPE_CPU)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkQueryType queryType)
{
    switch (queryType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_TYPE_OCCLUSION)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_TYPE_PIPELINE_STATISTICS)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_TYPE_TIMESTAMP)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkSharingMode sharingMode)
{
    switch (sharingMode)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SHARING_MODE_EXCLUSIVE)
    MAGMA_OUTPUT_ENUMERATION(VK_SHARING_MODE_CONCURRENT)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageLayout imageLayout)
{
    switch (imageLayout)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_UNDEFINED)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_GENERAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_PREINITIALIZED)
#ifdef VK_KHR_swapchain
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR)
#endif
#ifdef VK_KHR_shared_presentable_image
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR)
#endif
#ifdef VK_KHR_maintenance2
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageViewType imageViewType)
{
    switch (imageViewType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_1D)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_2D)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_3D)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_CUBE)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_1D_ARRAY)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_2D_ARRAY)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_VIEW_TYPE_CUBE_ARRAY)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkComponentSwizzle componentSwizzle)
{
    switch (componentSwizzle)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_IDENTITY)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_ZERO)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_ONE)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_R)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_G)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_B)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPONENT_SWIZZLE_A)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkVertexInputRate vertexInputRate)
{
    switch (vertexInputRate)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_VERTEX_INPUT_RATE_VERTEX)
    MAGMA_OUTPUT_ENUMERATION(VK_VERTEX_INPUT_RATE_INSTANCE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkPrimitiveTopology primitiveTopology)
{
    switch (primitiveTopology)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_POINT_LIST)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_LINE_LIST)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_LINE_STRIP)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY)
    MAGMA_OUTPUT_ENUMERATION(VK_PRIMITIVE_TOPOLOGY_PATCH_LIST)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkPolygonMode polygonMode)
{
    switch (polygonMode)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_POLYGON_MODE_FILL)
    MAGMA_OUTPUT_ENUMERATION(VK_POLYGON_MODE_LINE)
    MAGMA_OUTPUT_ENUMERATION(VK_POLYGON_MODE_POINT)
#ifdef VK_NV_fill_rectangle
    MAGMA_OUTPUT_ENUMERATION(VK_POLYGON_MODE_FILL_RECTANGLE_NV)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkFrontFace frontFace)
{
    switch (frontFace)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_FRONT_FACE_COUNTER_CLOCKWISE)
    MAGMA_OUTPUT_ENUMERATION(VK_FRONT_FACE_CLOCKWISE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkCompareOp compareOp)
{
    switch (compareOp)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_NEVER)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_LESS)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_EQUAL)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_LESS_OR_EQUAL)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_GREATER)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_NOT_EQUAL)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_GREATER_OR_EQUAL)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPARE_OP_ALWAYS)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkStencilOp stencilOp)
{
    switch (stencilOp)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_KEEP)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_ZERO)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_REPLACE)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_INCREMENT_AND_CLAMP)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_DECREMENT_AND_CLAMP)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_INVERT)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_INCREMENT_AND_WRAP)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_OP_DECREMENT_AND_WRAP)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkLogicOp logicOp)
{
    switch (logicOp)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_CLEAR)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_AND)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_AND_REVERSE)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_COPY)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_AND_INVERTED)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_NO_OP)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_XOR)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_OR)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_NOR)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_EQUIVALENT)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_INVERT)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_OR_REVERSE)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_COPY_INVERTED)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_OR_INVERTED)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_NAND)
    MAGMA_OUTPUT_ENUMERATION(VK_LOGIC_OP_SET)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkBlendFactor blendFactor)
{
    switch (blendFactor)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ZERO)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_SRC_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_DST_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_SRC_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_DST_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_CONSTANT_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_CONSTANT_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_SRC_ALPHA_SATURATE)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_SRC1_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_SRC1_ALPHA)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkBlendOp blendOp)
{
    switch (blendOp)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_ADD)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SUBTRACT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_REVERSE_SUBTRACT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_MIN)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_MAX)
#ifdef VK_EXT_blend_operation_advanced
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_ZERO_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SRC_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DST_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SRC_OVER_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DST_OVER_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SRC_IN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DST_IN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SRC_OUT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DST_OUT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SRC_ATOP_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DST_ATOP_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_XOR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_MULTIPLY_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SCREEN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_OVERLAY_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DARKEN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_LIGHTEN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_COLORDODGE_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_COLORBURN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_HARDLIGHT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_SOFTLIGHT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_DIFFERENCE_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_EXCLUSION_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_INVERT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_INVERT_RGB_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_LINEARDODGE_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_LINEARBURN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_VIVIDLIGHT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_LINEARLIGHT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_PINLIGHT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_HARDMIX_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_HSL_HUE_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_HSL_SATURATION_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_HSL_COLOR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_HSL_LUMINOSITY_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_PLUS_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_PLUS_CLAMPED_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_PLUS_DARKER_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_MINUS_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_MINUS_CLAMPED_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_CONTRAST_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_INVERT_OVG_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_RED_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_GREEN_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BLEND_OP_BLUE_EXT)
#endif // VK_EXT_blend_operation_advanced
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkDynamicState dynamicState)
{
    switch (dynamicState)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_VIEWPORT)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_SCISSOR)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_LINE_WIDTH)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_DEPTH_BIAS)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_BLEND_CONSTANTS)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_DEPTH_BOUNDS)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_STENCIL_WRITE_MASK)
    MAGMA_OUTPUT_ENUMERATION(VK_DYNAMIC_STATE_STENCIL_REFERENCE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkFilter filter)
{
    switch (filter)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_FILTER_NEAREST)
    MAGMA_OUTPUT_ENUMERATION(VK_FILTER_LINEAR)
#ifdef VK_EXT_filter_cubic
    MAGMA_OUTPUT_ENUMERATION(VK_FILTER_CUBIC_EXT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkSamplerMipmapMode mipmapMode)
{
    switch (mipmapMode)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_MIPMAP_MODE_NEAREST)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_MIPMAP_MODE_LINEAR)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkSamplerAddressMode addressMode)
{
    switch (addressMode)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_ADDRESS_MODE_REPEAT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkBorderColor borderColor)
{
    switch (borderColor)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK)
    MAGMA_OUTPUT_ENUMERATION(VK_BORDER_COLOR_INT_TRANSPARENT_BLACK)
    MAGMA_OUTPUT_ENUMERATION(VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK)
    MAGMA_OUTPUT_ENUMERATION(VK_BORDER_COLOR_INT_OPAQUE_BLACK)
    MAGMA_OUTPUT_ENUMERATION(VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE)
    MAGMA_OUTPUT_ENUMERATION(VK_BORDER_COLOR_INT_OPAQUE_WHITE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkDescriptorType descriptorType)
{
    switch (descriptorType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_STORAGE_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkAttachmentLoadOp loadOp)
{
    switch (loadOp)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_ATTACHMENT_LOAD_OP_LOAD)
    MAGMA_OUTPUT_ENUMERATION(VK_ATTACHMENT_LOAD_OP_CLEAR)
    MAGMA_OUTPUT_ENUMERATION(VK_ATTACHMENT_LOAD_OP_DONT_CARE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkAttachmentStoreOp storeOp)
{
    switch (storeOp)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_ATTACHMENT_STORE_OP_STORE)
    MAGMA_OUTPUT_ENUMERATION(VK_ATTACHMENT_STORE_OP_DONT_CARE)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkPipelineBindPoint bindPoint)
{
    switch (bindPoint)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_BIND_POINT_GRAPHICS)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_BIND_POINT_COMPUTE)
#ifdef VK_KHR_acceleration_structure
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkCommandBufferLevel cmdBufferLevel)
{
    switch (cmdBufferLevel)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_BUFFER_LEVEL_PRIMARY)
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_BUFFER_LEVEL_SECONDARY)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkIndexType indexType)
{
    switch (indexType)
    {
#ifdef VK_KHR_index_type_uint8
    MAGMA_OUTPUT_ENUMERATION(VK_INDEX_TYPE_UINT8_KHR)
#endif
    MAGMA_OUTPUT_ENUMERATION(VK_INDEX_TYPE_UINT16)
    MAGMA_OUTPUT_ENUMERATION(VK_INDEX_TYPE_UINT32)
#ifdef VK_KHR_acceleration_structure
    MAGMA_OUTPUT_ENUMERATION(VK_INDEX_TYPE_NONE_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkSubpassContents subpassContents)
{
    switch (subpassContents)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SUBPASS_CONTENTS_INLINE)
    MAGMA_OUTPUT_ENUMERATION(VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkObjectType objectType)
{
    switch (objectType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_UNKNOWN)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_INSTANCE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_PHYSICAL_DEVICE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DEVICE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_QUEUE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_SEMAPHORE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_COMMAND_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_FENCE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DEVICE_MEMORY)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_EVENT)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_QUERY_POOL)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_BUFFER_VIEW)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_IMAGE_VIEW)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_SHADER_MODULE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_PIPELINE_CACHE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_PIPELINE_LAYOUT)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_RENDER_PASS)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_PIPELINE)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DESCRIPTOR_POOL)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DESCRIPTOR_SET)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_FRAMEBUFFER)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_COMMAND_POOL)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_SURFACE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_SWAPCHAIN_KHR)
#ifdef VK_KHR_display
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DISPLAY_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DISPLAY_MODE_KHR)
#endif
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR)
#ifdef VK_NVX_device_generated_commands
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_OBJECT_TABLE_NVX)
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX)
#endif
#ifdef VK_KHR_sampler_ycbcr_conversion
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR)
#endif
#ifdef VK_EXT_validation_cache
    MAGMA_OUTPUT_ENUMERATION(VK_OBJECT_TYPE_VALIDATION_CACHE_EXT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkFormatFeatureFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_BLIT_SRC_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_BLIT_DST_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT)
#ifdef VK_IMG_filter_cubic
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG)
#endif
#ifdef VK_EXT_sampler_filter_minmax
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT)
#endif
#ifdef VK_KHR_maintenance1
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR)
#endif
#ifdef VK_EXT_fragment_density_map
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT)
#endif
#ifdef VK_KHR_fragment_shading_rate
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR)
#endif
#ifdef VK_KHR_sampler_ycbcr_conversion
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_DISJOINT_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR)
#endif // VK_KHR_sampler_ycbcr_conversion
#ifdef VK_KHR_acceleration_structure
    MAGMA_OUTPUT_ENUMERATION(VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageUsageFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_TRANSFER_SRC_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_TRANSFER_DST_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_SAMPLED_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_STORAGE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT)
#ifdef VK_EXT_fragment_density_map
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT)
#endif
#ifdef VK_KHR_fragment_shading_rate
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR)
#endif
#ifdef VK_EXT_attachment_feedback_loop_layout
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT)
#endif
#ifdef VK_HUAWEI_invocation_mask
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI)
#endif
#ifdef VK_QCOM_image_processing
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_SPARSE_BINDING_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_SPARSE_ALIASED_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)
#ifdef VK_VERSION_1_2
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_ALIAS_BIT)
#endif
#ifdef VK_KHR_device_group
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR)
#endif
#ifdef VK_KHR_maintenance1
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR)
#endif
#ifdef VK_KHR_maintenance2
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR)
#endif
#ifdef VK_VERSION_1_2
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_PROTECTED_BIT)
#endif
#ifdef VK_KHR_sampler_ycbcr_conversion
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_DISJOINT_BIT_KHR)
#endif
#ifdef VK_EXT_sample_locations
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkSampleCountFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_1_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_2_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_4_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_8_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_16_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_32_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SAMPLE_COUNT_64_BIT)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkQueueFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_QUEUE_GRAPHICS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUEUE_COMPUTE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUEUE_TRANSFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUEUE_SPARSE_BINDING_BIT)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkMemoryPropertyFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT)
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkMemoryHeapFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_HEAP_DEVICE_LOCAL_BIT)
#ifdef VK_KHR_device_group_creation
    MAGMA_OUTPUT_ENUMERATION(VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

#ifdef VK_VERSION_1_1
std::ostream& operator<<(std::ostream& out, VkDeviceQueueCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT)
    MAGMA_OUTPUT_UNKNOWN
    };
}
#endif // VK_VERSION_1_1

std::ostream& operator<<(std::ostream& out, VkPipelineStageFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_VERTEX_INPUT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_VERTEX_SHADER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_TRANSFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_HOST_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT)
#ifdef VK_NVX_device_generated_commands
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX)
#endif
    MAGMA_OUTPUT_UNKNOWN
    };
}

std::ostream& operator<<(std::ostream& out, VkImageAspectFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_COLOR_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_DEPTH_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_STENCIL_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_METADATA_BIT)
#ifdef VK_KHR_sampler_ycbcr_conversion
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_PLANE_0_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_PLANE_1_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_IMAGE_ASPECT_PLANE_2_BIT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkSparseImageFormatFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkSparseMemoryBindFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SPARSE_MEMORY_BIND_METADATA_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkFenceCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_FENCE_CREATE_SIGNALED_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkQueryPipelineStatisticFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkQueryResultFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_RESULT_64_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_RESULT_WAIT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_RESULT_WITH_AVAILABILITY_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_RESULT_PARTIAL_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkBufferCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_CREATE_SPARSE_BINDING_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_CREATE_SPARSE_ALIASED_BIT)
#ifdef VK_VERSION_1_2
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_CREATE_PROTECTED_BIT)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkBufferUsageFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_TRANSFER_SRC_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_TRANSFER_DST_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_STORAGE_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_INDEX_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_VERTEX_BUFFER_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkPipelineCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_CREATE_DERIVATIVE_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

#ifdef VK_EXT_subgroup_size_control
std::ostream& operator<<(std::ostream& out, VkPipelineShaderStageCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_EXT_subgroup_size_control

std::ostream& operator<<(std::ostream& out, VkShaderStageFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_VERTEX_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_GEOMETRY_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_FRAGMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_COMPUTE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_ALL_GRAPHICS)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_ALL)
#ifdef VK_KHR_ray_tracing_pipeline
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_RAYGEN_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_ANY_HIT_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_MISS_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_INTERSECTION_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_CALLABLE_BIT_KHR)
#endif // VK_KHR_ray_tracing_pipeline
#ifdef VK_NV_mesh_shader
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_TASK_BIT_NV)
    MAGMA_OUTPUT_ENUMERATION(VK_SHADER_STAGE_MESH_BIT_NV)
#endif // VK_NV_mesh_shader
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCullModeFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_CULL_MODE_NONE)
    MAGMA_OUTPUT_ENUMERATION(VK_CULL_MODE_FRONT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_CULL_MODE_BACK_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_CULL_MODE_FRONT_AND_BACK)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkColorComponentFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_COMPONENT_R_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_COMPONENT_G_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_COMPONENT_B_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_COMPONENT_A_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

#ifdef VK_KHR_push_descriptor
std::ostream& operator<<(std::ostream& out, VkDescriptorSetLayoutCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_push_descriptor

std::ostream& operator<<(std::ostream& out, VkDescriptorPoolCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkAttachmentDescriptionFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkAccessFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_INDIRECT_COMMAND_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_INDEX_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_UNIFORM_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_INPUT_ATTACHMENT_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_SHADER_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_SHADER_WRITE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_COLOR_ATTACHMENT_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_TRANSFER_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_TRANSFER_WRITE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_HOST_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_HOST_WRITE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_MEMORY_READ_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_MEMORY_WRITE_BIT)
#ifdef VK_NVX_device_generated_commands
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX)
#endif
#ifdef VK_EXT_blend_operation_advanced
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT)
#endif
#ifdef VK_KHR_acceleration_structure
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCommandPoolCreateFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_POOL_CREATE_TRANSIENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCommandPoolResetFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCommandBufferUsageFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkQueryControlFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_QUERY_CONTROL_PRECISE_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCommandBufferResetFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkStencilFaceFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_FACE_FRONT_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_FACE_BACK_BIT)
    MAGMA_OUTPUT_ENUMERATION(VK_STENCIL_FRONT_AND_BACK)
    MAGMA_OUTPUT_UNKNOWN
    }
}

#ifdef VK_KHR_performance_query
std::ostream& operator<<(std::ostream& out, VkPerformanceCounterUnitKHR counterUnit)
{
    switch (counterUnit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkPerformanceCounterScopeKHR counterScope)
{
    switch (counterScope)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkPerformanceCounterStorageKHR counterStorage)
{
    switch (counterStorage)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkPerformanceCounterDescriptionFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_performance_query

#ifdef VK_KHR_surface
std::ostream& operator<<(std::ostream& out, VkPresentModeKHR presentMode)
{
    switch (presentMode)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_PRESENT_MODE_IMMEDIATE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PRESENT_MODE_MAILBOX_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PRESENT_MODE_FIFO_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PRESENT_MODE_FIFO_RELAXED_KHR)
#ifdef VK_KHR_shared_presentable_image
    MAGMA_OUTPUT_ENUMERATION(VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkColorSpaceKHR colorSpace)
{
    switch (colorSpace)
    {
#if VK_HEADER_VERSION == 1
    MAGMA_OUTPUT_ENUMERATION(VK_COLORSPACE_SRGB_NONLINEAR_KHR)
#else
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_SRGB_NONLINEAR_KHR)
#endif
#ifdef VK_EXT_swapchain_colorspace
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_DCI_P3_LINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_BT709_LINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_BT709_NONLINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_BT2020_LINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_HDR10_ST2084_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_DOLBYVISION_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_HDR10_HLG_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_PASS_THROUGH_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT)
#endif // VK_EXT_swapchain_colorspace
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkSurfaceTransformFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCompositeAlphaFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_surface

#ifdef VK_KHR_swapchain
#if VK_KHR_SWAPCHAIN_SPEC_VERSION >= 70
std::ostream& operator<<(std::ostream& out, VkSwapchainCreateFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_SWAPCHAIN_SPEC_VERSION >= 70

#ifdef VK_KHR_device_group
std::ostream& operator<<(std::ostream& out, VkDeviceGroupPresentModeFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_device_group
#endif // VK_KHR_swapchain

#ifdef VK_EXT_fullscreen_exclusive
std::ostream& operator<<(std::ostream& out, VkFullScreenExclusiveEXT fullScreenExclusive)
{
    switch (fullScreenExclusive)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_EXT_fullscreen_exclusive

#ifdef VK_KHR_driver_properties
std::ostream& operator<<(std::ostream& out, VkDriverIdKHR driverId)
{
    switch (driverId)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_AMD_PROPRIETARY_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_MESA_RADV_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_ARM_PROPRIETARY_KHR)
#ifdef VK_VERSION_1_2
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_GGP_PROPRIETARY_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR)
#elif VK_HEADER_VERSION >= 93
    // https://android.googlesource.com/platform/frameworks/native/+/e561cf83bb0ee8e67602e9e1bde2081ff01fa1be%5E1..e561cf83bb0ee8e67602e9e1bde2081ff01fa1be/
    MAGMA_OUTPUT_ENUMERATION(VK_DRIVER_ID_GOOGLE_PASTEL_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_driver_properties

#ifdef VK_KHR_acceleration_structure
std::ostream& operator<<(std::ostream& out, VkRayTracingShaderGroupTypeKHR groupType)
{
    switch (groupType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkGeometryTypeKHR geometryType)
{
    switch (geometryType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_TYPE_TRIANGLES_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_TYPE_AABBS_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_TYPE_INSTANCES_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkAccelerationStructureTypeKHR structureType)
{
    switch (structureType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkCopyAccelerationStructureModeKHR copyMode)
{
    switch (copyMode)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkGeometryFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_OPAQUE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkGeometryInstanceFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, VkBuildAccelerationStructureFlagBitsKHR bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR)
#ifdef VK_NV_ray_tracing_motion_blur
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV)
#endif
#ifdef VK_EXT_opacity_micromap
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT)
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT)
#endif
#ifdef VK_NV_displacement_micromap
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV)
#endif
#ifdef VK_KHR_ray_tracing_position_fetch
    MAGMA_OUTPUT_ENUMERATION(VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR)
#endif
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_KHR_acceleration_structure

#ifdef VK_NV_ray_tracing
std::ostream& operator<<(std::ostream& out, VkAccelerationStructureMemoryRequirementsTypeNV memoryRequirementsType)
{
    switch (memoryRequirementsType)
    {
    MAGMA_OUTPUT_ENUMERATION(VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV)
    MAGMA_OUTPUT_ENUMERATION(VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV)
    MAGMA_OUTPUT_UNKNOWN
    }
}
#endif // VK_NV_ray_tracing

std::ostream& operator<<(std::ostream& out, SpvReflectResult result)
{
    switch (result)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_SUCCESS)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_NOT_READY)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_PARSE_FAILED)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_RANGE_EXCEEDED)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_NULL_POINTER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_INTERNAL_ERROR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_COUNT_MISMATCH)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_ELEMENT_NOT_FOUND)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_CODE_SIZE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_MAGIC_NUMBER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_UNEXPECTED_EOF)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_SET_NUMBER_OVERFLOW)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_STORAGE_CLASS)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_RECURSION)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_INSTRUCTION)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_UNEXPECTED_BLOCK_DATA)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_BLOCK_MEMBER_REFERENCE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ENTRY_POINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_EXECUTION_MODE)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectTypeFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_UNDEFINED)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_VOID)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_BOOL)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_INT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_FLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_VECTOR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_MATRIX)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_EXTERNAL_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_EXTERNAL_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_EXTERNAL_SAMPLED_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_EXTERNAL_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_EXTERNAL_MASK)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_STRUCT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_TYPE_FLAG_ARRAY)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectDecorationFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_NONE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_BUFFER_BLOCK)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_ROW_MAJOR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_COLUMN_MAJOR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_BUILT_IN)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_NOPERSPECTIVE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_FLAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DECORATION_NON_WRITABLE)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectResourceType resourceType)
{
    switch (resourceType)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESOURCE_FLAG_UNDEFINED)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESOURCE_FLAG_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESOURCE_FLAG_CBV)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESOURCE_FLAG_SRV)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_RESOURCE_FLAG_UAV)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectFormat format)
{
    switch (format)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_UNDEFINED)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32B32_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32B32_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32B32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32B32A32_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32B32A32_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R32G32B32A32_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64B64_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64B64_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64B64_SFLOAT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64B64A64_UINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64B64A64_SINT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_FORMAT_R64G64B64A64_SFLOAT)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectVariableFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_VARIABLE_FLAGS_NONE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_VARIABLE_FLAGS_UNUSED)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectDescriptorType descriptorType)
{
    switch (descriptorType)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_SAMPLED_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_IMAGE)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_UNIFORM_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_BUFFER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectShaderStageFlagBits bit)
{
    switch (bit)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_VERTEX_BIT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_TESSELLATION_CONTROL_BIT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_GEOMETRY_BIT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_FRAGMENT_BIT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_COMPUTE_BIT)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_TASK_BIT_NV)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_MESH_BIT_NV)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_RAYGEN_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_ANY_HIT_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_CLOSEST_HIT_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_MISS_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_INTERSECTION_BIT_KHR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_SHADER_STAGE_CALLABLE_BIT_KHR)
    MAGMA_OUTPUT_UNKNOWN
    }
}

std::ostream& operator<<(std::ostream& out, SpvReflectGenerator generator)
{
    switch (generator)
    {
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_KHRONOS_LLVM_SPIRV_TRANSLATOR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_KHRONOS_SPIRV_TOOLS_ASSEMBLER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_KHRONOS_GLSLANG_REFERENCE_FRONT_END)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_GOOGLE_SHADERC_OVER_GLSLANG)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_GOOGLE_SPIREGG)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_GOOGLE_RSPIRV)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_X_LEGEND_MESA_MESAIR_SPIRV_TRANSLATOR)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_KHRONOS_SPIRV_TOOLS_LINKER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_WINE_VKD3D_SHADER_COMPILER)
    MAGMA_OUTPUT_ENUMERATION(SPV_REFLECT_GENERATOR_CLAY_CLAY_SHADER_COMPILER)
    MAGMA_OUTPUT_UNKNOWN
    }
}
