Skip to content

Commit 7ff2bdb

Browse files
committed
levelCount debug compilation error fix
1 parent 87cb523 commit 7ff2bdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/nbl/asset/utils/ICPUVirtualTexture.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,8 @@ class ICPUVirtualTexture final : public IVirtualTexture<ICPUImageView, ICPUSampl
477477
std::fill(m_addrsArray->begin(), m_addrsArray->end(), IVTResidentStorage::phys_pg_addr_alctr_t::invalid_address);
478478

479479
auto* const bufptr = reinterpret_cast<uint8_t*>(m_pageTable->getBuffer()->getPointer());
480-
for (uint32_t i=0u; i<core::max(_addr.maxMip,1u); ++i)
480+
auto levelCount = core::max(_addr.maxMip,1u);
481+
for (uint32_t i=0u; i<levelCount; ++i)
481482
{
482483
const uint32_t w = neededPageCountForSide(extent.width, i);
483484
const uint32_t h = neededPageCountForSide(extent.height, i);

0 commit comments

Comments
 (0)