Huge Vulkan refactor

This commit is contained in:
Jack Andersen
2018-05-21 21:48:13 -10:00
parent eaff1ba744
commit 721d10919b
7 changed files with 10064 additions and 820 deletions

View File

@@ -370,13 +370,11 @@ public:
if (m_getVkProc)
{
/* Check device support for vulkan */
vk::init_dispatch_table_top(PFN_vkGetInstanceProcAddr(m_getVkProc));
if (g_VulkanContext.m_instance == VK_NULL_HANDLE)
{
auto appName = getUniqueName();
if (g_VulkanContext.initVulkan(WCSTMBS(appName.data()).c_str()))
if (g_VulkanContext.initVulkan(WCSTMBS(appName.data()).c_str(), m_getVkProc))
{
vk::init_dispatch_table_middle(g_VulkanContext.m_instance, false);
if (g_VulkanContext.enumerateDevices())
{
/* Obtain DXGI Factory */

View File

@@ -591,8 +591,6 @@ public:
}
free(supportsPresent);
vk::init_dispatch_table_bottom(m_ctx->m_instance, m_ctx->m_dev);
if (!vk::GetPhysicalDeviceWin32PresentationSupportKHR(m_ctx->m_gpus[0], m_ctx->m_graphicsQueueFamilyIndex))
{
Log.report(logvisor::Fatal, "Win32 doesn't support vulkan present");