Skip to content

OpenGL Performance Candidates

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

OpenGL Performance Candidates

Lifecycle: Performance - Unproven
Reviewed source: 322986f4c5502b3fa887a9605ac8cd88e9b2c579
State: The source paths are verified. Their performance value and compatibility remain unproven because no OpenGL benchmark was run.

The OpenGL backend already has important optimizations: native S3TC uploads, module/program caches, persistent program binaries, glMultiDrawArrays(), buffer orphaning for inline arrays, and partial texture-parameter caching. Those are not new candidates.

This directory covers work that remains around depth generation, cross-context synchronization, uniform uploads, surface readback, geometry streaming, surface-to-texture handling, state application, queries, PVIDEO, and cold shader compilation.

Candidate directory

Candidate Mechanism type Main work under test Technical reference
Native depth variant Numerical/early-depth experiment Custom fragment-depth writes and possible late fragment rejection Open full page →
Asynchronous display handoff Host synchronization architecture CPU waits between render and display contexts Open full page →
Completed display reuse Retained-result shortcut Repeated display composition when all output inputs are unchanged Open full page →
Uniform epoch tracking Prepared-state shortcut Rebuilding and uploading unchanged active uniforms Open full page →
GPU-downscaled readback Transfer-reduction optimization Downloading scaled pixels that the CPU immediately discards Open full page →
Persistent mapped geometry streaming Streaming-buffer architecture Repeated orphan/subdata uploads and opaque driver recycling Open full page →
Copy-image surface transfer Exact copy subset FBO setup, clear, shader draw, and state disturbance for compatible copies Open full page →
Direct surface binding Copy-bypass shortcut Materializing another texture when the surface itself can be sampled safely Open full page →
Sampler objects State separation/cache Reapplying sampling state to texture objects Open full page →
Render-state shadow State-call suppression Reissuing unchanged blend/depth/stencil/raster state every draw Open full page →
Deferred pooled occlusion queries Query-lifetime optimization Per-draw query allocation, blocking result retrieval, and deletion Open full page →
PVIDEO GPU conversion Resource reuse/GPU conversion Repeated RGBA allocation, CPU conversion, and full texture redefinition Open full page →
Cold shader stall avoidance Asynchronous/alternate execution Synchronous compile/link/validation on first-seen states Open full page →

Classification

flowchart TD
    A[OpenGL source-backed idea] --> B{Already implemented?}
    B -->|Yes| C[Document under Implemented; do not duplicate]
    B -->|No| D{Runtime evidence exists?}
    D -->|No| E[Performance - Unproven]
    D -->|Yes, not in main| F[Performance - Researched]
    F -->|Lands in main| G[Performance - Implemented]
Loading

Shared evaluation rule

A successful experiment must prove all of the following:

  1. The intended route was reached often enough to matter.
  2. The expensive work actually disappeared rather than moving elsewhere.
  3. Guest-visible output, ordering, reports, and lifecycle behavior remained within the declared contract.
  4. An uninstrumented Release build improved fixed guest progress or tail latency on a representative workload.
  5. The reference route remained available for unsupported capabilities or failed invariants.

Suggested order

The sharply bounded items should be tested first:

  1. Uniform epoch tracking.
  2. GPU-downscaled surface readback.
  3. Copy-image surface transfer.
  4. PVIDEO texture reuse and GPU conversion.
  5. Query pooling/deferred retrieval.

The higher-risk architectural work follows after route measurements:

  1. Native depth variant.
  2. Asynchronous display handoff and completed-output reuse.
  3. Persistent mapped streaming.
  4. Direct surface binding.
  5. Render-state shadow.
  6. Cold shader stall avoidance.

Related

Clone this wiki locally