Skip to content

Commit 9395024

Browse files
GraphicsEngineVk: don't use auto where unnecessary
1 parent a6ae3cc commit 9395024

25 files changed

+312
-305
lines changed

Graphics/GraphicsEngineVulkan/src/BottomLevelASVkImpl.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2024 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,10 +38,10 @@ BottomLevelASVkImpl::BottomLevelASVkImpl(IReferenceCounters* pRefCounters,
3838
const BottomLevelASDesc& Desc) :
3939
TBottomLevelASBase{pRefCounters, pRenderDeviceVk, Desc}
4040
{
41-
const auto& LogicalDevice = pRenderDeviceVk->GetLogicalDevice();
42-
const auto& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
43-
const auto& RTProps = pRenderDeviceVk->GetAdapterInfo().RayTracing;
44-
auto AccelStructSize = m_Desc.CompactedSize;
41+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = pRenderDeviceVk->GetLogicalDevice();
42+
const VulkanUtilities::VulkanPhysicalDevice& PhysicalDevice = pRenderDeviceVk->GetPhysicalDevice();
43+
const RayTracingProperties& RTProps = pRenderDeviceVk->GetAdapterInfo().RayTracing;
44+
Uint64 AccelStructSize = m_Desc.CompactedSize;
4545

4646
if (AccelStructSize == 0)
4747
{
@@ -59,9 +59,9 @@ BottomLevelASVkImpl::BottomLevelASVkImpl(IReferenceCounters* pRefCounters,
5959
Uint32 MaxPrimitiveCount = 0;
6060
for (uint32_t i = 0; i < m_Desc.TriangleCount; ++i)
6161
{
62-
auto& src = m_Desc.pTriangles[i];
63-
auto& dst = vkGeometries[i];
64-
auto& tri = dst.geometry.triangles;
62+
const BLASTriangleDesc& src = m_Desc.pTriangles[i];
63+
VkAccelerationStructureGeometryKHR& dst = vkGeometries[i];
64+
VkAccelerationStructureGeometryTrianglesDataKHR& tri = dst.geometry.triangles;
6565

6666
dst.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR;
6767
dst.pNext = nullptr;
@@ -106,9 +106,9 @@ BottomLevelASVkImpl::BottomLevelASVkImpl(IReferenceCounters* pRefCounters,
106106
Uint32 MaxBoxCount = 0;
107107
for (uint32_t i = 0; i < m_Desc.BoxCount; ++i)
108108
{
109-
auto& src = m_Desc.pBoxes[i];
110-
auto& dst = vkGeometries[i];
111-
auto& box = dst.geometry.aabbs;
109+
const BLASBoundingBoxDesc& src = m_Desc.pBoxes[i];
110+
VkAccelerationStructureGeometryKHR& dst = vkGeometries[i];
111+
VkAccelerationStructureGeometryAabbsDataKHR& box = dst.geometry.aabbs;
112112

113113
dst.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR;
114114
dst.pNext = nullptr;
@@ -166,8 +166,8 @@ BottomLevelASVkImpl::BottomLevelASVkImpl(IReferenceCounters* pRefCounters,
166166

167167
m_MemoryAlignedOffset = AlignUp(VkDeviceSize{m_MemoryAllocation.UnalignedOffset}, MemReqs.alignment);
168168
VERIFY(m_MemoryAllocation.Size >= MemReqs.size + (m_MemoryAlignedOffset - m_MemoryAllocation.UnalignedOffset), "Size of memory allocation is too small");
169-
auto Memory = m_MemoryAllocation.Page->GetVkMemory();
170-
auto err = LogicalDevice.BindBufferMemory(m_VulkanBuffer, Memory, m_MemoryAlignedOffset);
169+
VkDeviceMemory Memory = m_MemoryAllocation.Page->GetVkMemory();
170+
VkResult err = LogicalDevice.BindBufferMemory(m_VulkanBuffer, Memory, m_MemoryAlignedOffset);
171171
CHECK_VK_ERROR_AND_THROW(err, "Failed to bind buffer memory");
172172

173173
VkAccelerationStructureCreateInfoKHR vkAccelStrCI{};

Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -136,9 +136,9 @@ __forceinline void SyncPointVk::GetSemaphores(std::vector<VkSemaphore>& Semaphor
136136

137137
__forceinline SyncPointVkPtr CommandQueueVkImpl::CreateSyncPoint(Uint64 dbgValue)
138138
{
139-
auto* pAllocator = &m_SyncPointAllocator;
140-
void* ptr = pAllocator->Allocate(SyncPointVk::SizeOf(m_NumCommandQueues), "SyncPointVk", __FILE__, __LINE__);
141-
auto Deleter = [pAllocator](SyncPointVk* ptr) //
139+
FixedBlockMemoryAllocator* pAllocator = &m_SyncPointAllocator;
140+
void* ptr = pAllocator->Allocate(SyncPointVk::SizeOf(m_NumCommandQueues), "SyncPointVk", __FILE__, __LINE__);
141+
auto Deleter = [pAllocator](SyncPointVk* ptr) //
142142
{
143143
ptr->~SyncPointVk();
144144
pAllocator->Free(ptr);
@@ -154,7 +154,7 @@ Uint64 CommandQueueVkImpl::Submit(const VkSubmitInfo& InSubmitInfo)
154154
// Increment the value before submitting the buffer to be overly safe
155155
const uint64_t FenceValue = m_NextFenceValue.fetch_add(1);
156156

157-
auto NewSyncPoint = CreateSyncPoint(FenceValue);
157+
SyncPointVkPtr NewSyncPoint = CreateSyncPoint(FenceValue);
158158

159159
m_TempSignalSemaphores.clear();
160160
NewSyncPoint->GetSemaphores(m_TempSignalSemaphores);
@@ -186,7 +186,7 @@ Uint64 CommandQueueVkImpl::Submit(const VkSubmitInfo& InSubmitInfo)
186186
1 :
187187
0;
188188

189-
auto err = vkQueueSubmit(m_VkQueue, SubmitCount, &SubmitInfo, NewSyncPoint->GetFence());
189+
VkResult err = vkQueueSubmit(m_VkQueue, SubmitCount, &SubmitInfo, NewSyncPoint->GetFence());
190190
DEV_CHECK_ERR(err == VK_SUCCESS, "Failed to submit command buffer to the command queue");
191191
(void)err;
192192

@@ -226,7 +226,7 @@ Uint64 CommandQueueVkImpl::WaitForIdle()
226226
std::lock_guard<std::mutex> QueueGuard{m_QueueMutex};
227227

228228
// Update last completed fence value to unlock all waiting events.
229-
const auto FenceValue = m_NextFenceValue.fetch_add(1);
229+
const Uint64 FenceValue = m_NextFenceValue.fetch_add(1);
230230

231231
vkQueueWaitIdle(m_VkQueue);
232232
// For some reason after idling the queue not all fences are signaled
@@ -247,7 +247,7 @@ void CommandQueueVkImpl::EnqueueSignalFence(VkFence vkFence)
247247

248248
std::lock_guard<std::mutex> QueueGuard{m_QueueMutex};
249249

250-
auto err = vkQueueSubmit(m_VkQueue, 0, nullptr, vkFence);
250+
VkResult err = vkQueueSubmit(m_VkQueue, 0, nullptr, vkFence);
251251
DEV_CHECK_ERR(err == VK_SUCCESS, "Failed to submit fence signal command to the command queue");
252252
(void)err;
253253
}
@@ -279,7 +279,7 @@ void CommandQueueVkImpl::InternalSignalSemaphore(VkSemaphore vkTimelineSemaphore
279279
SubmitInfo.signalSemaphoreCount = 1;
280280
SubmitInfo.pSignalSemaphores = &vkTimelineSemaphore;
281281

282-
auto err = vkQueueSubmit(m_VkQueue, 1, &SubmitInfo, VK_NULL_HANDLE);
282+
VkResult err = vkQueueSubmit(m_VkQueue, 1, &SubmitInfo, VK_NULL_HANDLE);
283283
DEV_CHECK_ERR(err == VK_SUCCESS, "Failed to submit timeline semaphore signal command to the command queue");
284284
(void)err;
285285
}
@@ -297,7 +297,7 @@ Uint64 CommandQueueVkImpl::BindSparse(const VkBindSparseInfo& InBindInfo)
297297
// Increment the value before submitting the buffer to be overly safe
298298
const uint64_t FenceValue = m_NextFenceValue.fetch_add(1);
299299

300-
auto NewSyncPoint = CreateSyncPoint(FenceValue);
300+
SyncPointVkPtr NewSyncPoint = CreateSyncPoint(FenceValue);
301301

302302
m_TempSignalSemaphores.clear();
303303
NewSyncPoint->GetSemaphores(m_TempSignalSemaphores);
@@ -322,7 +322,7 @@ Uint64 CommandQueueVkImpl::BindSparse(const VkBindSparseInfo& InBindInfo)
322322
BindInfo.signalSemaphoreCount = static_cast<Uint32>(m_TempSignalSemaphores.size());
323323
BindInfo.pSignalSemaphores = m_TempSignalSemaphores.data();
324324

325-
auto err = vkQueueBindSparse(m_VkQueue, 1, &BindInfo, NewSyncPoint->GetFence());
325+
VkResult err = vkQueueBindSparse(m_VkQueue, 1, &BindInfo, NewSyncPoint->GetFence());
326326
DEV_CHECK_ERR(err == VK_SUCCESS, "Failed to submit sparse bind commands to the command queue");
327327
(void)err;
328328

Graphics/GraphicsEngineVulkan/src/DeviceMemoryVkImpl.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2023 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -45,8 +45,8 @@ DeviceMemoryVkImpl::DeviceMemoryVkImpl(IReferenceCounters* pRefCounter
4545
#define DEVMEM_CHECK_CREATE_INFO(...) \
4646
LOG_ERROR_AND_THROW("Device memory create info is not valid: ", __VA_ARGS__);
4747

48-
const auto& PhysicalDevice = m_pDevice->GetPhysicalDevice();
49-
const auto& LogicalDevice = m_pDevice->GetLogicalDevice();
48+
const VulkanUtilities::VulkanPhysicalDevice& PhysicalDevice = m_pDevice->GetPhysicalDevice();
49+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = m_pDevice->GetLogicalDevice();
5050

5151
if (MemCI.NumResources == 0)
5252
DEVMEM_CHECK_CREATE_INFO("Vulkan requires at least one resource to choose memory type");
@@ -57,19 +57,19 @@ DeviceMemoryVkImpl::DeviceMemoryVkImpl(IReferenceCounters* pRefCounter
5757
uint32_t MemoryTypeBits = ~0u;
5858
for (Uint32 i = 0; i < MemCI.NumResources; ++i)
5959
{
60-
auto* pResource = MemCI.ppCompatibleResources[i];
60+
IDeviceObject* pResource = MemCI.ppCompatibleResources[i];
6161

6262
if (RefCntAutoPtr<ITextureVk> pTexture{pResource, IID_TextureVk})
6363
{
64-
const auto* pTexVk = pTexture.ConstPtr<TextureVkImpl>();
64+
const TextureVkImpl* pTexVk = pTexture.ConstPtr<TextureVkImpl>();
6565
if (pTexVk->GetDesc().Usage != USAGE_SPARSE)
6666
DEVMEM_CHECK_CREATE_INFO("ppCompatibleResources[", i, "] must be created with USAGE_SPARSE");
6767

6868
MemoryTypeBits &= LogicalDevice.GetImageMemoryRequirements(pTexVk->GetVkImage()).memoryTypeBits;
6969
}
7070
else if (RefCntAutoPtr<IBufferVk> pBuffer{pResource, IID_BufferVk})
7171
{
72-
const auto* pBuffVk = pBuffer.ConstPtr<BufferVkImpl>();
72+
const BufferVkImpl* pBuffVk = pBuffer.ConstPtr<BufferVkImpl>();
7373
if (pBuffVk->GetDesc().Usage != USAGE_SPARSE)
7474
DEVMEM_CHECK_CREATE_INFO("ppCompatibleResources[", i, "] must be created with USAGE_SPARSE");
7575

@@ -84,7 +84,7 @@ DeviceMemoryVkImpl::DeviceMemoryVkImpl(IReferenceCounters* pRefCounter
8484
if (MemoryTypeBits == 0)
8585
DEVMEM_CHECK_CREATE_INFO("ppCompatibleResources contains incompatible resources");
8686

87-
static constexpr auto InvalidMemoryTypeIndex = VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex;
87+
static constexpr uint32_t InvalidMemoryTypeIndex = VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex;
8888

8989
uint32_t MemoryTypeIndex = PhysicalDevice.GetMemoryTypeIndex(MemoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
9090

@@ -99,7 +99,7 @@ DeviceMemoryVkImpl::DeviceMemoryVkImpl(IReferenceCounters* pRefCounter
9999
MemAlloc.allocationSize = m_Desc.PageSize;
100100
MemAlloc.memoryTypeIndex = m_MemoryTypeIndex;
101101

102-
const auto PageCount = StaticCast<size_t>(MemCI.InitialSize / m_Desc.PageSize);
102+
const size_t PageCount = StaticCast<size_t>(MemCI.InitialSize / m_Desc.PageSize);
103103
m_Pages.reserve(PageCount);
104104

105105
for (size_t i = 0; i < PageCount; ++i)
@@ -117,8 +117,8 @@ Bool DeviceMemoryVkImpl::Resize(Uint64 NewSize)
117117
{
118118
DvpVerifyResize(NewSize);
119119

120-
const auto& LogicalDevice = m_pDevice->GetLogicalDevice();
121-
const auto NewPageCount = StaticCast<size_t>(NewSize / m_Desc.PageSize);
120+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = m_pDevice->GetLogicalDevice();
121+
const size_t NewPageCount = StaticCast<size_t>(NewSize / m_Desc.PageSize);
122122

123123
VkMemoryAllocateInfo MemAlloc{};
124124
MemAlloc.pNext = nullptr;
@@ -156,18 +156,18 @@ Uint64 DeviceMemoryVkImpl::GetCapacity() const
156156

157157
Bool DeviceMemoryVkImpl::IsCompatible(IDeviceObject* pResource) const
158158
{
159-
const auto& LogicalDevice = m_pDevice->GetLogicalDevice();
159+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = m_pDevice->GetLogicalDevice();
160160

161161
uint32_t memoryTypeBits = 0;
162162
if (RefCntAutoPtr<ITextureVk> pTexture{pResource, IID_TextureVk})
163163
{
164-
const auto* pTexVk = pTexture.ConstPtr<TextureVkImpl>();
165-
memoryTypeBits = LogicalDevice.GetImageMemoryRequirements(pTexVk->GetVkImage()).memoryTypeBits;
164+
const TextureVkImpl* pTexVk = pTexture.ConstPtr<TextureVkImpl>();
165+
memoryTypeBits = LogicalDevice.GetImageMemoryRequirements(pTexVk->GetVkImage()).memoryTypeBits;
166166
}
167167
else if (RefCntAutoPtr<IBufferVk> pBuffer{pResource, IID_BufferVk})
168168
{
169-
const auto* pBuffVk = pBuffer.ConstPtr<BufferVkImpl>();
170-
memoryTypeBits = LogicalDevice.GetBufferMemoryRequirements(pBuffVk->GetVkBuffer()).memoryTypeBits;
169+
const BufferVkImpl* pBuffVk = pBuffer.ConstPtr<BufferVkImpl>();
170+
memoryTypeBits = LogicalDevice.GetBufferMemoryRequirements(pBuffVk->GetVkBuffer()).memoryTypeBits;
171171
}
172172
else
173173
{
@@ -178,7 +178,7 @@ Bool DeviceMemoryVkImpl::IsCompatible(IDeviceObject* pResource) const
178178

179179
DeviceMemoryRangeVk DeviceMemoryVkImpl::GetRange(Uint64 Offset, Uint64 Size) const
180180
{
181-
const auto PageIdx = static_cast<size_t>(Offset / m_Desc.PageSize);
181+
const size_t PageIdx = static_cast<size_t>(Offset / m_Desc.PageSize);
182182

183183
DeviceMemoryRangeVk Range{};
184184
if (PageIdx >= m_Pages.size())
@@ -187,7 +187,7 @@ DeviceMemoryRangeVk DeviceMemoryVkImpl::GetRange(Uint64 Offset, Uint64 Size) con
187187
return Range;
188188
}
189189

190-
const auto OffsetInPage = Offset % m_Desc.PageSize;
190+
const Uint64 OffsetInPage = Offset % m_Desc.PageSize;
191191
if (OffsetInPage + Size > m_Desc.PageSize)
192192
{
193193
DEV_ERROR("DeviceMemoryVkImpl::GetRange(): Offset and Size must be inside a single page");

Graphics/GraphicsEngineVulkan/src/FramebufferVkImpl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,15 +51,15 @@ FramebufferVkImpl::FramebufferVkImpl(IReferenceCounters* pRefCounters,
5151
FramebufferCI.pNext = nullptr;
5252
FramebufferCI.flags = 0;
5353

54-
auto* pRenderPassVkImpl = ClassPtrCast<RenderPassVkImpl>(m_Desc.pRenderPass);
55-
FramebufferCI.renderPass = pRenderPassVkImpl->GetVkRenderPass();
54+
RenderPassVkImpl* pRenderPassVkImpl = ClassPtrCast<RenderPassVkImpl>(m_Desc.pRenderPass);
55+
FramebufferCI.renderPass = pRenderPassVkImpl->GetVkRenderPass();
5656

5757
FramebufferCI.attachmentCount = m_Desc.AttachmentCount;
5858

5959
std::vector<VkImageView> vkImgViews(m_Desc.AttachmentCount);
6060
for (Uint32 i = 0; i < m_Desc.AttachmentCount; ++i)
6161
{
62-
if (auto* pView = m_Desc.ppAttachments[i])
62+
if (ITextureView* pView = m_Desc.ppAttachments[i])
6363
{
6464
vkImgViews[i] = ClassPtrCast<TextureViewVkImpl>(pView)->GetVulkanImageView();
6565
}
@@ -70,7 +70,7 @@ FramebufferVkImpl::FramebufferVkImpl(IReferenceCounters* pRefCounters,
7070
FramebufferCI.height = m_Desc.Height;
7171
FramebufferCI.layers = m_Desc.NumArraySlices;
7272

73-
const auto& LogicalDevice = pDevice->GetLogicalDevice();
73+
const VulkanUtilities::VulkanLogicalDevice& LogicalDevice = pDevice->GetLogicalDevice();
7474

7575
m_VkFramebuffer = LogicalDevice.CreateFramebuffer(FramebufferCI, m_Desc.Name);
7676
if (!m_VkFramebuffer)

Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -43,26 +43,26 @@ namespace GenerateMipsVkHelper
4343

4444
void GenerateMips(TextureViewVkImpl& TexView, DeviceContextVkImpl& Ctx)
4545
{
46-
auto* pTexVk = TexView.GetTexture<TextureVkImpl>();
46+
TextureVkImpl* pTexVk = TexView.GetTexture<TextureVkImpl>();
4747
if (!pTexVk->IsInKnownState())
4848
{
4949
LOG_ERROR_MESSAGE("Unable to generate mips for texture '", pTexVk->GetDesc().Name, "' because the texture state is unknown");
5050
return;
5151
}
5252

53-
const auto OriginalState = pTexVk->GetState();
54-
const auto OriginalLayout = pTexVk->GetLayout();
55-
const auto OldStages = ResourceStateFlagsToVkPipelineStageFlags(OriginalState);
56-
const auto& TexDesc = pTexVk->GetDesc();
57-
const auto& ViewDesc = TexView.GetDesc();
53+
const RESOURCE_STATE OriginalState = pTexVk->GetState();
54+
const VkImageLayout OriginalLayout = pTexVk->GetLayout();
55+
const VkPipelineStageFlags OldStages = ResourceStateFlagsToVkPipelineStageFlags(OriginalState);
56+
const TextureDesc& TexDesc = pTexVk->GetDesc();
57+
const TextureViewDesc& ViewDesc = TexView.GetDesc();
5858

5959
DEV_CHECK_ERR(ViewDesc.NumMipLevels > 1, "Number of mip levels in the view must be greater than 1");
6060
DEV_CHECK_ERR(OriginalState != RESOURCE_STATE_UNDEFINED,
6161
"Attempting to generate mipmaps for texture '", TexDesc.Name,
6262
"' which is in RESOURCE_STATE_UNDEFINED state ."
6363
"This is not expected in Vulkan backend as textures are transition to a defined state when created.");
6464

65-
const auto& FmtAttribs = GetTextureFormatAttribs(ViewDesc.Format);
65+
const TextureFormatAttribs& FmtAttribs = GetTextureFormatAttribs(ViewDesc.Format);
6666

6767
VkImageSubresourceRange SubresRange{};
6868
if (FmtAttribs.ComponentType == COMPONENT_TYPE_DEPTH)
@@ -94,8 +94,8 @@ void GenerateMips(TextureViewVkImpl& TexView, DeviceContextVkImpl& Ctx)
9494
SubresRange.baseMipLevel = ViewDesc.MostDetailedMip;
9595
SubresRange.levelCount = 1;
9696

97-
auto& CmdBuffer = Ctx.GetCommandBuffer();
98-
const auto vkImage = pTexVk->GetVkImage();
97+
VulkanUtilities::VulkanCommandBuffer& CmdBuffer = Ctx.GetCommandBuffer();
98+
const VkImage vkImage = pTexVk->GetVkImage();
9999
if (OriginalState != RESOURCE_STATE_COPY_SOURCE)
100100
CmdBuffer.TransitionImageLayout(vkImage, OriginalLayout, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, SubresRange, OldStages, VK_PIPELINE_STAGE_TRANSFER_BIT);
101101

@@ -144,7 +144,7 @@ void GenerateMips(TextureViewVkImpl& TexView, DeviceContextVkImpl& Ctx)
144144
SubresRange, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
145145
}
146146

147-
const auto AffectedMipLevelLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
147+
const VkImageLayout AffectedMipLevelLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
148148
// All affected mip levels are now in VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL state
149149
if (AffectedMipLevelLayout != OriginalLayout)
150150
{

0 commit comments

Comments
 (0)