vkback: count why linear textures are not bound in place #129

Manually merged
github merged 4 commits from github-bot/gh-129 into gh-pr/129/base 2026-12-01 20:20:11 +00:00 AGit
Owner

@⁠TheRifai on GitHub · 2026-12-01 19:22 UTC · original
TheRifai:linear-skip-reasons → main · +51 −14 · 3 files · 4 commits · merged 2026-12-01 20:16 UTC

What

The stats line reported tiling: linear N (in place M) but not why the N - M textures were copied. make_linear_in_place now counts each early return and the non-zero counters are shown on that line as not in place: ... (docs/TASKS.md, "Linear textures not bound in place: count the reasons"). Counters are per attempt, since one texture can be tried more than once. No Vulkan behaviour changes.

The reference

No console counterpart: a rule-32 counter, like the tiling counts it sits beside. The task asks for one counter per early return so the next task can target the reasons that are ours.

Evidence

  • cargo check -p vkback --all-targets, 160 native tests, and the build all pass.
  • House save, 125 s, GE-Proton11-16, reached the world: not in place: not 2D 5668, render target 782, array 313, mips 34522, depth or BC format 2093, source not title memory 22, info tiling/mips/layers 504, no umem memory 1.
  • Boat save, 125 s, reached the world, tiling: linear 21165 (in place 15361): not in place: not 2D 5887, render target 782, array 607, mips 44489, depth or BC format 2134, source not title memory 20, info tiling/mips/layers 517, no umem memory 12.
  • So mipmapped textures dominate, and the device-side reasons (format features, external-image query, layout/memory fit) are zero in both scenes.
  • Runs: /tmp/opencode/capture/skip-reasons-house/, /tmp/opencode/capture/skip-reasons-boat/. Both hit the known exit-1 fault after reaching the world; neither is a performance measurement.

Checklist (docs/AGENTS.md)

  • One topic; docs/TASKS.md not edited (rule 29/31)
  • No fallback, constant, switch, queue, unsafe or translator output changed (rules 2/9b/33/35/36/27)
  • Comments say what is true now (rule 3)
  • Nothing from the title, no non-free data pointers (hard constraints)
**@⁠TheRifai** on GitHub · 2026-12-01 19:22 UTC · [original](https://github.com/vktory6/VKtory/pull/129) `TheRifai:linear-skip-reasons` → `main` · +51 −14 · 3 files · 4 commits · merged 2026-12-01 20:16 UTC ## What The stats line reported `tiling: linear N (in place M)` but not why the `N - M` textures were copied. `make_linear_in_place` now counts each early return and the non-zero counters are shown on that line as `not in place: ...` (docs/TASKS.md, "Linear textures not bound in place: count the reasons"). Counters are per attempt, since one texture can be tried more than once. No Vulkan behaviour changes. ## The reference No console counterpart: a rule-32 counter, like the tiling counts it sits beside. The task asks for one counter per early return so the next task can target the reasons that are ours. ## Evidence - `cargo check -p vkback --all-targets`, 160 native tests, and the build all pass. - House save, 125 s, GE-Proton11-16, reached the world: `not in place: not 2D 5668, render target 782, array 313, mips 34522, depth or BC format 2093, source not title memory 22, info tiling/mips/layers 504, no umem memory 1`. - Boat save, 125 s, reached the world, `tiling: linear 21165 (in place 15361)`: `not in place: not 2D 5887, render target 782, array 607, mips 44489, depth or BC format 2134, source not title memory 20, info tiling/mips/layers 517, no umem memory 12`. - So mipmapped textures dominate, and the device-side reasons (format features, external-image query, layout/memory fit) are zero in both scenes. - Runs: `/tmp/opencode/capture/skip-reasons-house/`, `/tmp/opencode/capture/skip-reasons-boat/`. Both hit the known exit-1 fault after reaching the world; neither is a performance measurement. ## Checklist (docs/AGENTS.md) - [x] One topic; `docs/TASKS.md` not edited (rule 29/31) - [x] No fallback, constant, switch, queue, `unsafe` or translator output changed (rules 2/9b/33/35/36/27) - [x] Comments say what is true now (rule 3) - [x] Nothing from the title, no non-free data pointers (hard constraints)
The "tiling: linear N (in place M)" line said how many textures were copied but not why. Count each early return of make_linear_in_place (not 2D, target, MSAA, array, mips, format, source, umem, features, external query, layout, create/bind/barrier) and show the non-zero ones on that line.

House (125 s) and boat-save (125 s) runs both reached the world (the known exit-1 fault ended them early): mipmapped textures dominate (34,522 / 44,489 attempts), then not-2D (5,668 / 5,887), depth/BC formats (2,093 / 2,134), render targets (~780). Device-side limits (format features, external query, layout) were zero in both runs: the copies are from console layouts and our own restrictions, not the driver's image support. Counts are per attempt, since a texture can be tried more than once.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 19:27:06 +00:00
# Conflicts:
#	greenfield/vkback/src/live/present.rs
github-bot changed target branch from main to gh-pr/129/base 2026-12-01 20:20:10 +00:00
github manually merged commit 61336c446c into gh-pr/129/base 2026-12-01 20:20:11 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 20:17 UTC · original

Merged, thanks. The breakdown answers the task's question: mipmapped textures are by far the largest reason (44k attempts in the boat start), and the device refuses nothing. So the next step is ours: whether a mipmapped console-linear texture can be bound in place (one image per level, or a layout that matches).

Two changes of mine on your branch: the reason table and the counters moved into imgmake.rs as one InPlace struct (as submitted, lib.rs grew past its oversize count and the policy test failed; it's now 4 lines shorter instead), and I merged main twice for #130 and #132 (both touch the same stats line).

**@⁠vktory6** on GitHub · 2026-12-01 20:17 UTC · [original](https://github.com/vktory6/VKtory/pull/129#issuecomment-7324405172) Merged, thanks. The breakdown answers the task's question: mipmapped textures are by far the largest reason (44k attempts in the boat start), and the device refuses nothing. So the next step is ours: whether a mipmapped console-linear texture can be bound in place (one image per level, or a layout that matches). Two changes of mine on your branch: the reason table and the counters moved into `imgmake.rs` as one `InPlace` struct (as submitted, `lib.rs` grew past its oversize count and the policy test failed; it's now 4 lines shorter instead), and I merged main twice for #130 and #132 (both touch the same stats line).
This discussion has been locked. Commenting is limited to contributors.
No description provided.