feat(d3d12_x): copy texture regions into a position inside a footprint #57

Manually merged
github merged 1 commit from gh-pr/57/head into gh-pr/57/base 2026-11-26 19:16:33 +00:00
Owner

@⁠Dark3581 on GitHub · 2026-11-22 23:48 UTC · original
Dark3581:feat/footprint-offsets → main · +41 −4 · 4 files · 1 commits · merged 2026-11-22 23:52 UTC

What

CopyTextureRegion with a footprint destination writes at DstX, DstY, DstZ inside the footprint; the recorder (#51) always wrote at its origin. CopyTextureToFootprint takes that position: the region is the source box, or the whole subresource without one (as D3D12 does), placed at the position, and a region running past the footprint is refused. CopyTextureToBuffer is now its zero-position case, so existing callers are unchanged. The pending recorder debt entry is updated.

Tested

Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer.

  • pso_probe commands-gpu --validate: the 16x16 green square copied into a 32x32 footprint at (4, 2) reads back at (4, 2) and (19, 17), the bytes around it keep their fill, a position that runs past the footprint and a whole 64x64 mip into the 32x32 footprint are refused; the 14 earlier checks still pass (16 checks, 0 validation errors). planes-gpu, draw-gpu and indirect-gpu still pass.
  • MinGW ctest: 66 of 66. The d3d12_x targets also build with MSVC 2022 (which caught a local named small, a rpcndr.h macro, in the test; renamed). python tools/check_conventions.py and debt_fold.py --check: ok.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • python tools/check_conventions.py passes (no comments in code, one declaration per export, Conventional Commit subjects)
  • Unimplemented paths stop (AbxNotImplemented / AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragment
  • Known gaps added, changed or removed through docs/dev/debt/changes/<branch>.md (the pending recorder entry updated)
  • Generic behaviour, not specific to one title
  • No game files, keys, notes or logs added to the repository
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • Source of behaviour: public D3D12 CopyTextureRegion documentation
  • AI-assisted: yes
**@⁠Dark3581** on GitHub · 2026-11-22 23:48 UTC · [original](https://github.com/Dark3581/AnyBox/pull/57) `Dark3581:feat/footprint-offsets` → `main` · +41 −4 · 4 files · 1 commits · merged 2026-11-22 23:52 UTC ### What `CopyTextureRegion` with a footprint destination writes at `DstX`, `DstY`, `DstZ` inside the footprint; the recorder (#51) always wrote at its origin. `CopyTextureToFootprint` takes that position: the region is the source box, or the whole subresource without one (as D3D12 does), placed at the position, and a region running past the footprint is refused. `CopyTextureToBuffer` is now its zero-position case, so existing callers are unchanged. The pending recorder debt entry is updated. ### Tested Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer. - `pso_probe commands-gpu --validate`: the 16x16 green square copied into a 32x32 footprint at (4, 2) reads back at (4, 2) and (19, 17), the bytes around it keep their fill, a position that runs past the footprint and a whole 64x64 mip into the 32x32 footprint are refused; the 14 earlier checks still pass (16 checks, 0 validation errors). `planes-gpu`, `draw-gpu` and `indirect-gpu` still pass. - MinGW `ctest`: 66 of 66. The `d3d12_x` targets also build with MSVC 2022 (which caught a local named `small`, a `rpcndr.h` macro, in the test; renamed). `python tools/check_conventions.py` and `debt_fold.py --check`: ok. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] `python tools/check_conventions.py` passes (no comments in code, one declaration per export, Conventional Commit subjects) - [x] Unimplemented paths stop (`AbxNotImplemented` / `AbxUnsupported`); silent stubs are listed under Silent stubs through a debt fragment - [x] Known gaps added, changed or removed through `docs/dev/debt/changes/<branch>.md` (the pending recorder entry updated) - [x] Generic behaviour, not specific to one title - [x] No game files, keys, notes or logs added to the repository - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] Source of behaviour: public D3D12 `CopyTextureRegion` documentation - [x] AI-assisted: yes
CopyTextureToFootprint writes a texture region (a box, or the whole subresource without one) at a given position inside a placed footprint, as CopyTextureRegion's destination offsets do, and refuses regions that run past the footprint; CopyTextureToBuffer is its zero-offset case. The commands GPU test reads a square back at an offset and checks the footprint around it is untouched.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:16:32 +00:00
github manually merged commit e4f794fc6c into gh-pr/57/base 2026-11-26 19:16:33 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.