renderer: fix hide/show by removing the unsound draw-list fingerprint replay gate - #10
Merged
Merged
Conversation
… 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.
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.
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.