[bug] Described graphics pipelines that read title memory are refused, so the first draw of every frame is dropped #303
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by lewisenator on 2026-11-27T10:19:44Z.
What is wrong
render_piperefuses any graphics pipeline whose state isn't guessed if one of its shaders reads title memory through the page table:reads title memory through the page table in a graphics pipeline. But the render binding already gives the page table to every stage (Binding::memory), and guessed and described pipelines go through the samemake_render. As far as I can tell the gate has no technical reason to exist. It's incrates/victory-gpu/src/native/shaders.rs(unsupported,refusal).What it costs
One shader pair hits it: vertex
dfafaf38…, pixel06295fb1…. It's the first draw of each frame, from frame 2 on. The vertex shader takes a root descriptor's address, builds a buffer descriptor from it, reads an input-layout record, then fetches a float3 position and a float4 colour. The pixel shader writes the interpolated colour straight out.On
774540fthat wasno_pipeline=28431over 14,848 frames (8.4 minutes, M4 Max 128 GB, Series X, macOS 27.2). I get the same refusal onc1b9587. #246 has it too, on an M1 Max.What I don't know
Whether this draw matters for the picture. On
c1b9587the setup screens render with or without it, and I haven't found what the draw contributes. This is not a fix for #258.What I'm going to do
Remove the gate and the
memoryparameter that carried it. That's on a local branch, with a Metal test that draws the same shaders with a described state (it fails with the gate put back) and a section indocs/native-host.md. The x86_64 tests, the native tests, the Windows-target clippy andcargo xtask policypass.cargo test --workspacefailed once in the loader on the flaky test from #281. I'll open a draft PR once this is claimed.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by lewisenator on 2026-11-27T10:19:48Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T10:19:59Z.
Claimed by @lewisenator. Open a draft pull request with
Refs #303in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:32:05Z.
Thank you. This is the same pair I counted in the log of #258 (vertex
dfafaf38..., pixel06295fb1..., one refusal), so it shows on an M1 Max too.I do not know why the gate is there and I cannot tell you it has no reason. Before a pull request I would like three things: what the vertex shader's root descriptor points at (title memory read through the page table is the case the gate stops, so please say what the read does and how you know); a Metal test with values for that read through a described pipeline, not only that the draw is encoded; and what the draw puts on the screen, or that you could not tell. A draft pull request with those is welcome. Counts and ids only, no shader bytes. I have not run any of this.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T10:34:29Z.
The claim by @lewisenator has expired: no pull request referenced it within 24 hours. This issue is free to claim.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T11:26:15Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T11:26:30Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #303in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:48:05Z.
/release - done: PR #599 removes the gate in
crates/victory-gpu/src/native/shaders.rsthat this issue describes, and drops thememoryparameter that carried it, since the page table is bound for every stage anyway. Thedfafaf38/06295fb1pair that was dropped asno_pipelineon every frame now gets a host pipeline. It is in my fork'smain; the issue's open question (what the draw contributes to the picture) is still unanswered, so if that is the point, reopen the conversation rather than the claim.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T12:48:14Z.
Released. This issue is free to claim.