Title textures: what the CPU spends per texture before the GPU copy (numbers, and who does what) #449
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#449
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kalmarv on GitHub · 2026-11-24 00:28 UTC · original
Measurements only, no code of ours. Measured on
maina6f5f7a, release, one thread, Ryzen 9 9950X, synthetic textures only:a6f5f7aunchanged and its test passes here (gpu::tiling::: 12 passed, 0 failed). Thanks @gw1337x for posting it. After it a video plane detiles as fast as it is read, so threads or detiling on the GPU would buy little there.xg::Texture::newtakes about 0.3 ms whatever the texture's size, and CreatePlacedResourceX builds it twice (device_x.rs,title_textures::register). For a BC7 256² with mips that is 0.6 ms, against 0.04 ms of detile and 0.34 ms of upload. CachingLayout::from_bits, as @notdxbi describes in https://github.com/ivall/xcl/issues/175#issuecomment-7117736330, would remove most of it.maindetile_levelUpload path (
texture::upload_batch, RTX 5070 Ti, driver 610.74, idle GPU with free memory): a new allocator and list 0.08 ms; a new upload buffer 0.3 ms at 64 KiB, 0.6 ms at 1 MiB, 5.6 ms at 16 MiB; the CPU wait on an idle queue 0.003 ms. A BC7 256² with mips costs 0.34 ms in a batch of 512 and 0.62 ms as a batch of its own; a video frame (three R8 planes, 11.9 MiB) 6.8 ms. So on an idle GPU the per-texture cost is the upload buffer, and the long waits reported need video memory past the card, which this does not reproduce.Not tested: a retail title, AMD, more than one thread, a debug build, 3D textures (
detile_volumeis unchanged by the diff).🤖 Claude Fable 5.2
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@DarX-Oren on GitHub · 2026-11-24 01:51 UTC · original
Independent RDNA2 benchmark — RX 6700 XT
Environment:
508a0c7Five runs, 50 measured pairs, alternating upload order, with 64 identical BC7 textures per measurement.
Batching reduced median upload time by 69.4%.
Additional findings
Correctness was verified through GPU readback of all 5,594,112 bytes across 576 mip subresources after changing the source data.
I also tested a write-only Map hint, but it regressed batched performance in five of six paired runs, so I am not proposing a patch.
These are synthetic benchmark results, not measured in-game FPS improvements.
Benchmark source and raw logs are available if needed. Happy to investigate further RDNA2-specific performance issues.
AI use: OpenAI Codex (GPT-6) assisted with benchmark implementation, profiling and testing on physical hardware.