Linux/Proton: stretched character meshes (a queue-serialization test did not explain them; correction inside) #1301

Open
opened 2026-11-26 13:14:19 +00:00 by github-bot · 2 comments
Owner

@⁠YaBulochka on GitHub · 2026-11-26 13:12 UTC · original

A controlled comparison on one machine: the stretched character meshes are there with the title's two queues and gone when everything goes through one Vulkan queue. Recorded here because it narrows the search to a cross-queue hazard, which no open PR covers.

Environment

Retail 1.0.2.1, Xbox Series profile, RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton from master, a fork of the Series S line with local switches. Microsoft's d3dcompiler_47.dll in the prefix, so no shader of ours is built by DXC (with DXC the picture had rectangular patches of another surface; those are gone and are a different defect).

The observation

Same save, same scene, the camera standing still. "Mesh stretching" is what I mean: a part of a character or of a doorway surface is drawn as triangles reaching far past their bounds, stable in place while the camera holds, changing only when new content streams in.

configuration frame stretched meshes
VICTORY_RELAY=2, VICTORY_TEXTURE_NO_WAIT=1 (the fast one) 65-92 ms, 15-16 fps at times yes
VICTORY_RELAY=0, VICTORY_TEXTURE_NO_WAIT=0 65-92 ms, 15-16 fps at times yes
VKD3D_CONFIG=...,single_queue (same flags as above) 350-390 ms, 2.5-4 fps, 273 ms of it on the GPU no

So the relay thread and the kernel-read texture refresh are not it: with both off the artifact stays. What removes it is serializing the title's graphics and compute work into one Vulkan queue. The price is the whole overlap between the layer's copies and the card's work (the GPU time the frame line reports goes from 0.0 to 273 ms).

What else was ruled out before this

  • The 9-bit mesh index mask (primitive_export_indices_drop_the_edge_flags is in our tree) and the helper-lane v_readfirstlane fix (VICTORY_HELPER_OWN) — both present, artifact unchanged.
  • VICTORY_PAGE_WRITES=slots, placed-texture keys, placed alias sources, the decoration bake queue, LEVELS_ON_DEMAND=0, a 12 GB texture budget, a 16 GB budget, VICTORY_TEXTURE_ROOM_PERCENT=95, VICTORY_WINDOWS_BAR_MB=768 (vkd3d answers "UPLOAD_HEAP will not use ReBar memory"), mip dropping, a render scale of 0.5.
  • RenderDoc: capturing the frame crashes with device removed 0x887A0005 after 17 submissions sent ahead; with VICTORY_RELAY=0 and single_queue it survives but the capture runs out of memory. That is why this is a report and not a capture.

Why it points at the queues

The scene's skins, cloth and meshlet culling are computed on a compute queue and read by graphics afterwards; a missing wait between the two leaves vertices from a previous/other buffer. It also explains the shape of the defect: a part of one mesh, stable while nothing new arrives.

Nearest existing work and why it is not this:

  • #197 (avatar): writes barriers into the title's own code — the right mechanism, but experimental and not yet run with the title.
  • #3170 (Marvisak): syncs aliased texture sources before copy commands — the same class for texture aliasing, not for queue-to-queue waits.
  • #1291: traces texture bindings and upload fences for one draw — diagnostics that would help here.

What would settle it

At a breakpoint on the compute queue's submission: does the title wait on a fence before the graphics queue reads those buffers, and does the layer's emulation of that wait reach the card? Or, with a working capture, the draw that stretches and the resource it reads.

Numbers and names only; no game files, captures or logs.

