Skip to content

Conversation

@zeux
Copy link
Owner

@zeux zeux commented Dec 16, 2025

We had limited coverage for 16-bit deltas previously: V1Custom test only
exercised delta decoding on zero deltas, and VertexDeltas test only had
positive deltas which could hide an implementation error with sign bit
handling.

To fix this, expand decodeVertexDeltas test to have deltas flip the sign
in the second half of the data, and add decodeVertexV1Deltas test which
has the same data encoded statically.

Thanks to @xPaw for noticing.

zeux added 2 commits December 16, 2025 11:26
We had limited coverage for 16-bit deltas previously: V1Custom test only
exercised delta decoding on zero deltas, and VertexDeltas test only had
positive deltas which could hide an implementation error with sign bit
handling.

To fix this, expand decodeVertexDeltas test to have deltas flip the sign
in the second half of the data, and add decodeVertexV1Deltas test which
has the same data encoded statically.
This test has the same data as the correponding test from demo/tests.cpp
and expands testing coverage for 16-bit delta decoding that V1_Custom
test was previously lacking.
xPaw added a commit to ValveResourceFormat/ValveResourceFormat that referenced this pull request Dec 16, 2025
@zeux zeux merged commit 4f0daf9 into master Dec 17, 2025
13 checks passed
@zeux zeux deleted the vtx1-zigzag16-tests branch December 17, 2025 17:04
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