diff options
| author | Bryan Galdrikian <[email protected]> | 2018-01-22 14:04:16 -0800 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2018-01-22 14:04:16 -0800 |
| commit | 1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d (patch) | |
| tree | 5f8ca75a6b92c60fb5cf3b14282fc4cc1c127eb2 /sdk/lowlevel/source/NvBlastAsset.cpp | |
| parent | Updating readme.md to show updated UE4 Blast integration branches (diff) | |
| download | blast-1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d.tar.xz blast-1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d.zip | |
Changes for 1.1.2 release candidate
See README.md, docs/release_notes.txt
Diffstat (limited to 'sdk/lowlevel/source/NvBlastAsset.cpp')
| -rw-r--r-- | sdk/lowlevel/source/NvBlastAsset.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sdk/lowlevel/source/NvBlastAsset.cpp b/sdk/lowlevel/source/NvBlastAsset.cpp index 354a3ac..2cfc73e 100644 --- a/sdk/lowlevel/source/NvBlastAsset.cpp +++ b/sdk/lowlevel/source/NvBlastAsset.cpp @@ -591,7 +591,7 @@ Asset* Asset::create(void* mem, const NvBlastAssetDesc* desc, void* scratch, NvB { break; // Only iterate through root chunks at this level } - const uint32_t enumeratedChunkCount = enumerateChunkHierarchyBreadthFirst(breadthFirstChunkIndices, desc->chunkCount, chunks, startChunkIndex, false); + const uint32_t enumeratedChunkCount = enumerateChunkHierarchyBreadthFirst(breadthFirstChunkIndices, desc->chunkCount, chunks, startChunkIndex); for (uint32_t chunkNum = enumeratedChunkCount; chunkNum--;) { const uint32_t chunkIndex = breadthFirstChunkIndices[chunkNum]; @@ -600,8 +600,10 @@ Asset* Asset::create(void* mem, const NvBlastAssetDesc* desc, void* scratch, NvB { subtreeLeafChunkCounts[chunkIndex] = 1; } - NVBLAST_ASSERT(!isInvalidIndex(chunk.parentChunkIndex)); // Parent index is valid because root chunk is not included in this list (because of 'false' passed into enumerateChunkHierarchyBreadthFirst, above) - subtreeLeafChunkCounts[chunk.parentChunkIndex] += subtreeLeafChunkCounts[chunkIndex]; + if (!isInvalidIndex(chunk.parentChunkIndex)) + { + subtreeLeafChunkCounts[chunk.parentChunkIndex] += subtreeLeafChunkCounts[chunkIndex]; + } } } |