Skip to content

Add Vulkan Forward+ PBR regression guards#239

Draft
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/missing-test-coverage-eec4
Draft

Add Vulkan Forward+ PBR regression guards#239
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/missing-test-coverage-eec4

Conversation

@cursor

@cursor cursor Bot commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • Add a deterministic Python CTest source guard for Vulkan Forward+ luminance-sort wiring and PBR fragment specialization-map bounds.
  • Document the new validation target and the existing VM native-module unit in tests/README.md.

Risky behavior now covered

  • PBR ADD_FRAG_SPEC entries must remain contiguous, within both PBR/non-PBR spec_entries[] capacities, and aligned with GLSL constant_id declarations.
  • forward_plus_shade_strength stays mapped to constant id 40 and clamped before pipeline specialization.
  • r_forwardPlusLuminanceSort remains default-on, range-checked, runtime-toggleable, pushed into the compute shader, and honored by shader-side brightest-light selection.

Test files added/updated

  • Added tests/scripts/test_vulkan_forward_plus_pbr_guards.py.
  • Updated CMakeLists.txt to register test_vulkan_forward_plus_pbr_guards when Python3 is available.
  • Updated tests/README.md test inventory.

Why this reduces regression risk

These paths are high-blast-radius renderer logic that is difficult to exercise on headless CI with real Vulkan hardware. The new guard catches source-level regressions that could otherwise reintroduce specialization-map overflows, shader/C constant-id drift, or broken Forward+ luminance sorting.

Validation

  • python3 tests/scripts/test_vulkan_forward_plus_pbr_guards.py /workspace
  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=OFF && ctest --test-dir build-coverage-tests -R test_vulkan_forward_plus_pbr_guards --output-on-failure
  • ctest --test-dir build-coverage-tests -R 'test_vulkan_(runtime_regressions|renderer_guards|regression_source_guards|forward_plus_pbr_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