tests: cover byte Mesh86 material descriptors #3810

Merged
lambirou merged 3 commits from upstream-pr/3810 into main 2026-12-03 01:54:48 +00:00
lambirou commented 2026-12-02 01:22:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-02T01:22:17Z.


Scope\n\nThe shared runtime change now lives on main through #3725 (mesh86_material with byte-descriptor truncation and placed-backing adoption). This PR keeps only the fixture coverage that was unique to it.\n\n## Coverage\n\n ests/startup_mesh86_material_backing.cpp now exercises byte-format material descriptors (stride 1):\n\n- an 18-byte descriptor resolves to the four whole dwords (ytes == 16, offset 0) of the placed backing;\n- a three-byte descriptor is refused with material buffer range has no whole dwords.\n\nThe 18-byte case crosses the rounded-down tail (bytes 16-17 are not addressable through the dword SRV). The shader minimum-read comparison happens later in

ative_mesh86.inl and remains covered by the draw path, not by this resolver fixture.\n\n## Validation\n\n- Branch rebuilt directly on main (2f2901cb); no runtime files are changed.\n- Build and test on Windows runs startup_mesh86_material_backing_warp and its mutants.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5597875779 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3810). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-02T01:22:17Z. --- ## Scope\n\nThe shared runtime change now lives on main through #3725 (mesh86_material with byte-descriptor truncation and placed-backing adoption). This PR keeps only the fixture coverage that was unique to it.\n\n## Coverage\n\n ests/startup_mesh86_material_backing.cpp now exercises byte-format material descriptors (stride 1):\n\n- an 18-byte descriptor resolves to the four whole dwords (ytes == 16, offset 0) of the placed backing;\n- a three-byte descriptor is refused with material buffer range has no whole dwords.\n\nThe 18-byte case crosses the rounded-down tail (bytes 16-17 are not addressable through the dword SRV). The shader minimum-read comparison happens later in ative_mesh86.inl and remains covered by the draw path, not by this resolver fixture.\n\n## Validation\n\n- Branch rebuilt directly on main (2f2901cb); no runtime files are changed.\n- Build and test on Windows runs startup_mesh86_material_backing_warp and its mutants.
R0Y00 commented 2026-12-02 05:24:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T05:24:38Z.

Review: COMMENTED


I checked the merge against main 20def93d. The merge tree conflicts in CMakePresets.json and tests/standin_exports_check.py; the Mesh86 implementation files merge textually. Please carry forward both the existing main checks and the new Mesh86 material-backing registration/contract on the rebased head. Please then rerun the material-backing WARP and hardware cases and the stand-in source check.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6145225876 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3810#pullrequestreview-6145225876). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T05:24:38Z. **Review:** COMMENTED --- I checked the merge against main `20def93d`. The merge tree conflicts in `CMakePresets.json` and `tests/standin_exports_check.py`; the Mesh86 implementation files merge textually. Please carry forward both the existing main checks and the new Mesh86 material-backing registration/contract on the rebased head. Please then rerun the material-backing WARP and hardware cases and the stand-in source check.
R0Y00 commented 2026-12-02 12:02:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T12:02:00Z.

Review: COMMENTED


I built startup_mesh86_material_backing from 0839ddcc and ran ctest --preset dev --no-tests=error -j 1 -V -R '^startup_mesh86_material_backing_'. All six tests passed with zero skips across Microsoft WARP and the RTX 4060 Laptop GPU, including the expected stale-refresh failure and GPU-write provenance controls. Host build 26300.9974, NVIDIA driver 32.0.16.1656, WARP 10.0.26100.9818, D3D12 debug layer off.

The new handling is keyed on InputBufferUse::mesh_material, which Mesh57 now passes too. That means Mesh57 also gets partial-dword truncation, the submitted-GPU-backing path and adoption of non-aliased placed resources. Could you keep the new behavior scoped to Mesh86, or document and cover the Mesh57 cases with a regression fixture if the shared behavior is intended? The current test resolves only the Mesh86 material path.

The required Windows job also failed in the inherited native_direct_mesh fixture (+0x34: unmapped graphics export). #3851 has the fixture fix.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6150307236 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3810#pullrequestreview-6150307236). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T12:02:00Z. **Review:** COMMENTED --- I built `startup_mesh86_material_backing` from `0839ddcc` and ran `ctest --preset dev --no-tests=error -j 1 -V -R '^startup_mesh86_material_backing_'`. All six tests passed with zero skips across Microsoft WARP and the RTX 4060 Laptop GPU, including the expected stale-refresh failure and GPU-write provenance controls. Host build 26300.9974, NVIDIA driver 32.0.16.1656, WARP 10.0.26100.9818, D3D12 debug layer off. The new handling is keyed on `InputBufferUse::mesh_material`, which Mesh57 now passes too. That means Mesh57 also gets partial-dword truncation, the submitted-GPU-backing path and adoption of non-aliased placed resources. Could you keep the new behavior scoped to Mesh86, or document and cover the Mesh57 cases with a regression fixture if the shared behavior is intended? The current test resolves only the Mesh86 material path. The required Windows job also failed in the inherited `native_direct_mesh` fixture (`+0x34: unmapped graphics export`). #3851 has the fixture fix.
lambirou commented 2026-12-02 14:44:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-02T14:44:08Z.

