Skip to content

Commit 46d2044

Browse files
SwapChainVkImpl: don't use auto where not needed
1 parent 1e1e8ff commit 46d2044

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ SwapChainVkImpl::SwapChainVkImpl(IReferenceCounters* pRefCounters,
5555
CreateSurface();
5656
CreateVulkanSwapChain();
5757
InitBuffersAndViews();
58-
auto res = AcquireNextImage(pDeviceContextVk);
58+
VkResult res = AcquireNextImage(pDeviceContextVk);
5959
DEV_CHECK_ERR(res == VK_SUCCESS, "Failed to acquire next image for the newly created swap chain");
6060
(void)res;
6161
}
@@ -138,12 +138,12 @@ void SwapChainVkImpl::CreateSurface()
138138

139139
CHECK_VK_ERROR_AND_THROW(err, "Failed to create OS-specific surface");
140140

141-
if (auto pContext = m_wpDeviceContext.Lock())
141+
if (RefCntAutoPtr<IDeviceContext> pContext = m_wpDeviceContext.Lock())
142142
{
143-
auto* pRenderDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
144-
const auto& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
145-
auto& CmdQueueVK = pRenderDeviceVk->GetCommandQueue(pContext.RawPtr<DeviceContextVkImpl>()->GetCommandQueueId());
146-
auto QueueFamilyIndex = HardwareQueueIndex{CmdQueueVK.GetQueueFamilyIndex()};
143+
RenderDeviceVkImpl* pRenderDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
144+
const VulkanUtilities::VulkanPhysicalDevice& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
145+
const ICommandQueueVk& CmdQueueVK = pRenderDeviceVk->GetCommandQueue(pContext.RawPtr<DeviceContextVkImpl>()->GetCommandQueueId());
146+
HardwareQueueIndex QueueFamilyIndex{CmdQueueVK.GetQueueFamilyIndex()};
147147
if (!PhysicalDevice.CheckPresentSupport(QueueFamilyIndex, m_VkSurface))
148148
{
149149
LOG_ERROR_AND_THROW("Selected physical device does not support present capability.\n"
@@ -159,13 +159,13 @@ void SwapChainVkImpl::CreateSurface()
159159

160160
void SwapChainVkImpl::CreateVulkanSwapChain()
161161
{
162-
auto* pRenderDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
163-
const auto& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
164-
auto vkDeviceHandle = PhysicalDevice.GetVkDeviceHandle();
162+
RenderDeviceVkImpl* pRenderDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
163+
const VulkanUtilities::VulkanPhysicalDevice& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
164+
VkPhysicalDevice vkDeviceHandle = PhysicalDevice.GetVkDeviceHandle();
165165
// Get the list of VkFormats that are supported:
166166
uint32_t formatCount = 0;
167167

168-
auto err = vkGetPhysicalDeviceSurfaceFormatsKHR(vkDeviceHandle, m_VkSurface, &formatCount, NULL);
168+
VkResult err = vkGetPhysicalDeviceSurfaceFormatsKHR(vkDeviceHandle, m_VkSurface, &formatCount, NULL);
169169
CHECK_VK_ERROR_AND_THROW(err, "Failed to query number of supported formats");
170170
VERIFY_EXPR(formatCount > 0);
171171
std::vector<VkSurfaceFormatKHR> SupportedFormats(formatCount);
@@ -186,7 +186,7 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
186186
else
187187
{
188188
bool FmtFound = false;
189-
for (const auto& SrfFmt : SupportedFormats)
189+
for (const VkSurfaceFormatKHR& SrfFmt : SupportedFormats)
190190
{
191191
if (SrfFmt.format == m_VkColorFormat)
192192
{
@@ -200,7 +200,7 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
200200
VkFormat VkReplacementColorFormat = VK_FORMAT_UNDEFINED;
201201
switch (m_VkColorFormat)
202202
{
203-
// clang-format off
203+
// clang-format off
204204
case VK_FORMAT_R8G8B8A8_UNORM: VkReplacementColorFormat = VK_FORMAT_B8G8R8A8_UNORM; break;
205205
case VK_FORMAT_B8G8R8A8_UNORM: VkReplacementColorFormat = VK_FORMAT_R8G8B8A8_UNORM; break;
206206
case VK_FORMAT_B8G8R8A8_SRGB: VkReplacementColorFormat = VK_FORMAT_R8G8B8A8_SRGB; break;
@@ -210,7 +210,7 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
210210
}
211211

212212
bool ReplacementFmtFound = false;
213-
for (const auto& SrfFmt : SupportedFormats)
213+
for (const VkSurfaceFormatKHR& SrfFmt : SupportedFormats)
214214
{
215215
if (SrfFmt.format == VkReplacementColorFormat)
216216
{
@@ -222,8 +222,8 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
222222

223223
if (ReplacementFmtFound)
224224
{
225-
m_VkColorFormat = VkReplacementColorFormat;
226-
auto NewColorBufferFormat = VkFormatToTexFormat(VkReplacementColorFormat);
225+
m_VkColorFormat = VkReplacementColorFormat;
226+
TEXTURE_FORMAT NewColorBufferFormat = VkFormatToTexFormat(VkReplacementColorFormat);
227227
LOG_INFO_MESSAGE("Requested color buffer format ", GetTextureFormatAttribs(m_SwapChainDesc.ColorBufferFormat).Name, " is not supported by the surface and will be replaced with ", GetTextureFormatAttribs(NewColorBufferFormat).Name);
228228
m_SwapChainDesc.ColorBufferFormat = NewColorBufferFormat;
229229
}
@@ -343,7 +343,7 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
343343
PreferredPresentModes.push_back(VK_PRESENT_MODE_FIFO_KHR);
344344
}
345345

346-
for (auto PreferredMode : PreferredPresentModes)
346+
for (VkPresentModeKHR PreferredMode : PreferredPresentModes)
347347
{
348348
if (std::find(presentModes.begin(), presentModes.end(), PreferredMode) != presentModes.end())
349349
{
@@ -410,8 +410,8 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
410410
}
411411
}
412412

413-
auto oldSwapchain = m_VkSwapChain;
414-
m_VkSwapChain = VK_NULL_HANDLE;
413+
VkSwapchainKHR oldSwapchain = m_VkSwapChain;
414+
m_VkSwapChain = VK_NULL_HANDLE;
415415

416416
VkSwapchainCreateInfoKHR swapchain_ci = {};
417417

@@ -457,8 +457,8 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
457457
// swapchain_ci.pQueueFamilyIndices = queueFamilyIndices;
458458
//}
459459

460-
const auto& LogicalDevice = pRenderDeviceVk->GetLogicalDevice();
461-
auto vkDevice = pRenderDeviceVk->GetVkDevice();
460+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = pRenderDeviceVk->GetLogicalDevice();
461+
VkDevice vkDevice = pRenderDeviceVk->GetVkDevice();
462462

463463
err = vkCreateSwapchainKHR(vkDevice, &swapchain_ci, NULL, &m_VkSwapChain);
464464
CHECK_VK_ERROR_AND_THROW(err, "Failed to create Vulkan swapchain");
@@ -495,16 +495,16 @@ void SwapChainVkImpl::CreateVulkanSwapChain()
495495
{
496496
std::stringstream ss;
497497
ss << "Swap chain image acquired semaphore " << i;
498-
auto Name = ss.str();
499-
auto Semaphore = LogicalDevice.CreateSemaphore(SemaphoreCI, Name.c_str());
498+
const std::string Name = ss.str();
499+
VulkanUtilities::SemaphoreWrapper Semaphore = LogicalDevice.CreateSemaphore(SemaphoreCI, Name.c_str());
500500
ManagedSemaphore::Create(pRenderDeviceVk, std::move(Semaphore), Name.c_str(), &m_ImageAcquiredSemaphores[i]);
501501
}
502502

503503
{
504504
std::stringstream ss;
505505
ss << "Swap chain draw complete semaphore " << i;
506-
auto Name = ss.str();
507-
auto Semaphore = LogicalDevice.CreateSemaphore(SemaphoreCI, Name.c_str());
506+
const std::string Name = ss.str();
507+
VulkanUtilities::SemaphoreWrapper Semaphore = LogicalDevice.CreateSemaphore(SemaphoreCI, Name.c_str());
508508
ManagedSemaphore::Create(pRenderDeviceVk, std::move(Semaphore), Name.c_str(), &m_DrawCompleteSemaphores[i]);
509509
}
510510

@@ -521,8 +521,8 @@ SwapChainVkImpl::~SwapChainVkImpl()
521521
{
522522
if (m_VkSwapChain != VK_NULL_HANDLE)
523523
{
524-
auto pDeviceContext = m_wpDeviceContext.Lock();
525-
auto* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
524+
RefCntAutoPtr<IDeviceContext> pDeviceContext = m_wpDeviceContext.Lock();
525+
DeviceContextVkImpl* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
526526
ReleaseSwapChainResources(pImmediateCtxVk, /*DestroyVkSwapChain=*/true);
527527
VERIFY_EXPR(m_VkSwapChain == VK_NULL_HANDLE);
528528
}
@@ -535,13 +535,13 @@ SwapChainVkImpl::~SwapChainVkImpl()
535535

536536
void SwapChainVkImpl::InitBuffersAndViews()
537537
{
538-
auto* pDeviceVkImpl = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
539-
auto LogicalVkDevice = pDeviceVkImpl->GetVkDevice();
538+
RenderDeviceVkImpl* pDeviceVkImpl = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
539+
VkDevice LogicalVkDevice = pDeviceVkImpl->GetVkDevice();
540540

541541
#ifdef DILIGENT_DEBUG
542542
{
543543
uint32_t swapchainImageCount = 0;
544-
auto err = vkGetSwapchainImagesKHR(LogicalVkDevice, m_VkSwapChain, &swapchainImageCount, NULL);
544+
VkResult err = vkGetSwapchainImagesKHR(LogicalVkDevice, m_VkSwapChain, &swapchainImageCount, NULL);
545545
VERIFY_EXPR(err == VK_SUCCESS);
546546
VERIFY(swapchainImageCount == m_SwapChainDesc.BufferCount, "Unexpected swap chain buffer count");
547547
}
@@ -553,7 +553,7 @@ void SwapChainVkImpl::InitBuffersAndViews()
553553

554554
uint32_t swapchainImageCount = m_SwapChainDesc.BufferCount;
555555
std::vector<VkImage> swapchainImages(swapchainImageCount);
556-
auto err = vkGetSwapchainImagesKHR(LogicalVkDevice, m_VkSwapChain, &swapchainImageCount, swapchainImages.data());
556+
VkResult err = vkGetSwapchainImagesKHR(LogicalVkDevice, m_VkSwapChain, &swapchainImageCount, swapchainImages.data());
557557
CHECK_VK_ERROR_AND_THROW(err, "Failed to get swap chain images");
558558
VERIFY_EXPR(swapchainImageCount == swapchainImages.size());
559559

@@ -562,7 +562,7 @@ void SwapChainVkImpl::InitBuffersAndViews()
562562
TextureDesc BackBufferDesc;
563563
std::stringstream name_ss;
564564
name_ss << "Main back buffer " << i;
565-
auto name = name_ss.str();
565+
const std::string name = name_ss.str();
566566
BackBufferDesc.Name = name.c_str();
567567
BackBufferDesc.Type = RESOURCE_DIM_TEX_2D;
568568
BackBufferDesc.Width = m_SwapChainDesc.Width;
@@ -598,15 +598,15 @@ void SwapChainVkImpl::InitBuffersAndViews()
598598
DepthBufferDesc.Name = "Main depth buffer";
599599
RefCntAutoPtr<ITexture> pDepthBufferTex;
600600
m_pRenderDevice->CreateTexture(DepthBufferDesc, nullptr, static_cast<ITexture**>(&pDepthBufferTex));
601-
auto* pDSV = pDepthBufferTex->GetDefaultView(TEXTURE_VIEW_DEPTH_STENCIL);
602-
m_pDepthBufferDSV = RefCntAutoPtr<ITextureViewVk>(pDSV, IID_TextureViewVk);
601+
ITextureView* pDSV = pDepthBufferTex->GetDefaultView(TEXTURE_VIEW_DEPTH_STENCIL);
602+
m_pDepthBufferDSV = RefCntAutoPtr<ITextureViewVk>(pDSV, IID_TextureViewVk);
603603
}
604604
}
605605

606606
VkResult SwapChainVkImpl::AcquireNextImage(DeviceContextVkImpl* pDeviceCtxVk)
607607
{
608-
auto* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
609-
const auto& LogicalDevice = pDeviceVk->GetLogicalDevice();
608+
RenderDeviceVkImpl* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
609+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = pDeviceVk->GetLogicalDevice();
610610

611611
// Applications should not rely on vkAcquireNextImageKHR blocking in order to
612612
// meter their rendering speed. The implementation may return from this function
@@ -628,13 +628,13 @@ VkResult SwapChainVkImpl::AcquireNextImage(DeviceContextVkImpl* pDeviceCtxVk)
628628
// When acquiring swap chain image for frame N, we need to make sure that
629629
// frame N-Nsc has completed. To achieve that, we wait for the image acquire
630630
// fence for frame N-Nsc-1. Thus we will have no more than Nsc frames in the queue.
631-
auto OldestSubmittedImageFenceInd = (m_SemaphoreIndex + 1u) % static_cast<Uint32>(m_ImageAcquiredFenceSubmitted.size());
631+
Uint32 OldestSubmittedImageFenceInd = (m_SemaphoreIndex + 1u) % static_cast<Uint32>(m_ImageAcquiredFenceSubmitted.size());
632632
if (m_ImageAcquiredFenceSubmitted[OldestSubmittedImageFenceInd])
633633
{
634634
VkFence OldestSubmittedFence = m_ImageAcquiredFences[OldestSubmittedImageFenceInd];
635635
if (LogicalDevice.GetFenceStatus(OldestSubmittedFence) == VK_NOT_READY)
636636
{
637-
auto res = LogicalDevice.WaitForFences(1, &OldestSubmittedFence, VK_TRUE, UINT64_MAX);
637+
VkResult res = LogicalDevice.WaitForFences(1, &OldestSubmittedFence, VK_TRUE, UINT64_MAX);
638638
VERIFY_EXPR(res == VK_SUCCESS);
639639
(void)res;
640640
}
@@ -645,7 +645,7 @@ VkResult SwapChainVkImpl::AcquireNextImage(DeviceContextVkImpl* pDeviceCtxVk)
645645
VkFence ImageAcquiredFence = m_ImageAcquiredFences[m_SemaphoreIndex];
646646
VkSemaphore ImageAcquiredSemaphore = m_ImageAcquiredSemaphores[m_SemaphoreIndex]->Get();
647647

648-
auto res = vkAcquireNextImageKHR(LogicalDevice.GetVkDevice(), m_VkSwapChain, UINT64_MAX, ImageAcquiredSemaphore, ImageAcquiredFence, &m_BackBufferIndex);
648+
VkResult res = vkAcquireNextImageKHR(LogicalDevice.GetVkDevice(), m_VkSwapChain, UINT64_MAX, ImageAcquiredSemaphore, ImageAcquiredFence, &m_BackBufferIndex);
649649

650650
m_ImageAcquiredFenceSubmitted[m_SemaphoreIndex] = (res == VK_SUCCESS);
651651
if (res == VK_SUCCESS)
@@ -676,17 +676,17 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
676676
if (SyncInterval != 0 && SyncInterval != 1)
677677
LOG_WARNING_MESSAGE_ONCE("Vulkan only supports 0 and 1 present intervals");
678678

679-
auto pDeviceContext = m_wpDeviceContext.Lock();
679+
RefCntAutoPtr<IDeviceContext> pDeviceContext = m_wpDeviceContext.Lock();
680680
if (!pDeviceContext)
681681
{
682682
LOG_ERROR_MESSAGE("Immediate context has been released");
683683
return;
684684
}
685685

686-
auto* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
687-
auto* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
686+
DeviceContextVkImpl* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
687+
RenderDeviceVkImpl* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
688688

689-
auto* pBackBuffer = GetCurrentBackBufferRTV()->GetTexture();
689+
ITexture* pBackBuffer = GetCurrentBackBufferRTV()->GetTexture();
690690
pImmediateCtxVk->UnbindTextureFromFramebuffer(ClassPtrCast<TextureVkImpl>(pBackBuffer), false);
691691

692692
if (!m_IsMinimized)
@@ -748,7 +748,7 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
748748

749749
bool EnableVSync = SyncInterval != 0;
750750

751-
auto res = (m_VSyncEnabled == EnableVSync) ? AcquireNextImage(pImmediateCtxVk) : VK_ERROR_OUT_OF_DATE_KHR;
751+
VkResult res = (m_VSyncEnabled == EnableVSync) ? AcquireNextImage(pImmediateCtxVk) : VK_ERROR_OUT_OF_DATE_KHR;
752752
if (res == VK_SUBOPTIMAL_KHR || res == VK_ERROR_OUT_OF_DATE_KHR)
753753
{
754754
m_VSyncEnabled = EnableVSync;
@@ -774,7 +774,7 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
774774

775775
void SwapChainVkImpl::WaitForImageAcquiredFences()
776776
{
777-
const auto& LogicalDevice = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>()->GetLogicalDevice();
777+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>()->GetLogicalDevice();
778778
for (size_t i = 0; i < m_ImageAcquiredFences.size(); ++i)
779779
{
780780
if (m_ImageAcquiredFenceSubmitted[i])
@@ -799,8 +799,8 @@ void SwapChainVkImpl::ReleaseSwapChainResources(DeviceContextVkImpl* pImmediateC
799799
bool RenderTargetsReset = false;
800800
for (Uint32 i = 0; i < m_pBackBufferRTV.size() && !RenderTargetsReset; ++i)
801801
{
802-
auto* pCurrentBackBuffer = ClassPtrCast<TextureVkImpl>(m_pBackBufferRTV[i]->GetTexture());
803-
RenderTargetsReset = pImmediateCtxVk->UnbindTextureFromFramebuffer(pCurrentBackBuffer, false);
802+
TextureVkImpl* pCurrentBackBuffer = ClassPtrCast<TextureVkImpl>(m_pBackBufferRTV[i]->GetTexture());
803+
RenderTargetsReset = pImmediateCtxVk->UnbindTextureFromFramebuffer(pCurrentBackBuffer, false);
804804
}
805805
if (RenderTargetsReset)
806806
{
@@ -809,7 +809,7 @@ void SwapChainVkImpl::ReleaseSwapChainResources(DeviceContextVkImpl* pImmediateC
809809
}
810810
}
811811

812-
auto* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
812+
RenderDeviceVkImpl* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
813813

814814
// This will release references to Vk swap chain buffers hold by
815815
// m_pBackBufferRTV[].
@@ -848,12 +848,12 @@ void SwapChainVkImpl::RecreateVulkanSwapchain(DeviceContextVkImpl* pImmediateCtx
848848

849849
// Check if the surface is lost
850850
{
851-
RenderDeviceVkImpl* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
852-
const auto vkDeviceHandle = pDeviceVk->GetPhysicalDevice().GetVkDeviceHandle();
851+
RenderDeviceVkImpl* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
852+
const VkPhysicalDevice vkDeviceHandle = pDeviceVk->GetPhysicalDevice().GetVkDeviceHandle();
853853

854854
VkSurfaceCapabilitiesKHR surfCapabilities;
855855
// Call vkGetPhysicalDeviceSurfaceCapabilitiesKHR only to check the return code
856-
auto err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(vkDeviceHandle, m_VkSurface, &surfCapabilities);
856+
VkResult err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(vkDeviceHandle, m_VkSurface, &surfCapabilities);
857857
if (err == VK_ERROR_SURFACE_LOST_KHR)
858858
{
859859
// Destroy the swap chain associated with the surface
@@ -880,13 +880,13 @@ void SwapChainVkImpl::Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFOR
880880
if (m_VkSurface != VK_NULL_HANDLE)
881881
{
882882
// Check orientation
883-
const auto* pRenderDeviceVk = m_pRenderDevice.ConstPtr<RenderDeviceVkImpl>();
884-
const auto& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
885-
const auto vkDeviceHandle = PhysicalDevice.GetVkDeviceHandle();
883+
const RenderDeviceVkImpl* pRenderDeviceVk = m_pRenderDevice.ConstPtr<RenderDeviceVkImpl>();
884+
const VulkanUtilities::VulkanPhysicalDevice& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
885+
const VkPhysicalDevice vkDeviceHandle = PhysicalDevice.GetVkDeviceHandle();
886886

887887
VkSurfaceCapabilitiesKHR surfCapabilities = {};
888888

889-
auto err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(vkDeviceHandle, m_VkSurface, &surfCapabilities);
889+
VkResult err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(vkDeviceHandle, m_VkSurface, &surfCapabilities);
890890
if (err == VK_SUCCESS)
891891
{
892892
if (m_CurrentSurfaceTransform != surfCapabilities.currentTransform)
@@ -946,17 +946,17 @@ void SwapChainVkImpl::Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFOR
946946

947947
if (RecreateSwapChain)
948948
{
949-
auto pDeviceContext = m_wpDeviceContext.Lock();
949+
RefCntAutoPtr<IDeviceContext> pDeviceContext = m_wpDeviceContext.Lock();
950950
VERIFY(pDeviceContext, "Immediate context has been released");
951951
if (pDeviceContext)
952952
{
953953
try
954954
{
955-
auto* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
955+
DeviceContextVkImpl* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
956956
// RecreateVulkanSwapchain() unbinds default FB
957957
RecreateVulkanSwapchain(pImmediateCtxVk);
958958

959-
auto res = AcquireNextImage(pImmediateCtxVk);
959+
VkResult res = AcquireNextImage(pImmediateCtxVk);
960960
DEV_CHECK_ERR(res == VK_SUCCESS, "Failed to acquire next image for the just resized swap chain");
961961
(void)res;
962962
}

0 commit comments

Comments
 (0)