Skip to content

meshletcodec: Improve testing coverage - #1010

Merged
zeux merged 3 commits into
masterfrom
mlc-tests
Jan 28, 2026
Merged

zeux merged 3 commits into
masterfrom
mlc-tests

Conversation

@zeux

@zeux zeux commented Jan 28, 2026

Copy link
Copy Markdown
Owner

We already have "real world" testing for meshlet codec in demo/main.cpp, but this adds extra unit tests to ensure various combinations are tested correctly, and that we exercise failure paths for encoding (insufficient output buffer) and decoding (truncated inputs). Also codecfuzz now checks that encodeMeshletBound is conservative.

Because the format is not finalized, no tests with fixed input/output data are provided.

This contribution is sponsored by Valve.

zeux added 3 commits January 28, 2026 08:26
In addition to checking that the data correctly roundtrips, we now check
that the encoded data does not exceed the specified bound.
We now validate that the data roundtrips, decoding is memory safe wrt
input/output, and decoding fails on truncated inputs.

Note: memory safety wrt output is within the "align to 32-bit"
requirement, as such we need to pad the output buffers a little bit for
this example.

Also remove +3 from demo/main.cpp/validateDecodeMeshlet; it's redundant
there because triangle count is already divisible by 4.
We now check that decodeMeshletRaw has the same error behavior and
outputs the same result as decodeMeshlet minus the expected alignment on
the output buffer.
@zeux
zeux merged commit bd54817 into master Jan 28, 2026
13 checks passed
@zeux
zeux deleted the mlc-tests branch January 28, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant