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

Merged
ReverendOzmund merged 1 commit from upstream-pr/217 into main 2026-11-26 11:19:35 +00:00
ReverendOzmund commented 2026-11-26 08:57:58 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-26T08:57:58Z.


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

<!-- greyfinch-sync:brcly/TuxBox:issue:6623071530 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/217). Originally posted by [ReverendOzmund](https://github.com/ReverendOzmund) on 2026-11-26T08:57:58Z. --- 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
NickStallman commented 2026-11-26 09:26:12 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-26T09:26:12Z.


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
<!-- greyfinch-sync:brcly/TuxBox:comment:7187985911 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/217#issuecomment-7187985911). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-26T09:26:12Z. --- 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 ```
ReverendOzmund commented 2026-11-26 09:28:10 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-26T09:28:10Z.


edited the above post

<!-- greyfinch-sync:brcly/TuxBox:comment:7188031787 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/217#issuecomment-7188031787). Originally posted by [ReverendOzmund](https://github.com/ReverendOzmund) on 2026-11-26T09:28:10Z. --- edited the above post
ReverendOzmund commented 2026-11-26 09:29:14 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-26T09:29:14Z.


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.

<!-- greyfinch-sync:brcly/TuxBox:comment:7188055699 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/217#issuecomment-7188055699). Originally posted by [ReverendOzmund](https://github.com/ReverendOzmund) on 2026-11-26T09:29:14Z. --- 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.
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
brcly/TuxBox!217
No description provided.