Bind a rest pipeline in place of a mesh pipeline before other work on Intel (Arc) #450
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/450"
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?
Imported from TaynanGT/Vice-Tay. Originally posted by Kal0s-design on 2026-11-29T17:13:23Z.
Refs #448. Draft.
Update: the default on Intel is now
draw(third commit,84462d6). The #448 reporter ran the same build, launcher, home and caches with onlyVICTORY_MESH_RESTchanged. Withbindthe device was lost after 280 s. Withdrawthe run lasted 852 s with no device removal, until the title was suspended and closed, and the heavy-scene median went from 2.8 to 3.7 fps. A second run meant aslazyactually ran withdraw(its log saysmode=Drawthroughout) and hung at 639 s (0x887A0006). Sodrawis 852 s and 639 s against 280 s forbindand 82-151 s without the rest pipeline: the best default so far, but not a complete fix. A reallazyrun (startupmode=Lazy) lost the host at 216 s with 6,550 rests a frame for 6,551 mesh binds: the title's mesh dispatches almost never follow one another with nothing between them, solazyspares next to no rests. It stays opt-in (7284911puts all four runs in the module doc). Order on that card:draw639-852 s >bind280 s >lazy216 s > no rest pipeline 82-151 s.bindstays available, andlazynow draws the point too.First result on an Arc B580, from the #448 reporter (driver 32.0.101.9175, same profile as their earlier runs): the run lasted 280 s against 82-151 s before, with no mesh-pipeline refusals and no
0x8007000e. The log showedVICTORY_MESH_REST=Bindbinding a rest pipeline for each mesh pipeline bound, about 2,100 a frame and up to 8,186. It ended right after a cold 7.2 s pipeline creation, the separate cause noted in #448. Whether the rests cost frames still needs a same-scene comparison.A port of gilmarcs' workaround from trustno1-coder/VIctory-NVIDIA #546 (merged there, for their #227), with gilmarcs as co-author. Their finding: on an Arc B580 (driver 32.0.101.9175), a mesh pipeline left bound on a command list while copies, clears, dispatches or barriers are recorded after it hangs the GPU (
DXGI_ERROR_DEVICE_HUNG). The pipeline's contents don't matter, and binding is enough. Three B580 owners reported it fixed the hang on that tree.What it does. A tiny vertex-only "rest" pipeline with an empty root signature (
mesh_rest.rs, taken from #546 nearly as is) is bound in place of a mesh pipeline before other work is recorded.VICTORY_MESH_REST=off|bind|draw|lazy: the default is nowdrawon an Intel adapter (wasbind, see the update above) andoffeverywhere else, so NVIDIA and AMD record exactly the commands they did, and the new log line appears only with the mode on.Adapted to this tree, which has no central
title_call:with_stateleaves the mesh pipeline before draws, dispatches and indirect executions, as upstream'shost_list/title_calldoes, so what a draw records before its bind (refresh copies, uploads) goes past no mesh pipeline. A newworking_listdoes the same for the calls that record work directly: copies, clears, barriers, sync, value writes, waits.with_set_stateand keep the mesh pipeline bound, like upstream'swith_set_state/with_binding. I checked that none of those setters records anything onto the host list.external::record(upstream has no such path), and when a host list closes.Second commit:
VICTORY_MESH_REST=lazy(opt-in, never the default), for a frame-rate A/B. Withbind, the leave at the start of every draw and dispatch includes the next mesh dispatch, so each mesh dispatch binds its pipeline again. That's why the #448 log shows as many rests as mesh binds.lazy(which since the third commit also draws the rest's point) sends the two mesh-dispatch calls throughwith_set_state, so a mesh pipeline stays bound from one mesh dispatch to the next, and the draw state doesn't bind it again. Everything else still leaves it, as withbind. The cost: what a mesh dispatch records before its bind then goes past the previous mesh pipeline. In every mode, what it records after its own bind (refresh of its vertex data, its tables, the moves of its targets to the render-target state) already goes past its own mesh pipeline. The module doc now says this, and drops its earlier claim that a run of mesh dispatches keeps one bind, which wasn't true forbindordraw. Untested on an Arc card.cargo test -p victory-gpu --libpasses with=lazy(530), the default suite (530) and--all-features -- --test-threads=1(597) pass, and clippy with and without--all-featuresis clean.Checked here (an NVIDIA card, so only off by default, or forced on):
cargo test -p victory-gpu --libpasses withVICTORY_MESH_RESTunset,=bindand=draw(529 each, two new). With=bind,--all-features -- --test-threads=1also passes. The newa_bound_mesh_pipeline_is_left_oncechecks that a rest is recorded once per bound mesh pipeline (closing included) and never with the mode off.rest_pipeline_binds_draws_and_runsbuilds, draws and runs the rest pipeline on the device.--all-features, andcargo xtask policy: clean.victory-hleandvictorytests pass.cfd5ebd), where the gpu tests pass with the mode off and on (557).Not covered: no unit test binds a title mesh pipeline, so the draw-path rests are only exercised in the game. Per #448's own runs, an unbind removed the mesh-pipeline refusals but not the later device removal, so this is expected to help with the hang, not the whole #448 regression.
AI-assisted: yes
🤖 Generated with Claude Code
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T19:09:14Z.
Thanks for retaining the upstream credit and separating the modes. The two draw runs support further Intel-only testing, but not a stability claim. Keep lazy opt-in and the non-Intel path unchanged. The next matched Arc test should verify effective mode, device-removal timing, pipeline creation, upload backlog and rendered frame times before promoting the workaround.
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:06:13Z.
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed