Skip to content

PR 0089 Vulkan version bounded vertex draws across ordered updates

github-actions[bot] edited this page Sep 14, 2026 · 1 revision

PR #89 — Vulkan: version bounded vertex draws across ordered updates

PR #89

Status

  • GitHub state: Open draft
  • Disposition at review: Negative / HOLD
  • Current head at review: aa260e72c51ebca05038a7abd0455f18e8c42084 (feature/vulkan-vertex-versions)
  • Reviewed head: aa260e72c51ebca05038a7abd0455f18e8c42084
  • Last reviewed: 2026-09-14 UTC
  • Base: feature/vulkan-vertex-fresh-page-direct at 1d4524a6df0fac5822c7c8d0393a4ef5f6f16d6a
  • Subsystem: Vulkan memory / synchronization

Review freshness: current at the reviewed head. Before acting on this open/draft PR, compare the live GitHub head with Reviewed head below. If it differs, treat implementation details, file impact, flow, and result qualification as stale until re-reviewed. The historical lesson remains valid unless newer evidence explicitly overturns it.

At a glance

  • What it changes: Vulkan: version bounded vertex draws across ordered updates
  • Why it was attempted: Draft; diagnostic candidate released; do not merge yet. Head aa260e72c51ebca05038a7abd0455f18e8c42084, tree b2f506ab110dcf3d4eb4773e854b9e418981ea7e, executable SHA-256 92abb1cc287d9a025b2bedb7f1146daf27f2305ff9f7f62bee85efe850390bfb. Win64 release with debug symbols and checksums. The source remains stacked on draft 85 and 87. Fixed-cycle baseline: 9f618d6d8c4c446ef023955f3d4de22f661f61a4.
  • Current/final result: Active stacked research; the versioning idea remains subject to the parent freshness/lifetime gates and is not an accepted whole-renderer speedup.
  • Lesson: Bounded immutable vertex versions can preserve the bytes seen by earlier recorded draws while later guest writes advance to new storage, but versioning must remain bounded and inherit surface-freshness correctness.

Code impact

Implementation file Δ Why it matters
hw/xbox/nv2a/pgraph/vk/buffer.c +18/-0 Vulkan transient/staging/storage allocation and lifetime.
hw/xbox/nv2a/pgraph/vk/draw.c +195/-49 Vulkan draw preparation/recording and the PR hot-path decision.
hw/xbox/nv2a/pgraph/vk/perf.c +10/-2 Diagnostic counters/tracing used to attribute the changed path.
hw/xbox/nv2a/pgraph/vk/renderer.c +2/-0 Renderer lifecycle, pending work, synchronization, or teardown ownership.
hw/xbox/nv2a/pgraph/vk/renderer.h +10/-1 Renderer-owned state needed by the implementation.
hw/xbox/nv2a/pgraph/vk/surface.c +9/-1 Surface ownership, overlap, readback, upload, or freshness path.
hw/xbox/nv2a/pgraph/vk/texture.c +1/-1 Texture source identity, cache, upload, binding, or freshness path.
hw/xbox/nv2a/pgraph/vk/vertex-version-policy.h +77/-0 Vertex range calculation, upload, storage, or command-buffer lifetime path.
hw/xbox/nv2a/pgraph/vk/vertex.c +2/-1 Vertex range calculation, upload, storage, or command-buffer lifetime path.
tests/unit/meson.build +1/-0 Focused/regression validation for the implementation contract.
tests/unit/test-xbox-vk-vertex-version-policy.c +65/-0 Focused/regression validation for the implementation contract.

Flow

flowchart LR
    subgraph Before
        A[Guest vertex bytes change] --> B[Resolve source/freshness] --> C[Upload/storage ordering] --> D[Draw]
    end
    subgraph PR_89[PR #89]
        E[Guest vertex bytes change] --> F[PR #89 lifetime/bounds rule] --> G[Qualified fast path or safe fallback] --> H[Draw]
    end
Loading

What changed

This PR changes the implementation paths listed in Code impact to implement or test “Vulkan: version bounded vertex draws across ordered updates”. The file table is the quick source map; use the linked PR diff for line-level mechanics.

Result

Active stacked research; the versioning idea remains subject to the parent freshness/lifetime gates and is not an accepted whole-renderer speedup.

Lesson learned

Bounded immutable vertex versions can preserve the bytes seen by earlier recorded draws while later guest writes advance to new storage, but versioning must remain bounded and inherit surface-freshness correctness.

Avoid repeating

Do not use versioning to bypass the source-coherency proof, and do not allow unbounded retained vertex versions or stale references across batch retirement.

Docs / evidence

Pointers only; the detailed evidence remains in its original location.

Related architecture

Related PRs referenced by this PR:

Clone this wiki locally