Skip to content

PR 0067 attribute PR14 cubemap span work

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

PR #67 — research: attribute PR14 cubemap span work

PR #67

Status

  • GitHub state: Closed unmerged
  • Disposition at review: Historical / not merged
  • Current head at review: 86a2a9708b91b4b8d92548f05c5364c4f8967c2b (research/pr14-tail-counters)
  • Reviewed head: 86a2a9708b91b4b8d92548f05c5364c4f8967c2b
  • Last reviewed: 2026-09-14 UTC
  • Base: fix/eng-2026-523-cumulative-s-native-gl-s3tc-border-mips-u393db700 at a1645a8612b6222437e2da17915258412a9beee0
  • Subsystem: Vulkan texture / layout

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: attribute PR14 cubemap span work
  • Why it was attempted: Earlier exact counters rejected clamped spans, texture-key hashing, cache saturation, and measured cubemap work. Schema 8 splits create pipeline() to identify the next bounded route.
  • Current/final result: Closed/HOLD diagnostic: attribution narrowed where PR #14 cubemap span work was spent, but no broad optimization was accepted from the trace alone.
  • Lesson: Cubemap-span diagnostics must separate guest texture-layout/span computation from Vulkan copy/pipeline cost before choosing an optimization.

Code impact

Implementation file Δ Why it matters
hw/xbox/nv2a/pgraph/texture-layout.h +43/-0 Shared texture byte-span, mip, and face-layout calculations.
hw/xbox/nv2a/pgraph/vk/draw.c +49/-0 Vulkan draw preparation/recording and the PR hot-path decision.
hw/xbox/nv2a/pgraph/vk/perf.c +135/-2 Diagnostic counters/tracing used to attribute the changed path.
hw/xbox/nv2a/pgraph/vk/renderer.h +70/-0 Renderer-owned state needed by the implementation.
hw/xbox/nv2a/pgraph/vk/texture.c +183/-17 Texture source identity, cache, upload, binding, or freshness path.
tests/unit/test-xbox-pgraph-texture-layout.c +37/-0 Focused/regression validation for the implementation contract.

Flow

flowchart LR
    subgraph Before
        A[Guest texture state] --> B[Compute source/layout] --> C[Upload/cache decision] --> D[Draw]
    end
    subgraph PR_67[PR #67]
        E[Guest texture state] --> F[PR #67 layout/identity rule] --> G[Validated reuse/copy/fallback] --> H[Draw]
    end
Loading

What changed

Split shader bind, key creation/hash, cache lookup, layout creation, and graphics-pipeline creation timers. - Keep all counters opt-in. - Preserve rendering behavior. - Extend focused unit coverage.

Result

Closed/HOLD diagnostic: attribution narrowed where PR #14 cubemap span work was spent, but no broad optimization was accepted from the trace alone.

Lesson learned

Cubemap-span diagnostics must separate guest texture-layout/span computation from Vulkan copy/pipeline cost before choosing an optimization.

Avoid repeating

Do not optimize the combined cubemap path from aggregate timing; isolate the exact span work and preserve pipeline state, resource lifetime, driver compatibility, and fallbacks.

Docs / evidence

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

Related architecture

Related PRs referenced by this PR:

Clone this wiki locally