**@⁠YaBulochka** on GitHub · 2026-11-26 13:12 UTC · [original](https://github.com/fxceless/victory-fork/issues/1301) A controlled comparison on one machine: the stretched character meshes are there with the title's two queues and gone when everything goes through one Vulkan queue. Recorded here because it narrows the search to a cross-queue hazard, which no open PR covers. ## Environment Retail 1.0.2.1, Xbox Series profile, RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton from master, a fork of the Series S line with local switches. Microsoft's `d3dcompiler_47.dll` in the prefix, so no shader of ours is built by DXC (with DXC the picture had *rectangular* patches of another surface; those are gone and are a different defect). ## The observation Same save, same scene, the camera standing still. "Mesh stretching" is what I mean: a part of a character or of a doorway surface is drawn as triangles reaching far past their bounds, stable in place while the camera holds, changing only when new content streams in. | configuration | frame | stretched meshes | |---|---|---| | `VICTORY_RELAY=2`, `VICTORY_TEXTURE_NO_WAIT=1` (the fast one) | 65-92 ms, 15-16 fps at times | **yes** | | `VICTORY_RELAY=0`, `VICTORY_TEXTURE_NO_WAIT=0` | 65-92 ms, 15-16 fps at times | **yes** | | `VKD3D_CONFIG=...,single_queue` (same flags as above) | 350-390 ms, 2.5-4 fps, **273 ms of it on the GPU** | **no** | So the relay thread and the kernel-read texture refresh are not it: with both off the artifact stays. What removes it is serializing the title's graphics and compute work into one Vulkan queue. The price is the whole overlap between the layer's copies and the card's work (the GPU time the frame line reports goes from 0.0 to 273 ms). ## What else was ruled out before this - The 9-bit mesh index mask (`primitive_export_indices_drop_the_edge_flags` is in our tree) and the helper-lane `v_readfirstlane` fix (`VICTORY_HELPER_OWN`) — both present, artifact unchanged. - `VICTORY_PAGE_WRITES=slots`, placed-texture keys, placed alias sources, the decoration bake queue, `LEVELS_ON_DEMAND=0`, a 12 GB texture budget, a 16 GB budget, `VICTORY_TEXTURE_ROOM_PERCENT=95`, `VICTORY_WINDOWS_BAR_MB=768` (vkd3d answers "UPLOAD_HEAP will not use ReBar memory"), mip dropping, a render scale of 0.5. - RenderDoc: capturing the frame crashes with `device removed 0x887A0005` after 17 submissions sent ahead; with `VICTORY_RELAY=0` and `single_queue` it survives but the capture runs out of memory. That is why this is a report and not a capture. ## Why it points at the queues The scene's skins, cloth and meshlet culling are computed on a compute queue and read by graphics afterwards; a missing wait between the two leaves vertices from a previous/other buffer. It also explains the shape of the defect: a *part* of one mesh, stable while nothing new arrives. Nearest existing work and why it is not this: - #197 (`avatar`): writes barriers into the title's own code — the right mechanism, but experimental and not yet run with the title. - #3170 (`Marvisak`): syncs aliased *texture* sources before copy commands — the same class for texture aliasing, not for queue-to-queue waits. - #1291: traces texture bindings and upload fences for one draw — diagnostics that would help here. ## What would settle it At a breakpoint on the compute queue's submission: does the title wait on a fence before the graphics queue reads those buffers, and does the layer's emulation of that wait reach the card? Or, with a working capture, the draw that stretches and the resource it reads. Numbers and names only; no game files, captures or logs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 13:14:19 +00:00
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-26 13:13 UTC · original

Correction, from the same session: single_queue does not remove the stretching.

At a later scene of the prologue — 69 world frames, 4,886 draws, 275 ms of the frame's 317-340 ms reported on the GPU — the same stretched meshes are there with VKD3D_CONFIG=...,single_queue. The clean picture I put in the table was an earlier scene on the same run, so the difference I attributed to the queues was scene-dependent, not queue-dependent.

So the table above is not evidence of a cross-queue hazard. What still holds:

  • the artifact is unaffected by VICTORY_RELAY (0 and 2) and by VICTORY_TEXTURE_NO_WAIT (0 and 1);
  • it is unaffected by the mesh index mask, the helper-lane fix, placed-texture keys and alias sync, the bake queue, texture budgets from 4.5 to 16 GB, ROOM_PERCENT=95, mip dropping, render scale, and BAR windows;
  • it is stable in place while the camera holds still and changes when content streams, which is why a slower configuration looked clean: it did not change the defect, it changed how much of the scene had arrived.

Sorry for the noise. The useful part of this report is the list of what has been ruled out and the two things that would settle it: a capture of the draw that stretches (RenderDoc dies here with device removed 0x887A0005 after 17 submissions sent ahead, and with the relay off the capture runs out of memory), or a breakpoint on a skinned/mesh draw whose vertices come from a buffer written earlier in the frame.

**@⁠YaBulochka** on GitHub · 2026-11-26 13:13 UTC · [original](https://github.com/fxceless/victory-fork/issues/1301#issuecomment-7193053850) Correction, from the same session: **`single_queue` does not remove the stretching.** At a later scene of the prologue — 69 world frames, 4,886 draws, 275 ms of the frame's 317-340 ms reported on the GPU — the same stretched meshes are there with `VKD3D_CONFIG=...,single_queue`. The clean picture I put in the table was an *earlier* scene on the same run, so the difference I attributed to the queues was scene-dependent, not queue-dependent. So the table above is not evidence of a cross-queue hazard. What still holds: - the artifact is unaffected by `VICTORY_RELAY` (0 and 2) and by `VICTORY_TEXTURE_NO_WAIT` (0 and 1); - it is unaffected by the mesh index mask, the helper-lane fix, placed-texture keys and alias sync, the bake queue, texture budgets from 4.5 to 16 GB, `ROOM_PERCENT=95`, mip dropping, render scale, and BAR windows; - it is stable in place while the camera holds still and changes when content streams, which is why a slower configuration *looked* clean: it did not change the defect, it changed how much of the scene had arrived. Sorry for the noise. The useful part of this report is the list of what has been ruled out and the two things that would settle it: a capture of the draw that stretches (RenderDoc dies here with `device removed 0x887A0005` after 17 submissions sent ahead, and with the relay off the capture runs out of memory), or a breakpoint on a skinned/mesh draw whose vertices come from a buffer written earlier in the frame.
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-26 17:49 UTC · original

One more observation, and it changes the shape of the defect: the stretched geometry is a character's mesh, not a surface of the level.

Seen at the cafeteria scene of the prologue, with a dozen characters animating:

  • a single huge triangle, coloured by the character's own material (the orange of the prison uniform), spans a quarter of the frame from one corner to the other;
  • the same defect also shows as thin orange streaks, i.e. the same triangle seen nearly edge-on;
  • it appears and disappears as the characters move, and the surrounding geometry and their textures are untouched;
  • nothing of the level stretches in the same moment.

That reads as one or two vertices of a skinned character going to a wrong position: a bone matrix or a vertex source that is stale or garbage for that draw, while the palette's other entries are fine. A static surface of the level could not produce it, and neither could a texture.

What it is not, from the same runs: the title's two queues versus single_queue (both show it), VICTORY_RELAY 0 or 2, VICTORY_TEXTURE_NO_WAIT 0 or 1, texture budgets from 3 to 16 GB, VICTORY_TEXTURE_ROOM_PERCENT, mip dropping, the render scale, the ambient stand-in and the reflection stand-in (VICTORY_AMBIENT_REFLECT=0 still shows it), the 9-bit mesh index mask, the helper-lane fixes, and the placed-texture fixes we could apply.

Ties that look relevant: #3211 (overlapping writes into one shadow handing out old bytes — the palette lives in such a buffer) and #3289 (a refresh takes the whole pages it touches). Both conflict with the tree we run here, which is a fork of the Series S line, so I could not test them.

What would settle it: a capture of that draw, or a breakpoint on the skinning palette of a character in the same frame — is the matrix buffer the shader reads the one the title wrote for that frame.

**@⁠YaBulochka** on GitHub · 2026-11-26 17:49 UTC · [original](https://github.com/fxceless/victory-fork/issues/1301#issuecomment-7199719688) One more observation, and it changes the shape of the defect: **the stretched geometry is a character's mesh**, not a surface of the level. Seen at the cafeteria scene of the prologue, with a dozen characters animating: - a single huge triangle, coloured by the character's own material (the orange of the prison uniform), spans a quarter of the frame from one corner to the other; - the same defect also shows as thin orange streaks, i.e. the same triangle seen nearly edge-on; - it appears and disappears as the characters move, and the surrounding geometry and their textures are untouched; - nothing of the level stretches in the same moment. That reads as one or two vertices of a skinned character going to a wrong position: a bone matrix or a vertex source that is stale or garbage for that draw, while the palette's other entries are fine. A static surface of the level could not produce it, and neither could a texture. What it is *not*, from the same runs: the title's two queues versus `single_queue` (both show it), `VICTORY_RELAY` 0 or 2, `VICTORY_TEXTURE_NO_WAIT` 0 or 1, texture budgets from 3 to 16 GB, `VICTORY_TEXTURE_ROOM_PERCENT`, mip dropping, the render scale, the ambient stand-in and the reflection stand-in (`VICTORY_AMBIENT_REFLECT=0` still shows it), the 9-bit mesh index mask, the helper-lane fixes, and the placed-texture fixes we could apply. Ties that look relevant: #3211 (overlapping writes into one shadow handing out old bytes — the palette lives in such a buffer) and #3289 (a refresh takes the whole pages it touches). Both conflict with the tree we run here, which is a fork of the Series S line, so I could not test them. What would settle it: a capture of that draw, or a breakpoint on the skinning palette of a character in the same frame — is the matrix buffer the shader reads the one the title wrote for that frame.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#1301
No description provided.