Boat task fixed here: VICTORY_TEXTURE_BACK was set to 1, so the kind list was empty #1037

Open
opened 2026-11-26 03:56:25 +00:00 by github-bot · 1 comment
Owner

@⁠CQ187901 on GitHub · 2026-11-25 16:59 UTC · original

<html>
RTX 4070 12 GB, driver 621.24 (wave 32), tree f85101b + #887 + #886 + #883 (VICTORY_WAVE_PAIRS) + #799 (loose LDS) + @⁠Geckomacabre's eee5667d texture read-back.

Symptom, as reported

At the end of the first chapter's boat cutscene the boat drops to the river bed, the HUD says Engine destroyed, the water around the hull is a rectangular pit, and after skipping to the checkpoint the boat floats but the pit remains and the throttle does nothing.

What was actually wrong on our side

VICTORY_TEXTURE_BACK takes a comma-separated list of kinds (<width>x<height>f<format>), which kinds() parses with split_once('f') then split_once('x'). Our launcher passed VICTORY_TEXTURE_BACK=1, so every entry failed to parse, the list came out empty, and wanted() returned false for everything — the read-back ran with nothing to copy for the whole session. It looked exactly like "the water heights are never written by shaders", which sent us down two wrong paths (chasing placed / by-address UAV bindings, and looking at the refused compute pipelines).
The default when the variable is unset is already the right list:
256x256f41,256x256f16,64x64f16,128x128f36
Setting exactly that (or leaving it unset) makes the boat float and drive. No code change was needed.

How to tell from a log

The process-wide line appears once, and only when the list parsed:
textures of these kinds that shaders write are copied back into title memory (VICTORY_TEXTURE_BACK) kinds=[(256, 256, 41), (256, 256, 16), (64, 64, 16), (128, 128, 36)]
If that line is missing, the variable did not parse — check the value before anything else. With it present, the per-frame copying back N MB grows (52–61 MB/frame here, against ~30 MB without the read-back).

Two traps worth knowing

