140 lines
5.2 KiB
C
140 lines
5.2 KiB
C
/**
|
|
* @file locale_vulkan.h
|
|
* @author Piotr Krygier (everyonecancode@gmail.com)
|
|
* @brief Error messages for Vulkan initializers
|
|
* @version 0.1
|
|
* @date 2022-05-13
|
|
*
|
|
* @copyright Copyright (c) 2022
|
|
*
|
|
*/
|
|
|
|
#ifndef RSE_LOCALE_VULKAN_H
|
|
#define RSE_LOCALE_VULKAN_H
|
|
|
|
#include "utilities/localization.h"
|
|
|
|
#define vulkan_messages vulkan_messages_nolocale[SELECTED_LANGUAGE]
|
|
|
|
enum vulkan_messages_t {
|
|
VULKAN_DEBUG_MESSENGER_SETUP_FAILED,
|
|
VULKAN_LAYER_NOT_SUPPORTED,
|
|
VULKAN_EXTENSION_NOT_SUPPORTED,
|
|
VULKAN_INTANCE_INIT_FAILED,
|
|
VULKAN_NO_PHYSICAL_DEVICES,
|
|
VULKAN_NO_SUITABLE_PHYSICAL_DEVICES,
|
|
VULKAN_BINDLESS_DESIGN_NOT_SUPPORTED,
|
|
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_ACQUIRE_SWAPCHAIN_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_DESCRIPTOR_POOL_CREATION_FAILED,
|
|
VULKAN_DESCRIPTOR_SETS_ALLOCATION_FAILED,
|
|
VULKAN_DESCRIPTORSETLAYOUT_CREATION_FAILED,
|
|
VULKAN_GRAPHICSPIPELINE_CREATION_FAILED,
|
|
VULKAN_FRAMEBUFFERS_CREATION_FAILED,
|
|
VULKAN_RECORD_COMMAND_BEGIN_FAILED,
|
|
VULKAN_RECORD_COMMAND_BUFFER_FAILED,
|
|
VULKAN_SYNCOBJCTS_CREATION_FAILED,
|
|
VULKAN_MESH_NO_FREE,
|
|
VULKAN_MESH_INSTANCE_NO_FREE,
|
|
VULAKN_DRAW_FAILED,
|
|
VULKAN_FORMAT_NOT_FOUND,
|
|
VULKAN_IMAGE_NOT_CREATED,
|
|
VULKAN_IMAGE_VIEW_NOT_CREATED,
|
|
VULKAN_MAX_TEXTURE_COUNT_REACHED,
|
|
VULKAN_LAST_MESSAGE
|
|
};
|
|
|
|
static const char vulkan_messages_nolocale[LAST_LANGUAGE][VULKAN_LAST_MESSAGE][MAX_MESSAGE_LENGHT] = {
|
|
{/* EN_US */
|
|
/* VULKAN_DEBUG_MESSENGER_SETUP_FAILED*/
|
|
"Failed to setup debug messenger\n",
|
|
/* VULKAN_LAYER_NOT_SUPPORTED */
|
|
"Selected layer is not supported: %s\n",
|
|
/* VULKAN_EXTENSION_NOT_SUPPORTED */
|
|
"Selected extension is not supported: %s\n",
|
|
/* VULKAN_INTANCE_INIT_FAILED */
|
|
"Vulkan instance initialization failed\n",
|
|
/* VULKAN_NO_PHYSICAL_DEVICES */
|
|
"No physical graphical physical devices found in system\n",
|
|
/* VULKAN_NO_SUITABLE_PHYSICAL_DEVICES */
|
|
"No suitable physical device found\n",
|
|
/* VULKAN_BINDLESS_DESIGN_NOT_SUPPORTED */
|
|
"Required features for bindless design not supported\n",
|
|
/* VULKAN_QUEUE_NOT_SUPPORTED */
|
|
"Selected physical device does not support required queue capabilities\n",
|
|
/* VULKAN_FAILED_TO_CREATE_DEVICE */
|
|
"Failed to create logical device\n",
|
|
/* VULKAN_ALLOCATOR_CREATION_FAILED */
|
|
"Failed to create Vulkan Memory Allocator\n",
|
|
/* VULKAN_COMMAND_POOL_CREATION_FAILED */
|
|
"Failed to create command pool\n",
|
|
/* VULKAN_BUFFER_CREATION_FAILED */
|
|
"Failed to create a vertex buffer\n",
|
|
/* VULKAN_VERTEX_BUFFER_MAPPING_FAILED */
|
|
"Failed to map vulkan memory buffer\n",
|
|
/* VULKAN_COMMAND_BUFFER_ALLOCATION_FAILED */
|
|
"Failed to allocate command buffers\n",
|
|
/* VULKAN_SURFACE_CREATION_FAILED */
|
|
"Failed to create window surface\n",
|
|
/* VULKAN_SWAPCHAIN_CREATION_FAILED */
|
|
"Failed to create swapchain\n",
|
|
/* VULKAN_ACQUIRE_SWAPCHAIN_FAILED */
|
|
"Failed to acquire swapchain image\n",
|
|
/* VULKAN_SWAPCHAIN_IMVIEW_CREATION_FAILED */
|
|
"Failed to create swapchain image view\n",
|
|
/* VULKAN_SHADER_UNABLE_TO_OPEN */
|
|
"Failed to open a file containing shader code\n",
|
|
/* VULKAN_SHADER_UNABLE_TO_CREATE_SHADER */
|
|
"Failed to create a shader\n",
|
|
/* VULKAN_PIPELAYOUT_CREATION_FAILED */
|
|
"Failed to create pipeline layout\n",
|
|
/* VULKAN_RENDERPASS_CREATION_FAILED */
|
|
"Failed to create render pass\n",
|
|
/* VULKAN_DESCRIPTOR_POOL_CREATION_FAILED */
|
|
"Failed to create descriptor pool\n",
|
|
/* VULKAN_DESCRIPTOR_SETS_ALLOCATION_FAILED */
|
|
"Failed to allocate descriptor sets\n",
|
|
/* VULKAN_DESCRIPTORSETLAYOUT_CREATION_FAILED */
|
|
"Failed to create descriptor set layout\n",
|
|
/* VULKAN_GRAPHICSPIPELINE_CREATION_FAILED */
|
|
"Failed to create graphics pipeline\n",
|
|
/* VULKAN_FRAMEBUFFERS_CREATION_FAILED */
|
|
"Failed to create framebuffer\n",
|
|
/* VULKAN_RECORD_COMMAND_BEGIN_FAILED */
|
|
"Failed to start recording command buffer\n",
|
|
/* VULKAN_RECORD_COMMAND_BUFFER_FAILED */
|
|
"Failed to record command buffer. Validate your commands.\n",
|
|
/* VULKAN_SYNCOBJCTS_CREATION_FAILED */
|
|
"Failed to create sync objects.\n",
|
|
/* VULKAN_MESH_NO_FREE */
|
|
"Could not allocate new mesh, reached maximum.\n",
|
|
/* VULKAN_MESH_INSTANCE_NO_FREE */
|
|
"Could not allocate new mesh instance\n",
|
|
/* VULAKN_DRAW_FAILED */
|
|
"Failed to submit draw command buffer!\n",
|
|
/* VULKAN_ERROR_FORMAT_NOT_FOUND */
|
|
"Failed to find correct format\n",
|
|
/* VULKAN_IMAGE_NOT_CREATED */
|
|
"Failed to create image\n",
|
|
/* VULKAN_IMAGE_VIEW_NOT_CREATED */
|
|
"Failed to create image view\n",
|
|
/* VULKAN_MAX_TEXTURE_COUNT_REACHED */
|
|
"Failed to find free texture image handle\n",
|
|
}
|
|
};
|
|
|
|
#endif /* RSE_LOCALE_VULKAN_H */
|