Repository navigation
Conversation
brianmk
force-pushed
the
fix/vulkan-annotation-restamp
branch
from
October 11, 2026 18:00
7d45a16 to
71e1e24
Compare
Picks up brianmk/coin e1ef24baf: retained overlay commands promoted by Gui::So3DAnnotation -- every PartDesign preview (Draft, Fillet/Chamfer, Thickness, Pattern, Boolean), datum labels and the transform draggers -- were replayed with the previous camera's view matrix after a camera move, so a preview stayed where the old camera had put it until something forced a re-record. Fast-forward from the integration's 9dd90106, so it also carries the retained-IR fixes that were already in the Vulkan stack's coin branch.
brianmk
force-pushed
the
fix/vulkan-annotation-restamp
branch
from
October 11, 2026 22:53
71e1e24 to
b33d4cd
Compare
Owner
Author
|
Superseded by #155: this PR's substance (coin -> 738926470, the annotation-overlay restamp) is already the coin pointer in |
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.
Picks up brianmk/coin
e1ef24baf(in brianmk/coin#84): Vulkan: restamp annotation overlay commands on a camera-only replay.The bug
Gui::So3DAnnotation— the node behind every PartDesign preview, datum label, placement indicator and transform draggger — records its subtree inline and then marks those commandsSO_RENDERPASS_OVERLAY, while they stay in the retained main list. On a camera-only frame that list is replayed and the frame view is restamped into each command, but the restamp loop skipped everyOVERLAY-pass command, on the assumption that overlay commands are the ones re-recorded each frame. The promoted annotation commands are not re-recorded, so they kept the previous camera's view matrix.That matters because the backend does consume the per-command view matrix for overlay commands:
SoVulkanRenderBackendWideLine.cppexpands an overlay command's wide lines on the CPU withcommand.viewMatrix(deliberately, so the NaviCube keeps its own camera — see the "edges/axes drift" comment there). A PartDesign preview's outline is a wide line set, so after a camera move its segments were expanded against the old camera and the preview was drawn where that camera had put it — the reported "draft preview isn't shown correctly, and doesn't update when moving the camera". Frames captured with the new presented-frame hook show exactly that (magenta preview geometry left behind at the previous pose).Fix
Restamp by position instead of by pass: commands before
mainCommandCountbelong to the last main traversal (promoted annotations included) and get the current view whenever they still carry the previous one; the overlay/decoration commands appended after that region were recorded this frame and already have it. Sub-camera commands keep their own view. Measured withCOIN_VULKAN_BACKEND_DEBUG=1while a preview is open and the camera moves:retainedOverlay=8are exactly the annotation-promoted preview commands; before the fix all 8 kept the old camera, after it none does.Same failure mode in other tools (all go through
So3DAnnotation)PartGui::SoPreviewShape: Pad/Pocket (ViewProvider), Draft / Fillet / Chamfer / Thickness (ViewProviderDressUp), Pattern / Mirrored / MultiTransform (ViewProviderTransformed), Boolean, sketch-based features;Gizmo,SoTransformDragger,TaskTransform,ViewProviderDragger;ViewProviderDatum,SoDatumLabel,SoFCPlacementIndicatorKit, the viewer's own annotation.Regression test
FreeCAD-DevTools
fcprobe/vk_annotation_restamp_probe.py+.check.py(run withCOIN_VULKAN_BACKEND_DEBUG=1): opens a Draft and a Fillet preview, moves the camera, and requires both that annotations were present (retainedOverlay > 0, so the check cannot pass vacuously) and that none was left stale (staleOverlayAfter == 0). It FAILS against the unfixed coin output (staleOverlayAfter=8) and passes with this bump.Notes