Merge pull request #2841 from heygen-com/07-27-feat_engine_open_drawelement_fast_capture_to_win32_hardware_gpu

feat(engine): open drawElement fast capture to Windows hardware GPU
This commit is contained in:
Vance Ingalls
2026-07-28 04:47:07 -07:00
committed by GitHub
12 changed files with 354 additions and 110 deletions
@@ -72,6 +72,13 @@ export interface RenderCaptureObservability {
dePreInversionWorkers?: number;
/** DE parallel-router outcome: "routed" (fired, held) | "reverted" (fired, self-verify retry rolled back). */
deParallelRouter?: "routed" | "reverted";
/**
* Low-cardinality GPU bucket (`<backend>/<vendor>`) from the DE probe
* session. Lives on capture observability (not just perfSummary) so a hard
* failure — crash / OOM / timeout — still reports which GPU backend it hit:
* that is precisely the cohort the win32 D3D11 rollout must attribute.
*/
deGpuRenderer?: string;
/** Worker count the resolver would have used absent the router; undefined if it never fired. */
dePreRouterWorkers?: number;
/**
@@ -111,6 +111,9 @@ function aggregateDrawElement(
const gateReasons = [
...new Set(perfs.map((p) => p.deGateReason).filter((r): r is string => !!r)),
].sort();
const gpuRenderers = [
...new Set(perfs.map((p) => p.gpuRenderer).filter((r): r is string => !!r)),
].sort();
const drain = de.drainStats;
return {
mode: modes.join("|") || "unknown",
@@ -121,6 +124,7 @@ function aggregateDrawElement(
parallelRouter: de.parallelRouter ?? "none",
preRouterWorkers: de.preRouterWorkers,
gateReason: gateReasons.length > 0 ? gateReasons.join("|") : undefined,
gpuRenderer: gpuRenderers.length > 0 ? gpuRenderers.join("|") : undefined,
workerEncode: perfs.some((p) => p.deWorkerEncode),
verifyArmed: perfs.reduce((sum, p) => sum + (p.deVerifyArmed ?? 0), 0),
verifyChecked: drain?.verifyChecked ?? 0,
@@ -498,6 +498,8 @@ export interface RenderPerfSummary {
preRouterWorkers?: number;
/** Engine init-time gate: swiftshader | css_effect:* | at_risk_timeline | 3d_init_failed | supersampling | render_mode_hint. */
gateReason?: string;
/** Low-cardinality GPU bucket from DE session init (`<backend>/<vendor>`, e.g. `d3d11/nvidia`); |-joined across parallel sessions (bounded: one bucket per distinct backend on the host). */
gpuRenderer?: string;
/** Worker-encode drain (the verified path) was active. */
workerEncode: boolean;
/** Self-verification ground-truth samples armed at init. */
@@ -2642,6 +2644,11 @@ async function executeRenderPipeline(input: {
// any resource-pressure failure unique to this cohort.
dePreInversionWorkers: deWorkerInversion ? preRoutingWorkerCount : undefined,
dePreRouterWorkers: deParallelRouter ? preRoutingWorkerCount : undefined,
// Same rationale as the counters above: carried on live capture
// observability, not only the success-path perfSummary, so a crash /
// OOM / timeout still reports which GPU backend it happened on. That
// is the cohort the win32 D3D11 rollout most needs to attribute.
deGpuRenderer: probeSession?.gpuRenderer,
});
observability.checkpoint("worker_resolution", "resolved", {
workerCount,