1. tracing colours the numbers. Field values are wrapped in ANSI sequences, so the text on disk is w=\x1b[2m256\x1b[0m. Grepping w=256 in the raw .err finds nothing, which reads as "no 256x256 textures are ever written" — a false negative we spent a while on. Strip \x1b\[[0-9;]*m before matching, then the same log shows 17 distinct 256x256 kinds, including 256x256f41 (heights) and 256x256f16 (displacement).
2. Placed (by-address) unordered views. descriptor::host::placed_texture() only turns View::Placed(false, …) into a resource, so a texture the title placed in its own memory and writes through a by-address UAV view never reaches texture_written(). We added a branch in draw.rs's readable() that resolves the address with resource::texture_at() and registers it; it is harmless and probably worth keeping, but on this title the water maps come through ordinary View::Unordered views, so it is not what fixed the boat.

Numbers, same river scene, texread-back on

  | draws/frame | ms/frame | fps | copying back -- | -- | -- | -- | -- before (read-back empty) | 4,051–4,269 | 215–235 | 4.3–4.8 | 30–43 MB after (four kinds copied) | 5,068–5,404 | 265–286 | 3.5–3.8 | 52–61 MB
The scene is heavier after the fix (more geometry visible once the hull sits in water), and the read-back itself costs ~39–43 ms per frame here. Worth it: the mission is playable.
</html>RTX 4070 12 GB, driver 621.24 (wave 32), tree f85101b + #887 + #886 + #883 (VICTORY_WAVE_PAIRS) + #799 (loose LDS) + @⁠Geckomacabre's eee5667d texture read-back. Symptom, as reported At the end of the first chapter's boat cutscene the boat drops to the river bed, the HUD says Engine destroyed, the water around the hull is a rectangular pit, and after skipping to the checkpoint the boat floats but the pit remains and the throttle does nothing. What was actually wrong on our side VICTORY_TEXTURE_BACK takes a comma-separated list of kinds (xf), which kinds() parses with split_once('f') then split_once('x'). Our launcher passed VICTORY_TEXTURE_BACK=1, so every entry failed to parse, the list came out empty, and wanted() returned false for everything — the read-back ran with nothing to copy for the whole session. It looked exactly like "the water heights are never written by shaders", which sent us down two wrong paths (chasing placed / by-address UAV bindings, and looking at the refused compute pipelines). The default when the variable is unset is already the right list: 256x256f41,256x256f16,64x64f16,128x128f36

Setting exactly that (or leaving it unset) makes the boat float and drive. No code change was needed.
How to tell from a log
The process-wide line appears once, and only when the list parsed:
textures of these kinds that shaders write are copied back into title memory (VICTORY_TEXTURE_BACK) kinds=[(256, 256, 41), (256, 256, 16), (64, 64, 16), (128, 128, 36)]

If that line is missing, the variable did not parse — check the value before anything else. With it present, the per-frame copying back N MB grows (52–61 MB/frame here, against ~30 MB without the read-back).
Two traps worth knowing

  1. tracing colours the numbers. Field values are wrapped in ANSI sequences, so the text on disk is w=\x1b[2m256\x1b[0m. Grepping w=256 in the raw .err finds nothing, which reads as "no 256x256 textures are ever written" — a false negative we spent a while on. Strip \x1b[[0-9;]*m before matching, then the same log shows 17 distinct 256x256 kinds, including 256x256f41 (heights) and 256x256f16 (displacement).
  2. Placed (by-address) unordered views. descriptor::host::placed_texture() only turns View::Placed(false, …) into a resource, so a texture the title placed in its own memory and writes through a by-address UAV view never reaches texture_written(). We added a branch in draw.rs's readable() that resolves the address with resource::texture_at() and registers it; it is harmless and probably worth keeping, but on this title the water maps come through ordinary View::Unordered views, so it is not what fixed the boat.
    Numbers, same river scene, texread-back on

draws/frame
ms/frame
fps
copying back
before (read-back empty)
4,051–4,269
215–235
4.3–4.8
30–43 MB
after (four kinds copied)
5,068–5,404
265–286
3.5–3.8
52–61 MB

The scene is heavier after the fix (more geometry visible once the hull sits in water), and the read-back itself costs ~39–43 ms per frame here. Worth it: the mission is playable.

issue-863-reply.md

**@⁠CQ187901** on GitHub · 2026-11-25 16:59 UTC · [original](https://github.com/fxceless/victory-fork/issues/1037) <html> <body> <!--StartFragment--><div data-zone-id="0" data-line-index="0" data-line="true" style="white-space: pre-wrap;">RTX 4070 12 GB, driver 621.24 (wave 32), tree f85101b + #887 + #886 + #883 (VICTORY_WAVE_PAIRS) + #799 (loose LDS) + @⁠Geckomacabre's eee5667d texture read-back.</div><div data-zone-id="0" data-line-index="1" data-line="true" style="white-space: pre-wrap;"><h2 class="heading-h2">Symptom, as reported</h2></div><div data-zone-id="0" data-line-index="2" data-line="true" style="white-space: pre-wrap;">At the end of the first chapter's boat cutscene the boat drops to the river bed, the HUD says <b>Engine destroyed</b>, the water around the hull is a rectangular pit, and after skipping to the checkpoint the boat floats but the pit remains and the throttle does nothing.</div><div data-zone-id="0" data-line-index="3" data-line="true" style="white-space: pre-wrap;"><h2 class="heading-h2">What was actually wrong on our side</h2></div><div data-zone-id="0" data-line-index="4" data-line="true" style="white-space: pre-wrap;">VICTORY_TEXTURE_BACK takes a <b>comma-separated list of kinds</b> (&lt;width&gt;x&lt;height&gt;f&lt;format&gt;), which kinds() parses with split_once('f') then split_once('x'). Our launcher passed VICTORY_TEXTURE_BACK=1, so every entry failed to parse, the list came out empty, and wanted() returned false for everything — <b>the read-back ran with nothing to copy for the whole session</b>. It looked exactly like "the water heights are never written by shaders", which sent us down two wrong paths (chasing placed / by-address UAV bindings, and looking at the refused compute pipelines).</div><div data-zone-id="0" data-line-index="5" data-line="true" style="white-space: pre-wrap;">The default when the variable is unset is already the right list:</div><div data-zone-id="0" data-line-index="6" data-line="true" style="white-space: pre-wrap;"><pre><code><div data-zone-id="U0RWip88CvYXKPsVulrV" data-line-index="0" data-line="true" style="white-space: pre-wrap;">256x256f41,256x256f16,64x64f16,128x128f36</div></code></pre></div><div data-zone-id="0" data-line-index="7" data-line="true" style="white-space: pre-wrap;">Setting exactly that (or leaving it unset) makes the boat float and drive. No code change was needed.</div><div data-zone-id="0" data-line-index="8" data-line="true" style="white-space: pre-wrap;"><h2 class="heading-h2">How to tell from a log</h2></div><div data-zone-id="0" data-line-index="9" data-line="true" style="white-space: pre-wrap;">The process-wide line appears once, and only when the list parsed:</div><div data-zone-id="0" data-line-index="10" data-line="true" style="white-space: pre-wrap;"><pre><code><div data-zone-id="xQZNV8FVrxWhGwCHtQVh" data-line-index="0" data-line="true" style="white-space: pre-wrap;">textures of these kinds that shaders write are copied back into title memory (VICTORY_TEXTURE_BACK) kinds=[(256, 256, 41), (256, 256, 16), (64, 64, 16), (128, 128, 36)]</div></code></pre></div><div data-zone-id="0" data-line-index="11" data-line="true" style="white-space: pre-wrap;">If that line is missing, the variable did not parse — check the value before anything else. With it present, the per-frame copying back N MB grows (52–61 MB/frame here, against ~30 MB without the read-back).</div><div data-zone-id="0" data-line-index="12" data-line="true" style="white-space: pre-wrap;"><h2 class="heading-h2">Two traps worth knowing</h2></div><div data-zone-id="0" data-line-index="13" data-line="true" style="white-space: pre-wrap;"><b>1. </b><b>tracing</b><b> colours the numbers.</b> Field values are wrapped in ANSI sequences, so the text on disk is w=\x1b[2m256\x1b[0m. Grepping w=256 in the raw .err finds <b>nothing</b>, which reads as "no 256x256 textures are ever written" — a false negative we spent a while on. Strip \x1b\[[0-9;]*m before matching, then the same log shows 17 distinct 256x256 kinds, including 256x256f41 (heights) and 256x256f16 (displacement).</div><div data-zone-id="0" data-line-index="14" data-line="true" style="white-space: pre-wrap;"><b>2. Placed (by-address) unordered views.</b> descriptor::host::placed_texture() only turns View::Placed(false, …) into a resource, so a texture the title placed in its own memory and writes through a by-address UAV view never reaches texture_written(). We added a branch in <a href="http://draw.rs" target="_blank" rel="noopener noreferrer">draw.rs</a>'s readable() that resolves the address with resource::texture_at() and registers it; it is harmless and probably worth keeping, but on this title the water maps come through ordinary View::Unordered views, so it is <b>not</b> what fixed the boat.</div><div data-zone-id="0" data-line-index="15" data-line="true" style="white-space: pre-wrap;"><h2 class="heading-h2">Numbers, same river scene, texread-back on</h2></div><div data-zone-id="0" data-line-index="16" data-line="true" style="white-space: pre-wrap;">   | draws/frame | ms/frame | fps | copying back -- | -- | -- | -- | -- before (read-back empty) | 4,051–4,269 | 215–235 | 4.3–4.8 | 30–43 MB after (four kinds copied) | 5,068–5,404 | 265–286 | 3.5–3.8 | 52–61 MB </div><div data-zone-id="0" data-line-index="17" data-line="true" style="white-space: pre-wrap;">The scene is heavier after the fix (more geometry visible once the hull sits in water), and the read-back itself costs ~39–43 ms per frame here. Worth it: the mission is playable.</div><!--EndFragment--> </body> </html>RTX 4070 12 GB, driver 621.24 (wave 32), tree f85101b + #887 + #886 + #883 (VICTORY_WAVE_PAIRS) + #799 (loose LDS) + @⁠Geckomacabre's eee5667d texture read-back. Symptom, as reported At the end of the first chapter's boat cutscene the boat drops to the river bed, the HUD says Engine destroyed, the water around the hull is a rectangular pit, and after skipping to the checkpoint the boat floats but the pit remains and the throttle does nothing. What was actually wrong on our side VICTORY_TEXTURE_BACK takes a comma-separated list of kinds (<width>x<height>f<format>), which kinds() parses with split_once('f') then split_once('x'). Our launcher passed VICTORY_TEXTURE_BACK=1, so every entry failed to parse, the list came out empty, and wanted() returned false for everything — the read-back ran with nothing to copy for the whole session. It looked exactly like "the water heights are never written by shaders", which sent us down two wrong paths (chasing placed / by-address UAV bindings, and looking at the refused compute pipelines). The default when the variable is unset is already the right list: 256x256f41,256x256f16,64x64f16,128x128f36 Setting exactly that (or leaving it unset) makes the boat float and drive. No code change was needed. How to tell from a log The process-wide line appears once, and only when the list parsed: textures of these kinds that shaders write are copied back into title memory (VICTORY_TEXTURE_BACK) kinds=[(256, 256, 41), (256, 256, 16), (64, 64, 16), (128, 128, 36)] If that line is missing, the variable did not parse — check the value before anything else. With it present, the per-frame copying back N MB grows (52–61 MB/frame here, against ~30 MB without the read-back). Two traps worth knowing 1. tracing colours the numbers. Field values are wrapped in ANSI sequences, so the text on disk is w=\x1b[2m256\x1b[0m. Grepping w=256 in the raw .err finds nothing, which reads as "no 256x256 textures are ever written" — a false negative we spent a while on. Strip \x1b\[[0-9;]*m before matching, then the same log shows 17 distinct 256x256 kinds, including 256x256f41 (heights) and 256x256f16 (displacement). 2. Placed (by-address) unordered views. descriptor::host::placed_texture() only turns View::Placed(false, …) into a resource, so a texture the title placed in its own memory and writes through a by-address UAV view never reaches texture_written(). We added a branch in [draw.rs](http://draw.rs/)'s readable() that resolves the address with resource::texture_at() and registers it; it is harmless and probably worth keeping, but on this title the water maps come through ordinary View::Unordered views, so it is not what fixed the boat. Numbers, same river scene, texread-back on draws/frame ms/frame fps copying back before (read-back empty) 4,051–4,269 215–235 4.3–4.8 30–43 MB after (four kinds copied) 5,068–5,404 265–286 3.5–3.8 52–61 MB The scene is heavier after the fix (more geometry visible once the hull sits in water), and the read-back itself costs ~39–43 ms per frame here. Worth it: the mission is playable. [issue-863-reply.md](https://github.com/user-attachments/files/35422547/issue-863-reply.md)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:56:25 +00:00
Author
Owner

@⁠sawetco on GitHub · 2026-11-25 17:12 UTC · original

One branch difference matters for anyone trying this from the newer #999 port. The explicit four-format string works with both parsers:

VICTORY_TEXTURE_BACK=256x256f41,256x256f16,64x64f16,128x128f36
Source Variable unset Literal 1
Geckomacabre's eee5667, as used here Four default formats Empty list
#999 at 04df435 Empty list Four default formats

The second row comes from reading the #999 parser. Our Series S RTX 5070 playtest used a backport of the first row. From the original mission-start save, the boat made it to the camp and the player continued to Jason's house without a mission skip. A fresh load of the resulting autosave put Jason on the waterfront porch.

Original parser · #999 parser · RTX 5070 same-checkpoint A/B

**@⁠sawetco** on GitHub · 2026-11-25 17:12 UTC · [original](https://github.com/fxceless/victory-fork/issues/1037#issuecomment-7169163420) One branch difference matters for anyone trying this from the newer #999 port. The explicit four-format string works with both parsers: ```text VICTORY_TEXTURE_BACK=256x256f41,256x256f16,64x64f16,128x128f36 ``` | Source | Variable unset | Literal `1` | | --- | --- | --- | | Geckomacabre's `eee5667`, as used here | Four default formats | Empty list | | #999 at `04df435` | Empty list | Four default formats | The second row comes from reading the #999 parser. Our Series S RTX 5070 playtest used a backport of the first row. From the original mission-start save, the boat made it to the camp and the player continued to Jason's house without a mission skip. A fresh load of the resulting autosave put Jason on the waterfront porch. [Original parser](https://github.com/Geckomacabre/vx-layer/blob/eee5667d7119bc4a378214621e1b18a814ebe80f/crates/victory-gpu/src/texback.rs#L29-L47) · [#999 parser](https://github.com/fxceless/victory-fork/blob/04df4350876fa759a7e7e134c8e68a64cbb9e2f7/crates/victory-gpu/src/texback.rs#L29-L47) · [RTX 5070 same-checkpoint A/B](https://git.gtahub.st/github/fxceless--victory-fork/issues/863)
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#1037
No description provided.