d3d12: accept slot 62 copies of textures padded to a whole tile #217

Manually merged
github merged 1 commit from github-bot/gh-217 into main 2026-11-26 11:23:33 +00:00 AGit
Owner

@⁠ReverendOzmund on GitHub · 2026-11-26 08:57 UTC · original
ReverendOzmund:d3d12-slot62-tile-padded → main · +28 −3 · 2 files · 1 commits · merged 2026-11-26 11:19 UTC

ProjectScarlett copies 0x4000 bytes for a 128x4 RGBA16 texture whose 0x1000-byte footprint is padded to a 16-row tile. plan() allowed at most one footprint of tail, so the copy failed and the graphics command list was rejected. Accept whole rows up to the next 64-row tile height and copy only the footprint, as before.

Summary

Seen during a cold ProjectScarlett load (bc4ba79, RTX 3080 Ti, driver 620.70.06, GE-Proton11-14):

command list cannot record slot 62 texture 128x4x1 format=11 mips=1 offset=0x0 bytes=0x4000 total=0x1000 [#0 off=0x0 span=0x1000 pitch=1024]
command list failed 0x80070057 (#1) in the command at runtime/d3d12/src/commands/copy_memory.rs:417
graphics command list Close rejected 0x80070057 (#1, ...)

This is the same texture 97b8ad3 accepts at 0x2000 bytes. Here its height is padded to a 16-row tile (64-bit texels in a 4 KiB tile are 32x16). plan now also accepts a single-subresource copy that is whole rows of the footprint's pitch, up to the next multiple of 64 rows (the tallest 4 KiB tile). Only the footprint is copied. Partial rows and anything taller are still rejected.

Verified on Lanes

  • python tuxbox.py verify passed on this branch: Bazzite has no lld-link on the host, so I built in a Fedora distrobox and ran the GPU suites on the host in a separate prefix (summary below)
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below

No Lanes scenario: plan is pure layout arithmetic. The new unit test tile_padded_single_subresource_uploads_its_footprint fails without the change, which matches how 97b8ad3 covered the 0x2000 case.

GPU, driver and backend: RTX 3080 Ti, 620.70.06, GE-Proton11-14, Bazzite.

  • This changes code both vendors run, and the check passed on an AMD and an NVIDIA card: NVIDIA above; AMD run by NickStallman in the comments (Ryzen 9 9950X iGPU, RADV, GE-Proton11-14). Everything passed except 5 guest-present screen-sampling gates that fail the same way on main on that host.

Paste the summary printed at the end:

69/70 passed (GE-Proton11-14, RTX 3080 Ti, 620.70.06). route-RRRRDD timed out after 15 s
while a game was compiling shaders on the same machine, and passed on a rerun of the cpu group:

PASS  route-RRRRDD
PASS  route-LDDRRRR
PASS  invalid-route

From the full run:
PASS  lanes-selftest-copy-memory
PASS  lanes-selftest-shared-texture
PASS  lanes-selftest-texture-readback
PASS  lanes-selftest-labels
PASS  lanes-selftest-cross-queue
PASS  lanes-benchmark
PASS  lanes-shader-cache-prepared
PASS  lanes-shader-cache-compiled
PASS  lanes-shader-cache-reused
PASS  lanes-raster-tables
PASS  cpu-replay

🤖 Generated with Claude Code

https://claude.ai/code/session_01KP1nQKEc17PvmrwfPtLi8Z

**@⁠ReverendOzmund** on GitHub · 2026-11-26 08:57 UTC · [original](https://github.com/brcly/TuxBox/pull/217) `ReverendOzmund:d3d12-slot62-tile-padded` → `main` · +28 −3 · 2 files · 1 commits · merged 2026-11-26 11:19 UTC ProjectScarlett copies 0x4000 bytes for a 128x4 RGBA16 texture whose 0x1000-byte footprint is padded to a 16-row tile. plan() allowed at most one footprint of tail, so the copy failed and the graphics command list was rejected. Accept whole rows up to the next 64-row tile height and copy only the footprint, as before. ## Summary Seen during a cold ProjectScarlett load (bc4ba79, RTX 3080 Ti, driver 620.70.06, GE-Proton11-14): command list cannot record slot 62 texture 128x4x1 format=11 mips=1 offset=0x0 bytes=0x4000 total=0x1000 [#0 off=0x0 span=0x1000 pitch=1024] command list failed 0x80070057 (#1) in the command at runtime/d3d12/src/commands/copy_memory.rs:417 graphics command list Close rejected 0x80070057 (#1, ...) This is the same texture 97b8ad3 accepts at 0x2000 bytes. Here its height is padded to a 16-row tile (64-bit texels in a 4 KiB tile are 32x16). `plan` now also accepts a single-subresource copy that is whole rows of the footprint's pitch, up to the next multiple of 64 rows (the tallest 4 KiB tile). Only the footprint is copied. Partial rows and anything taller are still rejected. ## Verified on Lanes - [x] `python tuxbox.py verify` passed on this branch: Bazzite has no lld-link on the host, so I built in a Fedora distrobox and ran the GPU suites on the host in a separate prefix (summary below) - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below No Lanes scenario: `plan` is pure layout arithmetic. The new unit test `tile_padded_single_subresource_uploads_its_footprint` fails without the change, which matches how 97b8ad3 covered the 0x2000 case. GPU, driver and backend: RTX 3080 Ti, 620.70.06, GE-Proton11-14, Bazzite. - [x] This changes code both vendors run, and the check passed on an AMD and an NVIDIA card: NVIDIA above; AMD run by NickStallman in the comments (Ryzen 9 9950X iGPU, RADV, GE-Proton11-14). Everything passed except 5 guest-present screen-sampling gates that fail the same way on main on that host. Paste the summary printed at the end: 69/70 passed (GE-Proton11-14, RTX 3080 Ti, 620.70.06). route-RRRRDD timed out after 15 s while a game was compiling shaders on the same machine, and passed on a rerun of the cpu group: PASS route-RRRRDD PASS route-LDDRRRR PASS invalid-route From the full run: PASS lanes-selftest-copy-memory PASS lanes-selftest-shared-texture PASS lanes-selftest-texture-readback PASS lanes-selftest-labels PASS lanes-selftest-cross-queue PASS lanes-benchmark PASS lanes-shader-cache-prepared PASS lanes-shader-cache-compiled PASS lanes-shader-cache-reused PASS lanes-raster-tables PASS cpu-replay 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KP1nQKEc17PvmrwfPtLi8Z
ProjectScarlett copies 0x4000 bytes for a 128x4 RGBA16 texture whose
0x1000-byte footprint is padded to a 16-row tile. plan() allowed at most
one footprint of tail, so the copy failed and the graphics command list
was rejected. Accept whole rows up to the next 64-row tile height and
copy only the footprint, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KP1nQKEc17PvmrwfPtLi8Z
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:00:32 +00:00
Author
Owner

@⁠NickStallman on GitHub · 2026-11-26 09:26 UTC · original

AMD run of python tuxbox.py check on this PR's head (12ddd28):

  • GPU: AMD Raphael iGPU of a Ryzen 9 9950X (1002:13c0, RADV RAPHAEL_MENDOCINO), Mesa 26.0.8, GE-Proton11-14, Linux 7.0.0.
  • Every group passed except "Lanes and fixtures on the GPU": 95 gates passed and 5 failed. The 5 are guest-present, guest-present-rgb10, guest-present-4k-owned, guest-present-4k-oversized and guest-present-4k-fit.
  • Those 5 fail the same way on main and on every other branch I've run on this machine. They come from how this host samples the screen, so they aren't caused by this change.
  • D3D12 regression controls and the shader translator on the GPU both passed.
  passed   Build the shader compiler
  passed   Python tests
  passed   Shader compiler tests
  passed   DXBC tests
  passed   XG layout tests
  passed   D3D12 Windows typecheck
  passed   Build
  FAILED   Lanes and fixtures on the GPU   (only the 5 guest-present gates above)
  passed   D3D12 regression controls
  passed   Shader translator on the GPU
**@⁠NickStallman** on GitHub · 2026-11-26 09:26 UTC · [original](https://github.com/brcly/TuxBox/pull/217#issuecomment-7187985911) AMD run of `python tuxbox.py check` on this PR's head (`12ddd28`): - GPU: AMD Raphael iGPU of a Ryzen 9 9950X (1002:13c0, RADV RAPHAEL_MENDOCINO), Mesa 26.0.8, GE-Proton11-14, Linux 7.0.0. - Every group passed except "Lanes and fixtures on the GPU": 95 gates passed and 5 failed. The 5 are `guest-present`, `guest-present-rgb10`, `guest-present-4k-owned`, `guest-present-4k-oversized` and `guest-present-4k-fit`. - Those 5 fail the same way on `main` and on every other branch I've run on this machine. They come from how this host samples the screen, so they aren't caused by this change. - D3D12 regression controls and the shader translator on the GPU both passed. ``` passed Build the shader compiler passed Python tests passed Shader compiler tests passed DXBC tests passed XG layout tests passed D3D12 Windows typecheck passed Build FAILED Lanes and fixtures on the GPU (only the 5 guest-present gates above) passed D3D12 regression controls passed Shader translator on the GPU ```
Author
Owner

@⁠ReverendOzmund on GitHub · 2026-11-26 09:28 UTC · original

edited the above post

**@⁠ReverendOzmund** on GitHub · 2026-11-26 09:28 UTC · [original](https://github.com/brcly/TuxBox/pull/217#issuecomment-7188031787) edited the above post
Author
Owner

@⁠ReverendOzmund on GitHub · 2026-11-26 09:29 UTC · original

Thanks NickStallman, that covers AMD. I've updated the checklist. Also, I've seen #215: same +0x23CF683 crash here on a 3080 Ti at mission 0x98c85f2a, so I'll add my data there and I'm happy to test the label-bridging work on Ampere.

**@⁠ReverendOzmund** on GitHub · 2026-11-26 09:29 UTC · [original](https://github.com/brcly/TuxBox/pull/217#issuecomment-7188055699) Thanks NickStallman, that covers AMD. I've updated the checklist. Also, I've seen #215: same +0x23CF683 crash here on a 3080 Ti at mission 0x98c85f2a, so I'll add my data there and I'm happy to test the label-bridging work on Ampere.
github manually merged commit 771a4e5b45 into main 2026-11-26 11:23:33 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.