Skip to content

Commit 18cad7d

Browse files
committed
demo: Add meshopt_optimizeMeshlet testing for 256v
We don't thoroughly check that the output is correct but at least check that remapping is consistent.
1 parent 6a9f24a commit 18cad7d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

demo/tests.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,17 @@ static void meshletsMax()
12361236
assert(mc == 1);
12371237
assert(ml[0].triangle_count == 450);
12381238
assert(ml[0].vertex_count == 256);
1239+
1240+
meshopt_optimizeMeshlet(mv, mt, ml[0].triangle_count, ml[0].vertex_count);
1241+
1242+
// check sequential ordering of remapped indices
1243+
int vmax = -1;
1244+
1245+
for (size_t i = 0; i < 450 * 3; ++i)
1246+
{
1247+
assert(mt[i] <= vmax + 1);
1248+
vmax = vmax < mt[i] ? mt[i] : vmax;
1249+
}
12391250
}
12401251

12411252
static void partitionBasic()

0 commit comments

Comments
 (0)