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

Open
github-bot wants to merge 1 commit from github-bot/gh-217 into main AGit
Owner

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

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; 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. Otherwise, say which vendor still needs to run it: AMD still needs to run it.

Paste the summary printed at the end:

<will be filled when ready>

🤖 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 · open 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; 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. - [ ] This changes code both vendors run, and the check passed on an AMD and an NVIDIA card. Otherwise, say which vendor still needs to run it: **AMD still needs to run it.** Paste the summary printed at the end: <will be filled when ready> 🤖 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
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/217/head:github-bot/gh-217'
git switch 'github-bot/gh-217'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-217'
git switch 'github-bot/gh-217'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-217'
git switch 'github-bot/gh-217'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-217'
git switch 'main'
git merge --squash 'github-bot/gh-217'
git switch 'main'
git merge --ff-only 'github-bot/gh-217'
git switch 'main'
git merge 'github-bot/gh-217'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.