Add unit coverage for Vulkan postfx parameter sanitization#39
Draft
cursor[bot] wants to merge 1 commit intonext-gen-5from
Draft
Add unit coverage for Vulkan postfx parameter sanitization#39cursor[bot] wants to merge 1 commit intonext-gen-5from
cursor[bot] wants to merge 1 commit intonext-gen-5from
Conversation
Co-authored-by: Tim Fox <timfox@outlook.com>
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.
Summary
This PR adds focused unit coverage for Vulkan post-processing parameter sanitization paths introduced/expanded in recent TAA and auto-exposure work.
Risky behavior now covered
r_taa_feedbackStationaryclamped to[0.0, 0.99]r_taa_feedbackMotionclamped to[0.0, 0.99]r_taa_sharpenclamped to[0.0, 1.0]hasValidTAAHistorycorrectly mapped to shader flag0.0/1.0>= 1e-4) for stablelog2(target/manual)fallback>= 0.01)>= minTest files added/updated
tests/unit/test_vk_postfx_sanitize.csrc/renderers/vulkan/vk_postfx_sanitize.csrc/renderers/vulkan/vk_postfx_sanitize.hsrc/renderers/vulkan/vk_postfx_params.c(calls sanitizer helpers; no intended behavior change)CMakeLists.txt(register new unit test target)Why these tests materially reduce regression risk
These code paths feed shader uniforms every frame and sit on core rendering flow with high blast radius. Regressions in clamp/fallback logic can cause temporal instability, over/under-exposure spikes, or invalid parameters that degrade frame quality across all scenes. The new unit tests lock down edge-case behavior deterministically without GPU/runtime dependencies.
Validation run
ctest -R "unit_macros|unit_vk_postfx_sanitize" --output-on-failure -Vpassed.