From 423a2b570692e6f2f78f57b45d584cef005de117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Fri, 18 Oct 2024 20:33:18 -0700 Subject: [PATCH] Cleanup. --- src/renderer_vk.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 3f895dc67..0c9b988ab 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -6538,16 +6538,17 @@ VK_DESTROY setImageMemoryBarrier(_commandBuffer, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); - bimg::TextureFormat::Enum tf = bimg::TextureFormat::Enum(m_textureFormat); - const bimg::ImageBlockInfo &blockInfo = bimg::getBlockInfo(tf); - for (uint32_t i = 0; i < _bufferImageCopyCount; ++i) + bimg::TextureFormat::Enum format = bimg::TextureFormat::Enum(m_textureFormat); + const bimg::ImageBlockInfo& blockInfo = bimg::getBlockInfo(format); + for (uint32_t ii = 0; ii < _bufferImageCopyCount; ++ii) { BX_ASSERT( - bx::uint32_mod(_bufferImageCopy[i].bufferOffset, blockInfo.blockSize) == 0 + bx::uint32_mod(_bufferImageCopy[ii].bufferOffset, blockInfo.blockSize) == 0 , "Misaligned texture of type %s to offset %u, which is not a multiple of %u." - , bimg::getName(tf), _bufferImageCopy[i].bufferOffset, blockInfo.blockSize + , bimg::getName(format), _bufferImageCopy[ii].bufferOffset, blockInfo.blockSize ); } + BX_UNUSED(blockInfo); vkCmdCopyBufferToImage( _commandBuffer