Skip to content

renderer: fix hide/show by removing the unsound draw-list fingerprint replay gate - #10

Merged
brianmk merged 1 commit into
freecad-masterfrom
fix/vulkan-replay-perf
Sep 9, 2026
Merged

renderer: fix hide/show by removing the unsound draw-list fingerprint replay gate#10
brianmk merged 1 commit into
freecad-masterfrom
fix/vulkan-replay-perf

Conversation

@brianmk

@brianmk brianmk commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Removes the draw-list fingerprint replay gate: the fingerprint skipped camera/light/env nodes and claimed replay on hide/show churn, dropping geometry from the replayed frame. The replay decision now falls through to the node sensor's dirty flag instead.

… replay gate

SoVulkanRenderManagerP::prepareRenderParams() short-circuited the graph-
fingerprint walk whenever the retained main draw list's fingerprint was
unchanged (computeSceneFingerprint).  That gate is unsound: the retained
list is the PREVIOUS frame's graph output, so an object visibility toggle
(SoSwitch::whichChild via ViewProvider::hide/show) changes the scene
without yet changing the retained commands - their fingerprint is
unchanged, the walk is skipped, and the stale list is replayed forever.
The result is that hide/show has no effect in the Vulkan viewport.

Always recompute computeGraphFingerprint() when the scene sensor has
fired.  The walk folds the node-id of every render-affecting node
(including SoSwitch), so a whichChild toggle yields a different
fingerprint and forces a re-traverse; camera pose/headlight nodes are
excluded from the walk, so camera-only frames still produce an identical
fingerprint and replay.  Remove the now-dead drawFp* state and correct
the misleading comments.

Add VulkanRenderManagerVisibilityTest, an end-to-end regression test that
renders a SoSwitch-wrapped cube, settles a camera frame, toggles whichChild
and asserts the cube disappears.
@brianmk
brianmk merged commit de70aa2 into freecad-master Sep 9, 2026
9 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