MCPcopy Create free account
hub / github.com/InoriRus/Kyty / VulkanCreate

Function VulkanCreate

source/emulator/src/Graphics/Window.cpp:2084–2112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2082}
2083
2084static void VulkanCreate(WindowContext* ctx)
2085{
2086 EXIT_IF(ctx->window == nullptr);
2087 EXIT_IF(ctx->graphic_ctx.instance != nullptr);
2088 EXIT_IF(ctx->graphic_ctx.physical_device != nullptr);
2089 EXIT_IF(ctx->graphic_ctx.device != nullptr);
2090 EXIT_IF(ctx->surface_capabilities != nullptr);
2091
2092 VulkanExtensions r;
2093 VulkanGetExtensions(ctx->window, &r);
2094
2095 VkApplicationInfo app_info {};
2096 app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
2097 app_info.pNext = nullptr;
2098 app_info.pApplicationName = "Kyty";
2099 app_info.applicationVersion = 1;
2100 app_info.pEngineName = "Kyty";
2101 app_info.engineVersion = 1;
2102 app_info.apiVersion = VK_API_VERSION_1_2; // NOLINT
2103
2104 VkValidationFeatureDisableEXT disabled_features[] = {};
2105 VkValidationFeatureEnableEXT enabled_features[] = {
2106#ifdef KYTY_ENABLE_BEST_PRACTICES
2107 VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT,
2108#endif
2109#ifdef KYTY_ENABLE_DEBUG_PRINTF
2110 VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT,
2111#endif
2112 };
2113
2114 uint32_t enabled_features_count = sizeof(enabled_features) / sizeof(VkValidationFeatureEnableEXT);
2115

Callers 1

WindowRunFunction · 0.85

Calls 1

VulkanGetExtensionsFunction · 0.85

Tested by

no test coverage detected