Skip to content

Commit

Permalink
meshlets proptorype in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Try committed Jul 30, 2022
1 parent 1e35b5f commit 6de802e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Tests/shader/mesh_prefix_sum.comp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ void main() {
uint sumVbo = 0;
uint sumIbo = 0;
for(uint i=b; i<e; ++i) {
sumVbo += indirect.cmd[i].indexCount;
sumIbo += indirect.cmd[i].instanceCount;
sumIbo += indirect.cmd[i].indexCount;
sumVbo += indirect.cmd[i].instanceCount;
}
partialSummIbo[index] = sumVbo;
partialSummVbo[index] = sumIbo;
partialSummIbo[index] = sumIbo;
partialSummVbo[index] = sumVbo;

memoryBarrierShared();
barrier();
Expand Down
4 changes: 2 additions & 2 deletions Tests/shader/simple_test.mesh.comp
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ void main() {
}

// Fair counting of indices
uint maxVertex = indMax+1;
atomicAdd(indirect.indexCount, indSize);
atomicAdd(indirect.instanceCount, indMax*varSize); // abuse: vbo size
atomicAdd(indirect.instanceCount, maxVertex*varSize); // abuse: vbo size

uint maxVertex = indMax+1;
uint maxVar = maxVertex*varSize;
uint heapDest = atomicAdd(var.grow, indSize + maxVar);
uint varDest = heapDest + indSize;
Expand Down

0 comments on commit 6de802e

Please sign in to comment.