Skip to content

test: cover Vulkan RTX device feature gating#205

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

test: cover Vulkan RTX device feature gating#205
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/regression-test-coverage-b95f

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 10, 2026

Summary

  • Add a deterministic source-level regression test for Vulkan RTX device feature gating in vk_instance.c.
  • Register test_vulkan_rtx_device_features with CTest under unit;scripts;validation;renderer.

Risky behavior now covered

  • USE_VULKAN_RTX device creation remains opt-in via r_rtx and requires all KHR extension prerequisites plus vkGetPhysicalDeviceFeatures2.
  • RT extensions are only appended after buffer device address, acceleration structure, and ray tracing pipeline feature bits are verified.
  • The RTX VkPhysicalDeviceFeatures2 pNext chain wraps existing device pNext state correctly and avoids duplicate debug buffer-device-address chaining.

Test files added/updated

  • Added tests/scripts/test_vulkan_rtx_device_features.sh.
  • Updated CMakeLists.txt to register the new CTest.

Why this reduces regression risk

  • The RTX enablement path is GPU/driver-dependent and difficult to exercise in headless CI, but mistakes can break Vulkan device creation or partially enable ray tracing on unsupported drivers.
  • This test pins the critical invariants without requiring RT hardware or game data.

Validation

  • tests/scripts/test_vulkan_rtx_device_features.sh /workspace
  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=OFF
  • ctest --test-dir build-coverage-tests -R test_vulkan_rtx_device_features --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