Repository navigation
Performance Research G09 Pipeline Key Minimization
| Field | Value |
|---|---|
| Evidence state | Historical measured local reduction; dependency proof still required for each new field |
| Inspected source | 322986f4c5502b3fa887a9605ac8cd88e9b2c579 |
| First experiment | One-field dependency table against always-recompute reference |
| Scope | Addendum dated September 15, 2026; not a current-main benchmark or implementation status |
Unproven performance research · Performance research — common test protocol · Performance research — reproducible checks
Local proof of merit exists. The retained history reports a texture/pipeline classification change with 79.9% fewer pipeline lookups and 1.079% better fixed-work Morrowind throughput. This is an excellent example of a large local reduction producing a much smaller end-to-end gain. It is historical evidence, not a promised gain for another key reduction. Research history.
Additional implementation detail. Separate shader code identity, fixed-function pipeline state, descriptor identity, content dirtiness, and uniform values. Remove a field from a key only after proving it cannot change the compiled program or pipeline behavior. Likewise, suppress texture-scale work only when its effective value and every consumer stay unchanged.
Proof style. Build a dependency table: mutate one field, then compare generated shader source/SPIR-V identity, pipeline requirements, uniform bytes, descriptors, and rendered output against an always-recompute path. This is stronger than a hit-rate counter.
Expected gain. Fewer hashes, comparisons, state derivations, lookups, and occasionally pipeline creations. If lookup is already cheap and a different stage dominates, the FPS effect may be small.
Remove one redundant key dependency at a time. Hash equality is not a substitute for complete semantic identity.
state change -> shader/pipeline/descriptor/uniform dependency classification -> only affected cache/update paths
Locate the inspected seam before editing; names or ownership may have changed since the pinned review:
git grep -n -E 'ShaderState|pipeline|texture_bindings_changed|scale' -- hw/xbox/nv2a/pgraph/vkThese are implementation gates to add or exercise, not claims that production tests already exist or passed. Retained standalone checks are on the checks page.
| Test ID | Setup / deliberate control | Required oracle |
|---|---|---|
G09.01 |
Vary one proposed-removed field at a time and compare against an always-recompute path. | Shader identity, pipeline requirements, uniforms, descriptors and rendered output remain correct. |
G09.02 |
Paired descriptor-only and shader-affecting texture changes, including effective scale transitions. | Only descriptor-only changes avoid the pipeline/shader path; scale still reaches its true consumers. |
G09.03 |
Alternate states across reset, cache eviction and object-handle reuse. | No stale cache identity is resurrected. |
Collect: pipeline_lookups, pipeline_hits, pipeline_creations, shader_source_changes, descriptor_updates, uniform_updates, prepare_cpu_ns. Keep exact counts separate from sampled durations; use an uninstrumented build for performance qualification.
Reject or hold: Reject missing dependency invalidation. Report local lookup count and fixed-work throughput separately; historical percentages cannot be reused as a forecast.
Follow the common protocol for source identities, previous-main/fixed-baseline controls, raw results, confidence and retail/XISO qualification. No gain becomes proven from a model, cache hit, local operation count, or shifted wait label alone.
Merged PR #131 gives a concrete key-minimization rule. Alpha reference and polygon-offset magnitudes are runtime fragment uniforms, yet their raw values also participated in pipeline identity.
The fix canonicalizes only uniform-owned fields after the common state copy while leaving guest registers, dirty tracking, uniform generation, and shader polygon-offset logic intact.
flowchart LR
A[Guest state] --> B[Copy common pipeline state]
B --> C[Canonicalize runtime-uniform fields]
C --> D[Pipeline key]
D --> E[Foreground / fallback / background / publication]
A conservative dirty detector may remain conservative: a uniform-only write can enter the update path and then reuse the existing canonical pipeline.
Apply the same canonicalization to every key producer/consumer. Before removing another field, prove it does not affect generated code, fixed-function state, reflection/layout, or host capability selection.
DSP tooling guide and navigation updated November 2, 2026 for experimental PR #384, source 8f51d237. Capture/replay usage and limits.
The earlier wiki-wide review was published November 1, 2026. Emulator source: b7140848. Reviewed wiki content: 1d2b671. Current status · Release availability · Publication process.
- Home
- Current status
- Stable versus main
- Implemented mechanisms
- Controls and defaults
- Measured results and limits
- Complete change register
- System
- CPU and vCPU
- Memory and DMA
- Graphics / NV2A
- APU and audio
- Timing and timers
- Platform and I/O
- Hardware observations
- Fidelity boundaries
- Methodology
- PGR2 routes
- Debugging lag / hot paths
- Tools and commands
- DSP capture, replay and fuzzing
- HLE readiness and public XISO proof
- Concurrent DSP shadow and OpenAL proof
- DSP HLE operation inventory
- DSP HLE fix examples and testing
- Development
- Upstream shortlist
- Wiki maintenance
- Research / retired work
- Optimization catalog
- Hot-path shortcuts
- Researched experiments
- Unproven proposal directory
- PR lessons
- September26 snapshot
Repository · PRs · Issues