Skip to content

Texture copies the host does not take are left out instead of ending the run (0x80070057) - #3678

Closed
paales wants to merge 1 commit into
trustno1-coder:mainfrom
paales:copy-fits
Closed

paales wants to merge 1 commit into
trustno1-coder:mainfrom
paales:copy-fits

Conversation

@paales

@paales paales commented Nov 30, 2026 •

Copy link
Copy Markdown

Written by 🤖:

What it changes

copy_texture_region records the title's texture-to-texture copy as it is. When the host does not take that copy, the list it is in fails to close (a host command list did not close (0x80070057)) and the run ends (#2276, #2778).

Now copy_fits checks such a copy first: both subresources are there (levels, layers and planes), an element is as many bytes on both sides, and the source box (or the whole source subresource) lies in the source and fits the destination level at its place, counted in blocks where one side is block-compressed. A copy that does not fit is left out and logged (a texture copy the host does not take is left out, the first 8, then at powers of two), with both sides' size, format, levels and subresource. unlike (a stand-in target on one side) stays as it is; this covers the other cases.

Why this copy: a diagnostics build that lists the last commands of a list that does not close (a local change, with VICTORY_D3D12_DRED=1) showed, in one of these crashes, a list of 9 copies and nothing else, all into one 256x256 BC3 texture from one source texture, without a box. In other runs the title's decoration bake copies the levels of such a texture this way: levels 0 to 6 from a 64x64 R32G32B32A32_UINT texture of 7 levels, levels 7 and 8 from a 1x1 one. A copy of level 7 or 8 from the 64x64 texture names a subresource that is not there; a copy from a larger source does not fit the level. Both are copies the host does not take.

How it was tested

  • GPU and profile: RTX 5070 Ti 16 GB, 32 GB RAM, Windows 11; Series X 2560x1440, DLSS Performance, DLSS frame generation 2X, ray tracing off, VICTORY_TEXSPK_PASS_MS=48; the intro cutscene with replayed input, through the cut to the boat.
  • Before: the crash came in about 1 of 3 runs with this profile (3 crashes in 11 runs on v2026.11.29.04 with Soft views: DirectStorage reads into memory the title mapped write through the section's view #3553 and on main).
  • After: 4 runs, no crash, and no copy left out. So these runs show that the check refuses no copy the title needs; they do not yet show a copy it refuses. Not confirmed: that the copy above is the one the runtime refused. The list held only copies, so one of them (or a barrier the layer put in for them) was the invalid command.
  • For shader changes, the wave sizes tested: no shader change.
  • cargo test passed for the crates it touches: cargo test -p victory-gpu --lib copies_the_host, a new test with the bake's copies (taken and refused) and boxes. cargo clippy -p victory-gpu --all-targets: nothing in the changed lines.

Checked for overlap

Result: not the cause

A run of v2026.11.29.04 with #3553 and this change, VICTORY_TEXSPK_PASS_MS=24, HDR on, still ended with the same error, and no copy was left out. So the command the runtime refused is not one of these copies. The check refuses no copy the title needs (5 runs), but it does not fix this crash, so this pull request is closed.

…le's texture-to-texture copies are checked against both subresources and the destination level, and one that does not fit is left out and logged.
@github-actions github-actions Bot added the pr-fix Pull request: fixes a bug label Nov 30, 2026
@github-actions github-actions Bot changed the title [pr-fix] Texture copies the host does not take are left out instead of ending the run (0x80070057) Texture copies the host does not take are left out instead of ending the run (0x80070057) Nov 30, 2026
@paales paales closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull request: fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant