Skip to content

GPU: optional parallel detiling of large 2D subresources - #271

Open
fffluffy-dev wants to merge 1 commit into
fxceless:mainfrom
fffluffy-dev:gpu/parallel-detile
Open

fffluffy-dev wants to merge 1 commit into
fxceless:mainfrom
fffluffy-dev:gpu/parallel-detile

Conversation

@fffluffy-dev

Copy link
Copy Markdown

VICTORY_TEXTURE_DETILE_WORKERS=2..4 (off by default) splits tiled 2D subresources of 4 MiB or more into row bands on scoped threads; output is byte-identical (odd mips, array slices, the last unpadded row; new test parallel_detile_preserves_odd_mips_and_the_last_unpadded_row). Synthetic CPU timings: 16 MiB BC7 1.45 → 0.40 ms, RGBA8 2.19 → 0.53 ms, 64 MiB RGBA8 9.28 → 6.21 ms. Detile time is reported on the texture refresh line.

Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): victory-gpu 111 passed, 1 ignored; victory-formats 24-25 passed; cargo clippy --workspace --all-targets -D warnings clean with and without --all-features; cargo xtask policy ok. Not measured on a real frame.

AI use: written with Codex and Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kaayzouee

Copy link
Copy Markdown

Duplicate of #92?

triippywhale pushed a commit to triippywhale/victory-fork that referenced this pull request Nov 25, 2026
…VICTORY_ASYNC_SUBMIT=1, off by default; port of fxceless f85101b)

The title's render thread spends most of a frame inside execute: the
copies of title memory, the write watch, descriptors, textures, and
waiting for flights. With the switch a submission's lists are taken from
the title's lists and put behind the queue's line, and one thread of ours
(victory-submit) runs the lines in order; the line stays open while its
head is prepared (Held::Running), so signals and later submissions go
behind it. A present and our own waited-for submissions run the line
first (before_sync). Up to 512 idle host lists are kept with it.

Needs flights and lists cut at their waits (both defaults). Nothing
changes without the switch. fxceless measured it as part of 3.5-4 -> 6-7
frames a second on an RTX 4070; PalmVIDev fxceless#271 runs it by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017V7WBBU55HJVgqSgZRhMqc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants