GPU: count one alias-seed subresource per Texture3D mip #2862

Open
ghptc wants to merge 1 commit from upstream-pr/2862 into main
ghptc commented 2026-11-29 18:17:49 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-29T18:17:49Z.


Problem

seed_pending treated DepthOrArraySize as an array layer count for every texture. A 3D texture has one subresource per mip in this copy path. Its depth slices are part of that mip's footprint. The alias seed could therefore plan CopyTextureRegion with out-of-range subresource indices.

Change

Use one layer for a TEXTURE3D alias seed. Keep the full footprint depth and existing 2D array indexing. Reject mismatched dimensions and depth or layer counts, or a destination with more mips, before requesting footprints.

The change is limited to the placed-alias seed path introduced by #1504. The mip-only count follows the same 3D rule used in the separate readback work in #876.

Verification

  • In the CPU planning fixture, the 13 × 9 × 3 volume originally proposed six pairs, four out of range. The corrected plan copied one pair per destination mip, preserving all 1,500 generated bytes and padding. The 2D array control preserved all 672 bytes in both arms.
  • A separate RTX 5070 fixture checked 60 states and independently verified 412,560 bytes across array and volume cases, including format reinterpretation. All 60 slice images were distinct. The 60 GPU copy timestamps had a median of 14.272 µs and a nearest-rank p95 of 14.304 µs.
  • The corresponding baseline plan had 12 invalid pairs out of 15 and was rejected on the CPU. Invalid copy indices were kept out of driver submissions.

The fixtures use generated data. The copy timings describe the corrected fixture, with no baseline GPU timing comparison or attribution to retail scene artifacts.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5553663285 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2862). Originally posted by [ghptc](https://github.com/ghptc) on 2026-11-29T18:17:49Z. --- ## Problem `seed_pending` treated `DepthOrArraySize` as an array layer count for every texture. A 3D texture has one subresource per mip in this copy path. Its depth slices are part of that mip's footprint. The alias seed could therefore plan `CopyTextureRegion` with out-of-range subresource indices. ## Change Use one layer for a `TEXTURE3D` alias seed. Keep the full footprint depth and existing 2D array indexing. Reject mismatched dimensions and depth or layer counts, or a destination with more mips, before requesting footprints. The change is limited to the placed-alias seed path introduced by #1504. The mip-only count follows the same 3D rule used in the separate readback work in #876. ## Verification - In the CPU planning fixture, the 13 × 9 × 3 volume originally proposed six pairs, four out of range. The corrected plan copied one pair per destination mip, preserving all 1,500 generated bytes and padding. The 2D array control preserved all 672 bytes in both arms. - A separate RTX 5070 fixture checked 60 states and independently verified 412,560 bytes across array and volume cases, including format reinterpretation. All 60 slice images were distinct. The 60 GPU copy timestamps had a median of 14.272 µs and a nearest-rank p95 of 14.304 µs. - The corresponding baseline plan had 12 invalid pairs out of 15 and was rejected on the CPU. Invalid copy indices were kept out of driver submissions. The fixtures use generated data. The copy timings describe the corrected fixture, with no baseline GPU timing comparison or attribution to retail scene artifacts.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2862:upstream-pr/2862'
git switch 'upstream-pr/2862'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2862'
git switch 'upstream-pr/2862'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2862'
git switch 'upstream-pr/2862'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2862'
git switch 'main'
git merge --squash 'upstream-pr/2862'
git switch 'main'
git merge --ff-only 'upstream-pr/2862'
git switch 'main'
git merge 'upstream-pr/2862'
git push origin 'main'
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
trustno1-coder/VIctory-NVIDIA!2862
No description provided.