104 lines
3.5 KiB
C++
104 lines
3.5 KiB
C++
/**
|
|
* @file localeVulkan.h
|
|
* @author Piotr Krygier (everyonecancode@gmail.com)
|
|
* @brief Error messages for Vulkan initializers
|
|
* @version 0.1
|
|
* @date 2022-05-13
|
|
*
|
|
* @copyright Copyright (c) 2022
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <vector>
|
|
|
|
#include "localization.hpp"
|
|
|
|
|
|
namespace rse::locale::vulkan
|
|
{
|
|
|
|
#define vulkanErrorMesssages vulkanErrorMesssages_nolocale[SELECTED_LANGUAGE]
|
|
|
|
enum Errors
|
|
{
|
|
VULKAN_LAYER_NOT_SUPPORTED,
|
|
VULKAN_EXTENSION_NOT_SUPPORTED,
|
|
VULKAN_INTANCE_INIT_FAILED,
|
|
VULKAN_NO_PHYSICAL_DEVICES,
|
|
VULKAN_NO_SUITABLE_PHYSICAL_DEVICES,
|
|
VULKAN_QUEUE_NOT_SUPPORTED,
|
|
VULKAN_FAILED_TO_CREATE_DEVICE,
|
|
VULKAN_ALLOCATOR_CREATION_FAILED,
|
|
VULKAN_COMMAND_POOL_CREATION_FAILED,
|
|
VULKAN_BUFFER_CREATION_FAILED,
|
|
VULKAN_VERTEX_BUFFER_MAPPING_FAILED,
|
|
VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED,
|
|
VULKAN_SURFACE_CREATION_FAILED,
|
|
VULKAN_SWAPCHAIN_CREATION_FAILED,
|
|
VULKAN_SWAPCHAIN_IMVIEW_CREATION_FAILED,
|
|
VULKAN_SHADER_UNABLE_TO_OPEN,
|
|
VULKAN_SHADER_UNABLE_TO_CREATE_SHADER,
|
|
VULKAN_PIPELAYOUT_CREATION_FAILED,
|
|
VULKAN_RENDERPASS_CREATION_FAILED,
|
|
VULKAN_GRAPHICSPIPELINE_CREATION_FAILED,
|
|
VULKAN_FRAMEBUFFERS_CREATION_FAILED,
|
|
VULKAN_RECORD_COMMAND_BUFFER_FAILED,
|
|
VULKAN_SYNCOBJCTS_CREATION_FAILED,
|
|
LAST_MESSAGE
|
|
};
|
|
|
|
std::array<std::array<const char*, LAST_MESSAGE>, LAST_LANGUAGE> vulkanErrorMesssages_nolocale = {
|
|
{/* EN_US */
|
|
/* VULKAN_LAYER_NOT_SUPPORTED */
|
|
"Selected layer is not supported: ",
|
|
/* VULKAN_EXTENSION_NOT_SUPPORTED */
|
|
"Selected extension is not supported: ",
|
|
/* VULKAN_INTANCE_INIT_FAILED */
|
|
"Vulkan instance initialization failed",
|
|
/* VULKAN_NO_PHYSICAL_DEVICES */
|
|
"No physical graphical physical devices found in system",
|
|
/* VULKAN_NO_SUITABLE_PHYSICAL_DEVICES */
|
|
"No suitable physical device found",
|
|
/* VULKAN_QUEUE_NOT_SUPPORTED */
|
|
"Selected physical device does not support required queue capabilities",
|
|
/* VULKAN_FAILED_TO_CREATE_DEVICE */
|
|
"Failed to create logical device",
|
|
/* VULKAN_ALLOCATOR_CREATION_FAILED */
|
|
"Failed to create Vulkan Memory Allocator",
|
|
/* VULKAN_COMMAND_POOL_CREATION_FAILED */
|
|
"Failed to create command pool",
|
|
/* VULKAN_BUFFER_CREATION_FAILED */
|
|
"Failed to create a vertex buffer",
|
|
/* VULKAN_VERTEX_BUFFER_MAPPING_FAILED */
|
|
"Failed to map vulkan memory buffer",
|
|
/* VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED */
|
|
"Failed to allocate command buffers",
|
|
/* VULKAN_SURFACE_CREATION_FAILED */
|
|
"Failed to create window surface",
|
|
/* VULKAN_SWAPCHAIN_CREATION_FAILED */
|
|
"Failed to create swapchain",
|
|
/* VULKAN_SWAPCHAIN_IMVIEW_CREATION_FAILED */
|
|
"Failed to create swapchain image view",
|
|
/* VULKAN_SHADER_UNABLE_TO_OPEN */
|
|
"Failed to open a file containing shader code",
|
|
/* VULKAN_SHADER_UNABLE_TO_CREATE_SHADER */
|
|
"Failed to create a shader",
|
|
/* VULKAN_PIPELAYOUT_CREATION_FAILED */
|
|
"Failed to create pipeline layout",
|
|
/* VULKAN_RENDERPASS_CREATION_FAILED */
|
|
"Failed to create render pass",
|
|
/* VULKAN_GRAPHICSPIPELINE_CREATION_FAILED */
|
|
"Failed to create graphics pipeline",
|
|
/* VULKAN_FRAMEBUFFERS_CREATION_FAILED */
|
|
"Failed to create framebuffer",
|
|
/* VULKAN_RECORD_COMMAND_BUFFER_FAILED */
|
|
"Failed to record command buffer. Validate your commands.",
|
|
/* VULKAN_SYNCOBJCTS_CREATION_FAILED */
|
|
"Failed to create sync objects"
|
|
}
|
|
};
|
|
|
|
} // namespace rse::locale::vulkan
|