android port
This commit is contained in:
@@ -228,7 +228,7 @@ void CVkImage::SetDebugName( const char *szName )
|
||||
nameInfo.objectHandle = (uint64_t)m_image;
|
||||
nameInfo.pObjectName = szName;
|
||||
|
||||
vkSetDebugUtilsObjectNameEXT(s_vkDevice, &nameInfo);
|
||||
//vkSetDebugUtilsObjectNameEXT(s_vkDevice, &nameInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -807,7 +807,7 @@ void CVkRenderContext::Init()
|
||||
stInstanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
stInstanceCreateInfo.pApplicationInfo = &stApplicationInfo;
|
||||
enabledInstanceExtensions.AppendTail(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
|
||||
enabledInstanceExtensions.AppendTail(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
//enabledInstanceExtensions.AppendTail(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
stInstanceCreateInfo.enabledExtensionCount = enabledInstanceExtensions.GetSize();
|
||||
stInstanceCreateInfo.ppEnabledExtensionNames = enabledInstanceExtensions.GetData();
|
||||
|
||||
@@ -898,12 +898,14 @@ void CVkRenderContext::Init()
|
||||
vkGetDeviceQueue(s_vkDevice, g_iDrawFamily, 0, &s_vkDrawQueue);
|
||||
vkGetDeviceQueue(s_vkDevice, g_iPresentFamily, 0, &s_vkPresentQueue);
|
||||
volkLoadDevice(s_vkDevice);
|
||||
vkCmdBeginRendering = NULL;
|
||||
vkCmdEndRendering = NULL;
|
||||
|
||||
VmaAllocatorCreateInfo stAllocatorInfo = {};
|
||||
stAllocatorInfo.flags = VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT
|
||||
| VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT
|
||||
;
|
||||
stAllocatorInfo.vulkanApiVersion = VK_API_VERSION_1_4;
|
||||
stAllocatorInfo.flags = VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT;
|
||||
if (g_vkAvailableExtensions.bIsSupported_VK_KHR_MAINTENANCE_5)
|
||||
stAllocatorInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT;
|
||||
stAllocatorInfo.vulkanApiVersion = VK_API_VERSION_1_1;
|
||||
stAllocatorInfo.physicalDevice = s_vkPhysicalDevice;
|
||||
stAllocatorInfo.device = s_vkDevice;
|
||||
stAllocatorInfo.instance = s_vkInstance;
|
||||
@@ -946,7 +948,6 @@ void CVkRenderContext::Frame( float fDeltaTime )
|
||||
{
|
||||
uint32_t i;
|
||||
CUtlVector<VkSwapchainKHR> swapchains = {};
|
||||
CUtlVector<uint32_t> uImageIndexes = {};
|
||||
CUtlVector<uint32_t> uSwapchainImageIndexes = {};
|
||||
CUtlVector<VulkanWindow_t> recreatedWindows = {};
|
||||
|
||||
@@ -975,7 +976,6 @@ void CVkRenderContext::Frame( float fDeltaTime )
|
||||
for ( auto &s: m_renderWindows)
|
||||
{
|
||||
swapchains.AppendTail(s.m_swapchain);
|
||||
uImageIndexes.AppendTail(s.m_uCurrentFrame);
|
||||
}
|
||||
uSwapchainImageIndexes.Resize(m_renderWindows.GetSize());
|
||||
|
||||
@@ -1092,7 +1092,7 @@ void CVkRenderContext::Frame( float fDeltaTime )
|
||||
stPresentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
|
||||
stPresentInfo.swapchainCount = swapchains.GetSize();
|
||||
stPresentInfo.pSwapchains = swapchains.GetData();
|
||||
stPresentInfo.pImageIndices = uImageIndexes.GetData();
|
||||
stPresentInfo.pImageIndices = uSwapchainImageIndexes.GetData();
|
||||
|
||||
vkQueuePresentKHR(s_vkPresentQueue, &stPresentInfo);
|
||||
vkDeviceWaitIdle(s_vkDevice);
|
||||
|
||||
Reference in New Issue
Block a user