Skip to content

test: guard Forward+ pipeline invalidation#221

Draft
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/regression-test-coverage-2dd8
Draft

test: guard Forward+ pipeline invalidation#221
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/regression-test-coverage-2dd8

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 20, 2026

Risky behavior now covered

  • r_forwardPlusShade changes must invalidate only Vulkan world graphics pipelines.
  • vk_destroy_world_graphics_pipelines() must destroy GPU pipeline handles while preserving vk.pipelines_count and pipeline definitions so cached shader_t::vk_pipeline indices do not point at wrong or empty rows.
  • The frame-begin path must not call broad vk_destroy_pipelines() for Forward+ shade changes, avoiding unrelated post-process pipeline teardown and black-screen regressions.

Test files added/updated

  • Updated tests/scripts/test_vulkan_regression_source_guards.sh
  • Updated tests/README.md

Why these tests materially reduce regression risk

  • The covered path is headless-hard to exercise but has high visual blast radius: a small invalidation mistake can corrupt or blank world rendering after a cvar toggle.
  • The guard checks the exact invariants from the recent fix: preserve cached pipeline indices/definitions, clear only destroyed handles, and keep r_forwardPlusShade scoped to world pipeline invalidation.

Validation

  • tests/scripts/test_vulkan_regression_source_guards.sh
  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=OFF
  • ctest --test-dir build-coverage-tests -R test_vulkan_regression_source_guards --output-on-failure
Open in Web View Automation 

Co-authored-by: Tim Fox <timfox@outlook.com>
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