CNA-VGAP-001: Matrix camera builders have no XNA oracle and no full-matrix value test
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
CreateLookAt and the perspective and orthographic builders are asserted only on single terms and covered indirectly by consumer tests; CNA's XNA matrix oracle does not include them.
- Identifier
CNA-VGAP-001- Category
- Verification gap
- Subsystem
- Math & geometry
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- Matrix::CreateLookAt, CreatePerspective, CreatePerspectiveFieldOfView, CreatePerspectiveOffCenter, CreateOrthographic and CreateOrthographicOffCenter
Expected behaviour
The evidence standard CNA applies to the rest of Matrix: bit comparison with the genuine XNA runtime through matrix-oracle.txt and MatrixOracleTests, or at least value tests of all sixteen terms for representative inputs.
Actual behaviour at TARGET
At TARGET the direct evidence is:
- in
MatrixTests.cpp:CreateLookAtM44IsOne(M44 only),CreateOrthographicM11(M11, M22, M44),CreateOrthographicOffCenterM44(M44, M11), three…M34IsMinusOnecases for the perspective builders, and the thrown cases; - in the C ABI
MatrixSmoke.c: one input per builder, checking LookAt M43, orthographic M11, M22 and M33, perspective M11 and M34, and M11 and M22 of the field-of-view and off-centre forms; - the oracle corpus families are multiply, invert, rotationx/y/z, transform3, transformnormal3, toradians and todegrees; no builder is included.
The remaining terms (LookAt's rotation block, the perspective depth terms M33 and M43) are exercised only indirectly, by ViewportTests.cpp (projection and unprojection derived by hand), the bounding-frustum tests and graphics-ext consumers. Nothing is known to be wrong apart from the field-of-view guard recorded as CNA-BUG-026.
Source locations
modules/math/src/Matrix.cpp— CreateLookAt, CreatePerspective, CreatePerspectiveFieldOfView, CreatePerspectiveOffCenter, CreateOrthographic, CreateOrthographicOffCentermodules/math/tests/Microsoft/Xna/Framework/MatrixTests.cpp— the builder tests listed abovemodules/math/tests/Microsoft/Xna/Framework/MatrixOracleTests.cpp— asserts the oracle family counts; no builder familytests/reference/xna40/framework/matrix-oracle.txt— the recorded XNA corpusmodules/c-api/tests/pure_c/MatrixSmoke.c— one value check per buildermodules/graphics/tests/Microsoft/Xna/Framework/Graphics/ViewportTests.cpp— indirect coverage through Project and Unproject
Evidence
Checked by reading at 009d40f5; nothing was built or executed for this entry. The test inventory and the corpus families were read; no test was run, so this entry says nothing about whether the existing tests pass.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
As listed under actual behaviour: single-term unit tests, one C ABI smoke value per builder, and indirect consumer tests.
Regression test
Add the six builders to the framework oracle's matrix cases and regenerate the corpus with CNA's oracle tool, then extend MatrixOracleTests to compare all sixteen words; failing that, add full-matrix value tests derived independently of the implementation.
Blast radius
Every 3D camera and projection built with these functions; a last-bit difference from XNA would propagate into projection, depth and picking. No incorrect output is known.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- User guide
- Verification: the XNA oracle corpus
- Tests and validation
- Test architecture and change recipes
- Deep dives
- Compatibility and evidence levels
- Known issues
- Verification gap index