Skip to content

Vulkan: re-record camera-dependent scenes instead of replaying - #66

Merged
brianmk merged 1 commit into
coin-Integratefrom
perf/vulkan-hotpath
Sep 28, 2026
Merged

brianmk merged 1 commit into
coin-Integratefrom
perf/vulkan-hotpath

Conversation

@brianmk

@brianmk brianmk commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Follow-up to #65. The retained-IR replay reuses the cached main draw list on a camera-only frame (matched graph fingerprint), which is only sound when every recorded command is camera-independent.

A node that bakes the camera pose into its retained output -- FreeCAD's screen-constant-size SoShapeScale (origin planes/axes) and SoAutoZoomTranslation -- breaks that assumption: on a zoom the replayed list keeps the previous camera's derived scale until some unrelated change (e.g. a hover highlight) forces a re-record, so the origin planes do not rescale while zooming.

  • SoIRRenderAction::setCameraDependent()/isCameraDependent(): a node sets it from its doAction() during an IR traversal.
  • The manager remembers the flag from the last record and refuses the camera-only replay while the camera version differs from the one the list was recorded at, so such scenes re-record on camera moves. Scenes without such nodes keep replaying (verified: box-only scene still replays apply=0.00 on zoom; datum/origin scene re-records).

The retained-IR replay reuses the cached main draw list on a camera-only
frame (matched graph fingerprint).  That is only sound when every recorded
command is camera-independent.  A node that bakes the camera pose into its
retained output -- FreeCAD's screen-constant-size SoShapeScale (origin
planes/axes) and SoAutoZoomTranslation -- breaks that assumption: on a zoom
the replayed list keeps the previous camera's derived scale until some
unrelated change (e.g. a hover highlight) forces a re-record.

Add SoIRRenderAction::setCameraDependent()/isCameraDependent(): a node sets
it from its doAction() during an IR traversal.  The manager remembers the
flag from the last record and refuses the camera-only replay while the
camera version differs from the one the list was recorded at, so such scenes
re-record on camera moves.  Scenes without such nodes keep replaying.
@brianmk
brianmk force-pushed the perf/vulkan-hotpath branch from 991d63a to 16d89c3 Compare September 28, 2026 02:34
@brianmk
brianmk merged commit 7943e7b into coin-Integrate Sep 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant