tests: cover list_copy_texture alignment, partial MSAA, and footprint bounds #3759

Manually merged
github merged 1 commit from github-bot/gh-3757 into gh-pr/3757/base 2026-12-02 02:13:35 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-12-01 16:24 UTC · original
Ammmae0x:tests/list-copy-texture-unit → main · +1692 −0 · 5 files · 1 commits · merged 2026-12-02 02:07 UTC

Refs #1149.

Standalone portable C++17 unit + 1:1 header-mutation tests for x2w_list_copy_texture (src/startup_stubs/list_copy_texture.h), with zero edits to existing files (5 new files only, +1692/-0). tests/startup_list_copy_texture_check.cpp and CMakeLists.txt are untouched; the list_copy_texture_unit prefix keeps test names disjoint from startup_list_copy_texture.

27 cases: decode_subresource (zero counts, index >= per_plane * planes, valid (mip, slice, plane) decomposition), checked_mul / checked_add (exact UINT64_MAX boundary vs wrap overflow), footprint_end (zero w/h/d ending at the offset, unpadded last row, 4x4 block-compressed rounding, s.height slice pitch, End::over_pitch, End::overflow), and check() + name() over all 14 Verdict values (ok, buffer_to_buffer, bad_subresource dst/src, sample_mismatch, format_mismatch, bad_box, source_overflow, bad_alignment on start coords and on the box end of a 2x2 mip vs box == nullptr -> ok, partial_multisample and partial_depth_stencil even with a full-size explicit box or a non-zero origin, dest_overflow, bad_pitch 0/non-256/over_pitch, bad_offset non-512, footprint_overflow with the exact end == resource_bytes fit vs +1 overflow).

7 WILL_FAIL TRUE CMake header-mutation controls, mirrored 1:1 in the meta check (decode_bound, box_end_align, partial_msaa, pitch_align, offset_align, slice_rows_height, footprint_bound), with mutated copies at <mut>/startup_stubs/list_copy_texture.h and BEFORE PRIVATE include. No mutant uses a literal constant condition, so they stay clean under MSVC /W4 as well as -Werror on g++.

Verification (Linux, this host, g++ -std=c++17):

/tmp/pe-env/bin/python -B tests/list_copy_texture_unit_meta_check.py
PASS: list_copy_texture_unit: 27 cases, 7/7 mutations killed (g++)

Scratch CMake + CTest (standalone configure of the fragment, via symlinked src/tests; the full configure needs DXC, unavailable on Linux):

ctest --test-dir /tmp/lct-scratch/build --no-tests=error -R '^list_copy_texture_unit'
100% tests passed, 0 tests failed out of 35

That is 27 per-case tests, list_copy_texture_unit_all, and the 7 WILL_FAIL TRUE mutation controls. form_coverage_check.py passes, docs_links_check.py passes (208 files, 802 links), bidi_controls_check.py passes (2827 files), git diff --check is clean, merge-tree exits 0, and the full python-linux suite passes (all 299 checks passed, including this meta check).

No mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.

Windows Verification (7d1aa4a8)

  • git merge-tree --write-tree upstream/main HEAD -> 0acb8df3 (exit 0), git diff --check upstream/main...HEAD clean
  • Repo checks: py_compile, form_coverage_check.py, docs_links_check.py (209 files, 806 links), bidi_controls_check.py (2830 files), list_copy_texture_unit_meta_check.py (cl: 27 cases, 7/7 mutations killed) passed
  • Commands:
cmake --build --preset dev --target list_copy_texture_unit_check list_copy_texture_unit_decode_bound_mut list_copy_texture_unit_box_end_align_mut list_copy_texture_unit_partial_msaa_mut list_copy_texture_unit_pitch_align_mut list_copy_texture_unit_offset_align_mut list_copy_texture_unit_slice_rows_height_mut list_copy_texture_unit_footprint_bound_mut
ctest --preset dev --no-tests=error -j16 -R "^list_copy_texture_unit" --output-on-failure
cmake --build --preset release --target list_copy_texture_unit_check list_copy_texture_unit_decode_bound_mut list_copy_texture_unit_box_end_align_mut list_copy_texture_unit_partial_msaa_mut list_copy_texture_unit_pitch_align_mut list_copy_texture_unit_offset_align_mut list_copy_texture_unit_slice_rows_height_mut list_copy_texture_unit_footprint_bound_mut
ctest --preset release --no-tests=error -j16 -R "^list_copy_texture_unit" --output-on-failure
  • Results: dev 35/35 passed (1.35s); release 35/35 passed (1.17s); direct list_copy_texture_unit_check.exe (dev & release): PASS: list_copy_texture_unit: 27/27 cases passed. AI-assisted.