Review: COMMENTED


Reviewed 3aeb40f7 against the maintainer's 0839ddcc test report; read the diff, not built here.

Verdict: changes requested. The new material-backing behavior is keyed on InputBufferUse::mesh_material, but Mesh57 passes that use too. Truncating to whole dwords, preferring a submitted GPU backing and adopting a non-aliased placed resource therefore also change the Mesh57 material path, while the new fixture covers only Mesh86.

  • MUST Keep the new behavior scoped to Mesh86 (a separate use/flag), or document and cover the Mesh57 cases with a regression fixture. The maintainer already asked for this on the integrated head; the current PR has no Mesh57 coverage for the changed path.
  • SHOULD The 18-byte descriptor floors to 16 bytes before the raw SRV. That is correct for the captured 8-byte read, but a shader whose minimum read reaches bytes 16–17 would now be refused only by the later view.bytes < required_bytes check. Add a control with a byte descriptor whose required read crosses the floored boundary, so the refusal is pinned rather than inferred.
  • Checked, no finding: the truncation is applied only to mesh86_material; the input-buffer zero-record path is unchanged; the GPU-write provenance check runs before the title snapshot; the adoption failure has a named reason. The PR is clean at this head, but the Mesh57 scope issue is a real behavioral change.

The Windows failure in the inherited native_direct_mesh fixture is not caused by this diff; #3851 is the tracking fix.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6153042652 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3810#pullrequestreview-6153042652). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-02T14:44:08Z. **Review:** COMMENTED --- Reviewed `3aeb40f7` against the maintainer's `0839ddcc` test report; read the diff, not built here. **Verdict: changes requested.** The new material-backing behavior is keyed on `InputBufferUse::mesh_material`, but Mesh57 passes that use too. Truncating to whole dwords, preferring a submitted GPU backing and adopting a non-aliased placed resource therefore also change the Mesh57 material path, while the new fixture covers only Mesh86. - **MUST** Keep the new behavior scoped to Mesh86 (a separate use/flag), or document and cover the Mesh57 cases with a regression fixture. The maintainer already asked for this on the integrated head; the current PR has no Mesh57 coverage for the changed path. - **SHOULD** The 18-byte descriptor floors to 16 bytes before the raw SRV. That is correct for the captured 8-byte read, but a shader whose minimum read reaches bytes 16–17 would now be refused only by the later `view.bytes < required_bytes` check. Add a control with a byte descriptor whose required read crosses the floored boundary, so the refusal is pinned rather than inferred. - Checked, no finding: the truncation is applied only to `mesh86_material`; the input-buffer zero-record path is unchanged; the GPU-write provenance check runs before the title snapshot; the adoption failure has a named reason. The PR is clean at this head, but the Mesh57 scope issue is a real behavioral change. The Windows failure in the inherited `native_direct_mesh` fixture is not caused by this diff; #3851 is the tracking fix.
R0Y00 commented 2026-12-02 19:04:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T19:04:13Z.

Review: COMMENTED


On 256bcded, native_mesh57.inl still passes InputBufferUse::mesh_material, and the common binder still uses that value for the new truncation and adoption. #3725 now has the separate mesh86_material use while leaving the Mesh57 caller on the original path. Let's use #3725 for the shared runtime change so we only land it once. Please identify any additional fixture coverage here that should carry over, especially a required read that crosses the rounded-down span.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6157042560 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3810#pullrequestreview-6157042560). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T19:04:13Z. **Review:** COMMENTED --- On `256bcded`, `native_mesh57.inl` still passes `InputBufferUse::mesh_material`, and the common binder still uses that value for the new truncation and adoption. #3725 now has the separate `mesh86_material` use while leaving the Mesh57 caller on the original path. Let's use #3725 for the shared runtime change so we only land it once. Please identify any additional fixture coverage here that should carry over, especially a required read that crosses the rounded-down span.
R0Y00 commented 2026-12-03 01:54:43 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T01:54:43Z.

Review: APPROVED


Independently verified 01c85822 with MSVC Debug on Windows 11 build 26300. This is now a test-only follow-up to #3725. ctest --preset dev --no-tests=error -j 1 --output-on-failure -R '^startup_mesh86_material_backing_' passed all six registered cases on WARP and RTX 4060 Laptop (616.56), zero skips. Removing only the dword truncation in the runtime failed both new WARP checks: 18 bytes did not bind as four dwords, and 3 bytes were accepted. With the original runtime restored, WARP passed again.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6162364307 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3810#pullrequestreview-6162364307). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T01:54:43Z. **Review:** APPROVED --- Independently verified 01c85822 with MSVC Debug on Windows 11 build 26300. This is now a test-only follow-up to #3725. `ctest --preset dev --no-tests=error -j 1 --output-on-failure -R '^startup_mesh86_material_backing_'` passed all six registered cases on WARP and RTX 4060 Laptop (616.56), zero skips. Removing only the dword truncation in the runtime failed both new WARP checks: 18 bytes did not bind as four dwords, and 3 bytes were accepted. With the original runtime restored, WARP passed again.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3810
No description provided.