Continue working on pipeline
This commit is contained in:
1 parent
45be08019e
commit
bd05c03a12
28 files changed
+453
-423
No files matched your search
@@ -36,7 +36,6 @@
|
||||
#define APPLICATION_NAME "RedScarfEngine PoC"
|
||||
#define ENGINE_NAME "RedScarf Engine"
|
||||
|
||||
#ifndef NDEBUG
|
||||
/**
|
||||
* @brief Calback for debug messenger
|
||||
*
|
||||
@@ -145,8 +144,6 @@ static void DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMesse
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
/**
|
||||
* @brief Create the Vulkan Instance object
|
||||
*
|
||||
@@ -178,18 +175,15 @@ static rse_err_t create_instance(VkInstance* instance)
|
||||
#elif defined(_WIN32) || defined(WIN32)
|
||||
"VK_KHR_win32_surface",
|
||||
#endif /* _WIN32 || WIN32 */
|
||||
#ifndef NDEBUG
|
||||
"VK_EXT_debug_utils",
|
||||
#endif /* NDEBUG */
|
||||
};
|
||||
|
||||
#ifndef NDEBUG
|
||||
uint32_t enabled_instance_extensions_count = 4;
|
||||
uint32_t enabled_instance_layers_count = 1;
|
||||
const char* enabled_instance_layers_names[] = {
|
||||
"VK_LAYER_KHRONOS_validation",
|
||||
};
|
||||
#else
|
||||
#if 0
|
||||
uint32_t enabled_instance_extensions_count = 3;
|
||||
uint32_t enabled_instance_layers_count = 0;
|
||||
const char* enabled_instance_layers_names[] = {};
|
||||
@@ -261,11 +255,7 @@ static rse_err_t create_instance(VkInstance* instance)
|
||||
create_info.flags = 0U;
|
||||
create_info.pApplicationInfo = &application_info;
|
||||
create_info.enabledLayerCount = enabled_instance_layers_count;
|
||||
#ifndef NDEBUG
|
||||
create_info.ppEnabledLayerNames = enabled_instance_layers_names;
|
||||
#else
|
||||
create_info.ppEnabledLayerNames = NULL;
|
||||
#endif
|
||||
create_info.enabledExtensionCount = enabled_instance_extensions_count;
|
||||
create_info.ppEnabledExtensionNames = enabled_instance_extensions_names;
|
||||
|
||||
@@ -546,9 +536,7 @@ rse_err_t init_vulkan(struct graphics_context_t* context)
|
||||
rse_err_t status = RSE_ERROR_NO_ERROR;
|
||||
|
||||
STATUS_CHECK(create_instance(&context->instance));
|
||||
#ifndef NDEBUG
|
||||
STATUS_CHECK(setup_debug_messenger(context->instance, &context->debug_messenger));
|
||||
#endif
|
||||
STATUS_CHECK(create_surface(context->instance, context->window_handle, &context->surface));
|
||||
STATUS_CHECK(pick_physical_device(context->instance, &context->physical_device));
|
||||
STATUS_CHECK(create_device(context));
|
||||
@@ -599,7 +587,7 @@ rse_err_t draw_frame(struct graphics_context_t* context)
|
||||
return VULKAN_ERROR_ACQUIRE_SWAPCHAIN_FAILED;
|
||||
}
|
||||
|
||||
update_uniform_buffers(context);
|
||||
// update_uniform_buffers(context);
|
||||
|
||||
/* Only reset the fence if we are submitting work */
|
||||
vkResetFences(context->device, 1, &context->in_flight_fences[context->current_frame]);
|
||||
@@ -672,9 +660,7 @@ void deinit_vulkan(struct graphics_context_t* context)
|
||||
|
||||
vmaDestroyAllocator(context->allocator);
|
||||
vkDestroyDevice(context->device, NULL);
|
||||
#ifndef NDEBUG
|
||||
DestroyDebugUtilsMessengerEXT(context->instance, context->debug_messenger, NULL);
|
||||
#endif
|
||||
vkDestroySurfaceKHR(context->instance, context->surface, NULL);
|
||||
vkDestroyInstance(context->instance, NULL);
|
||||
}
|
||||
Reference in new issue
Block a user