File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,8 @@ uint32_t CCPUMeshPackerV2<MDIStructType>::commit(IMeshPackerBase::PackedMeshBuff
100
100
size_t batchFirstIdx = ramb.indexAllocationOffset ;
101
101
size_t verticesAddedCnt = 0u ;
102
102
size_t instancesAddedCnt = 0u ;
103
- uint32_t batchesAddedCnt = 0u ;
104
103
105
104
const uint32_t batchCnt = triangleBatches.ranges .size () - 1u ;
106
- batchCntTotal += batchCnt;
107
105
for (uint32_t i = 0u ; i < batchCnt; i++)
108
106
{
109
107
auto batchBegin = triangleBatches.ranges [i];
@@ -176,10 +174,10 @@ uint32_t CCPUMeshPackerV2<MDIStructType>::commit(IMeshPackerBase::PackedMeshBuff
176
174
batchFirstIdx += idxInBatchCnt;
177
175
}
178
176
179
- instancesAddedCnt += insCnt;
177
+ instancesAddedCnt += insCnt; // TODO: this a local variable... bug!
180
178
181
- pmbd = { rambIn->mdiAllocationOffset + batchesAddedCnt , static_cast <uint32_t >(batchCnt) };
182
- batchesAddedCnt += batchCnt;
179
+ pmbd = { rambIn->mdiAllocationOffset +batchCntTotal , static_cast <uint32_t >(batchCnt) };
180
+ batchCntTotal += batchCnt;
183
181
184
182
i++;
185
183
}
You can’t perform that action at this time.
0 commit comments