**@⁠Ammmae0x** on GitHub · 2026-12-01 16:24 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3757) `Ammmae0x:tests/list-copy-texture-unit` → `main` · +1692 −0 · 5 files · 1 commits · merged 2026-12-02 02:07 UTC Refs #1149. Standalone portable C++17 unit + 1:1 header-mutation tests for `x2w_list_copy_texture` (`src/startup_stubs/list_copy_texture.h`), with zero edits to existing files (5 new files only, +1692/-0). `tests/startup_list_copy_texture_check.cpp` and `CMakeLists.txt` are untouched; the `list_copy_texture_unit` prefix keeps test names disjoint from `startup_list_copy_texture`. 27 cases: `decode_subresource` (zero counts, index >= per_plane * planes, valid (mip, slice, plane) decomposition), `checked_mul` / `checked_add` (exact `UINT64_MAX` boundary vs wrap overflow), `footprint_end` (zero w/h/d ending at the offset, unpadded last row, 4x4 block-compressed rounding, `s.height` slice pitch, `End::over_pitch`, `End::overflow`), and `check()` + `name()` over all 14 `Verdict` values (ok, buffer_to_buffer, bad_subresource dst/src, sample_mismatch, format_mismatch, bad_box, source_overflow, bad_alignment on start coords and on the box end of a 2x2 mip vs box == nullptr -> ok, partial_multisample and partial_depth_stencil even with a full-size explicit box or a non-zero origin, dest_overflow, bad_pitch 0/non-256/over_pitch, bad_offset non-512, footprint_overflow with the exact end == resource_bytes fit vs +1 overflow). 7 `WILL_FAIL TRUE` CMake header-mutation controls, mirrored 1:1 in the meta check (`decode_bound`, `box_end_align`, `partial_msaa`, `pitch_align`, `offset_align`, `slice_rows_height`, `footprint_bound`), with mutated copies at `<mut>/startup_stubs/list_copy_texture.h` and `BEFORE PRIVATE` include. No mutant uses a literal constant condition, so they stay clean under MSVC `/W4` as well as `-Werror` on `g++`. Verification (Linux, this host, `g++ -std=c++17`): ```text /tmp/pe-env/bin/python -B tests/list_copy_texture_unit_meta_check.py PASS: list_copy_texture_unit: 27 cases, 7/7 mutations killed (g++) ``` Scratch CMake + CTest (standalone configure of the fragment, via symlinked `src`/`tests`; the full configure needs DXC, unavailable on Linux): ```text ctest --test-dir /tmp/lct-scratch/build --no-tests=error -R '^list_copy_texture_unit' 100% tests passed, 0 tests failed out of 35 ``` That is 27 per-case tests, `list_copy_texture_unit_all`, and the 7 `WILL_FAIL TRUE` mutation controls. `form_coverage_check.py` passes, `docs_links_check.py` passes (208 files, 802 links), `bidi_controls_check.py` passes (2827 files), `git diff --check` is clean, merge-tree exits 0, and the full `python-linux` suite passes (`all 299 checks passed`, including this meta check). No mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter. <!-- WIN-VERIFY: passed | sha=7d1aa4a8107042c221c6449155a036cad8f52391 | targets=list_copy_texture_unit_check list_copy_texture_unit_decode_bound_mut list_copy_texture_unit_box_end_align_mut list_copy_texture_unit_partial_msaa_mut list_copy_texture_unit_pitch_align_mut list_copy_texture_unit_offset_align_mut list_copy_texture_unit_slice_rows_height_mut list_copy_texture_unit_footprint_bound_mut | ctest=^list_copy_texture_unit | release=true --> ### Windows Verification (`7d1aa4a8`) - `git merge-tree --write-tree upstream/main HEAD` -> `0acb8df3` (exit 0), `git diff --check upstream/main...HEAD` clean - Repo checks: `py_compile`, `form_coverage_check.py`, `docs_links_check.py` (209 files, 806 links), `bidi_controls_check.py` (2830 files), `list_copy_texture_unit_meta_check.py` (`cl`: `27 cases, 7/7 mutations killed`) passed - Commands: ```text cmake --build --preset dev --target list_copy_texture_unit_check list_copy_texture_unit_decode_bound_mut list_copy_texture_unit_box_end_align_mut list_copy_texture_unit_partial_msaa_mut list_copy_texture_unit_pitch_align_mut list_copy_texture_unit_offset_align_mut list_copy_texture_unit_slice_rows_height_mut list_copy_texture_unit_footprint_bound_mut ctest --preset dev --no-tests=error -j16 -R "^list_copy_texture_unit" --output-on-failure cmake --build --preset release --target list_copy_texture_unit_check list_copy_texture_unit_decode_bound_mut list_copy_texture_unit_box_end_align_mut list_copy_texture_unit_partial_msaa_mut list_copy_texture_unit_pitch_align_mut list_copy_texture_unit_offset_align_mut list_copy_texture_unit_slice_rows_height_mut list_copy_texture_unit_footprint_bound_mut ctest --preset release --no-tests=error -j16 -R "^list_copy_texture_unit" --output-on-failure ``` - Results: `dev` 35/35 passed (1.35s); `release` 35/35 passed (1.17s); direct `list_copy_texture_unit_check.exe` (`dev` & `release`): `PASS: list_copy_texture_unit: 27/27 cases passed`. AI-assisted.
Refs #1149.

Standalone portable C++17 unit + 1:1 header-mutation tests for
x2w_list_copy_texture (src/startup_stubs/list_copy_texture.h):
decode_subresource, checked_mul/checked_add at the UINT64_MAX
boundary, footprint_end (zero dims, unpadded last row, 4x4
block-compressed rounding, s.height slice pitch, over_pitch,
overflow), and check() + name() over all 14 Verdict values.
7 WILL_FAIL TRUE CMake header-mutation controls, mirrored 1:1
in the meta check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 16:29:58 +00:00
github-bot changed target branch from main to gh-pr/3757/base 2026-12-02 02:13:27 +00:00
github manually merged commit 7d1aa4a810 into gh-pr/3757/base 2026-12-02 02:13:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.