perf: render-perf stack (CacheRenderer sticky + E14 batching foundation) - #35
Draft
roncarbot wants to merge 9 commits into
Draft
perf: render-perf stack (CacheRenderer sticky + E14 batching foundation)#35roncarbot wants to merge 9 commits into
roncarbot wants to merge 9 commits into
Conversation
Reuse opaque/blended renderable arrays, use cached entity.maskOwners in draw batching, and project zIndex without Vector3D.subtract allocs.
2 tasks
Parent/scene matrix changes only move the blit quad (local node is transformDisabled). Avoid invalidatePasses/full RTT rebuild; refresh blit elements/style only. Child content still invalidates via materials. Also expose lightweight __AWAY_PERF__ composition counters for the render-perf harness (opaque/blended/materialRuns/cacheRenders).
Author
E4 follow-up (75b0693)CacheRenderer scene-transform: no longer calls full Harness counters: Diggy title (localhost:8080)
Frame win is from stage activeTexture skip (E3) on SwiftShader; Diggy title has zero CacheRenderer RTTs so E4 is latent until filtered gameplay. Draw-cut investigation (Diggy)
|
Diggy title profile: AVM+traverse+draw busy ~2ms while rAF gap ~83ms (compositor backpressure from ~233 blended draws). Timers help harness split CPU vs wait; optional __AWAY_PERF_FINISH__ for gl.finish probe.
Only rebuild RTT when bitmap contents change (child materials, color, filters). Parent partition invalidates refresh the blit quad without re-traversing. Holds Diggy whole-title cacheAsBitmap sticky (E8).
3 tasks
Author
|
E8 sticky Diggy engine-path (real setter, not harness
Companion PRs: view + scene |
7 tasks
… merge) Add DrawCallBatcher (uvMatrix + MVP bake) behind ALLOW_DRAWCALL_BATCHING (default false — prototype cuts Diggy title draws 233→21 but is SWF-unsafe and CPU-heavy on weak profiles). Wire opaque material-sort on the array path, depthOrder Z encoding, and expose __AWAY_RENDER_SETTINGS__ for harness A/B.
…ache) Fix Diggy-corrupting drawcall batcher: world-space bake + AGAL-transposed view upload (full MVP Float3 bake dropped clip.w); same-atlas image gate; opaque-only merge; depth-off painter order inside merged VB (skip opaque sort while batching); bit-exact signature cache with soft eviction. ALLOW_DRAWCALL_BATCHING stays default false — native draw 233→36 / msDraw OK, but swiftshader-cpu4x still msDraw-regresses on merge walk.
Skip tryAdd/merge rebuild for the static opaque prefix when content fingerprint matches; per-batch replay resumes at the first dirty span. Keeps Diggy title draw cut when batching is forced on. Default batching remains OFF — swiftshader-cpu4x still regresses on merged VB raster.
Kill-switches for SwiftShader merge-raster investigate: - DRAWCALL_BATCH_MAX_VERTS / MAX_MERGE (split oversized VBs) - DRAWCALL_BATCH_FRONT_TO_BACK (reverse IB + depth ON) - Perf: batchVerts/Idx, uploadBytes, maxBatchVerts Default ALLOW_DRAWCALL_BATCHING remains false.
Diggy title tessellation can change numVertices under a stable elems.id/transform while E16 keeps recorded batch ops across partial skips after fingerprint refresh — replaying oversized/undersized VBs inflated batchVerts by ~50–60k and risked holes. Validate baked vertCount vs current source sum before replay (missReason 33). ALLOW_DRAWCALL_BATCHING remains default false.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Render-perf branch for Coolmath Diggy / FireBoy Chromebook work.
Kept earlier
E15 VB-merge correctness + cache
renderSceneTransform(+ depthOrder) into positions; uploadview.viewMatrix3Dwith AGAL transpose. Full MVP→Float3 dropped clip.w (empty Diggy).DRAWCALL_BATCH_DISABLE_DEPTHdefault true; skip opaque material sort while batching (depth-in-batch ate Diggy detail).__AWAY_RENDER_SETTINGS__.ALLOW_DRAWCALL_BATCHING=false— Diggy title visual OK when forced on (logo orange≈4800), native msDraw ~0.9 / draws 233→36, but swiftshader-cpu4x msDraw regresses (~23 vs ~3) from per-frame merge/signature walk.Numbers (Diggy title)
Companion: awayjs/graphics#14 (opaque solid atlas; unchanged this turn).
SHA: 37780cb