File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments