Repository navigation
viewer: fix post-processing filter controls reverting to default value - #15330
Conversation
…trol value revert
…hten test comment
…te invalidate on success, harden viewer test helper
sysrsbuild-gh-agentic
left a comment
There was a problem hiding this comment.
Reviewed the synchronize commit (). The three previously unresolved review threads (stopwatch reset, gated invalidate, hardened helper) are all addressed by this push — good. Two new observations below.\n\n🤖 Auto-generated comment by rs-agentic bot
rs-agentic bot — synchronize review (commit a42a490)change approved — previous bot comment threadsThe commit a42a490 ("viewer: scope invalidate gate to a local error buffer, fix stale test comment") fully addresses both outstanding bot comment threads: 1. Stale error_message can suppress invalidation on a successful write The write_value implementation now uses a local write_error buffer — a stale error from a prior option's draw in the same frame can no longer suppress the invalidate on a successful write. 2. Misleading test comment — "async wait" The wait_until comment in test-post-processing-revert.cpp now correctly reads: New-commit review — no new issues foundThe four commits in this PR are clean:
🤖 Auto-generated comment by rs-agentic bot |
Overview: In the viewer, setting a post-processing filter control (e.g. decimation magnitude, rotation) applied the effect but the control snapped back to its previous value; it now stays at the value the user set.
Tracked on [RSDEV-12488], [RSDEV-12502]
Why
Regression from PR #15029 (
viewer-ui-exp-change-avoid-stream-pause), which routed all viewer option writes through the async dispatcher. That async path exists to avoid blocking the UI thread on the FW round-trip — but it never refreshes the control's cached value, relying on the sensor'son_options_changedecho to do so. Software post-processing filters run in-process and emit no such echo, so after the ~2 s user-request mask expired the control reverted to its stale cached value (decimation magnitude → 2, rotation → 0) even though the effect was applied.Summary
processing_block_model) now write synchronously viaset_option, which reads the value back so the control reflects what was applied. FW/sensor options keep the async path.write_value()helper inoption_modelthat routes by awrite_synchronouslyflag; the flag is set for processing-block options.Test plan
controls/post_processing_value_persists: streams depth, enables post-processing + decimation, sets magnitude to a non-default value, and asserts the cached control value tracks the applied value. Verified on D455 — passes with the fix, fails when the option is forced back onto the async path.🤖 Generated by AI