Skip to content

Commit 423a2b5

Browse files
committed
Cleanup.
1 parent 116ddec commit 423a2b5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/renderer_vk.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6538,16 +6538,17 @@ VK_DESTROY
65386538

65396539
setImageMemoryBarrier(_commandBuffer, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
65406540

6541-
bimg::TextureFormat::Enum tf = bimg::TextureFormat::Enum(m_textureFormat);
6542-
const bimg::ImageBlockInfo &blockInfo = bimg::getBlockInfo(tf);
6543-
for (uint32_t i = 0; i < _bufferImageCopyCount; ++i)
6541+
bimg::TextureFormat::Enum format = bimg::TextureFormat::Enum(m_textureFormat);
6542+
const bimg::ImageBlockInfo& blockInfo = bimg::getBlockInfo(format);
6543+
for (uint32_t ii = 0; ii < _bufferImageCopyCount; ++ii)
65446544
{
65456545
BX_ASSERT(
6546-
bx::uint32_mod(_bufferImageCopy[i].bufferOffset, blockInfo.blockSize) == 0
6546+
bx::uint32_mod(_bufferImageCopy[ii].bufferOffset, blockInfo.blockSize) == 0
65476547
, "Misaligned texture of type %s to offset %u, which is not a multiple of %u."
6548-
, bimg::getName(tf), _bufferImageCopy[i].bufferOffset, blockInfo.blockSize
6548+
, bimg::getName(format), _bufferImageCopy[ii].bufferOffset, blockInfo.blockSize
65496549
);
65506550
}
6551+
BX_UNUSED(blockInfo);
65516552

65526553
vkCmdCopyBufferToImage(
65536554
_commandBuffer

0 commit comments

Comments
 (0)