Skip to content

PR 0080 Vulkan skip clean texture stages during warm binds

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

PR #80 — Vulkan: skip clean texture stages during warm binds

PR #80

Status

  • GitHub state: Merged
  • Disposition at review: Merged
  • Current head at review: 6bf9e98cdee50fd73e936ff2bd5b485ce14ac4dc (fix/vulkan-warm-texture-binding)
  • Reviewed head: 6bf9e98cdee50fd73e936ff2bd5b485ce14ac4dc
  • Last reviewed: 2026-09-14 UTC
  • Base: main at 5edff26383c6440da35bc92b9fca35f4a404b03b
  • Subsystem: Vulkan memory / synchronization

Review freshness: this page records the final/known PR head at review time. If the PR is reopened or rewritten, re-review before relying on implementation details.

At a glance

  • What it changes: Vulkan: skip clean texture stages during warm binds
  • Why it was attempted: Merged into main : 9148241de690617ac0a21a26b41858585c1e3cab on 2026-09-12. Its tree 2301f1cc976f93e5a943e065c4e12e034f33869f is identical to the tested PR head. The maintained test/evidence PR 30 merged at f34949ee0b9b488861fb6a2e832bf8b1e7e2f145 . Full diagnostic branch histories remain reachable through archive/pr-080-warm-texture-binding-6bf9e98 and archive/perf-tests-pr-030-issue79-edb239f .
  • Current/final result: Merged: guarded warm texture-stage reuse is current-main behavior with source/DMA/freshness checks.
  • Lesson: A clean texture dirty bit is not sufficient cache identity. Warm texture reuse must also validate effective guest source/DMA identity and freshness.

Code impact

Implementation file Δ Why it matters
hw/xbox/nv2a/pgraph/pgraph.c +7/-0 Shared PGRAPH guest-state/method handling and renderer boundary.
hw/xbox/nv2a/pgraph/vk/renderer.h +3/-0 Renderer-owned state needed by the implementation.
hw/xbox/nv2a/pgraph/vk/surface.c +14/-0 Surface ownership, overlap, readback, upload, or freshness path.
hw/xbox/nv2a/pgraph/vk/texture-binding-state.h +24/-0 Texture source identity, cache, upload, binding, or freshness path.
hw/xbox/nv2a/pgraph/vk/texture.c +35/-1 Texture source identity, cache, upload, binding, or freshness path.
tests/unit/meson.build +1/-0 Focused/regression validation for the implementation contract.
tests/unit/test-xbox-vk-texture-binding.c +68/-0 Focused/regression validation for the implementation contract.

Flow

flowchart LR
    subgraph Before
        A[Vulkan memory / synchronization input] --> B[Existing path] --> C[Observed limitation/cost] --> D[Guest-visible result]
    end
    subgraph PR_80[PR #80]
        E[Vulkan memory / synchronization input] --> F[PR #80 change/measurement] --> G[Qualified behavior] --> H[Guest-visible result]
    end
Loading

What changed

This PR changes the implementation paths listed in Code impact to implement or test “Vulkan: skip clean texture stages during warm binds”. The file table is the quick source map; use the linked PR diff for line-level mechanics.

Result

Merged: guarded warm texture-stage reuse is current-main behavior with source/DMA/freshness checks.

Lesson learned

A clean texture dirty bit is not sufficient cache identity. Warm texture reuse must also validate effective guest source/DMA identity and freshness.

Avoid repeating

Do not reuse a cached host texture solely because pages are clean; DMA/source remapping can invalidate the cached object without a conventional dirty transition.

Docs / evidence

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

Related architecture

Clone this wiki locally