• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

shader-slang / slang-rhi / 21874377715

10 Feb 2026 04:57PM UTC coverage: 57.652% (-11.6%) from 69.225%
21874377715

push

github

web-flow
Expand on testing & debugging code + change naming/structure of debug options (#622)

* Rework how downstream debug works and naming of debug options

* add missing condition for when to add a debug callback (vulkan)

* use `friend` for encapsulation instead of `extern "C"`

* Address code review

1. enum class DebugLayerOptions ==> struct DebugLayerOptions
    * testing infrastructure was modified accordingly
2. moved members from IRHI to RHI. Other functions were moved as needed
3. removed flags from `DebugMessageType` and `DebugMessageSource`
4. adjusted debug layer logic for d3d12 to disable GPU-AV
5. removed DebugDeviceOptions, using `bool enable.*` instead

* Addressed review

* Removed all global-scope getRHI() wrapper functions
* Moved all `incrementLiveDeviceCount` to `class RHI` and exposed as a `public` function. Separated `RHI` into a header file since this is now needed to access `incrementLiveDeviceCount`.
    * The live device counter is now an atomic<uint32_t>
* Moved `DebugMessageType` and `DebugMessageSource` string conversion functions to the function `enumToString` in the corresponding files
* Added `DeviceImpl::setupDebugLayer` to manage debug-layer logic for `d3d12-device`
* Changed logic so that if using a release build for slang-rhi testing, GPU_TEST defaults to zero validation layers no matter what. Debug build listens to hints.
    * `DebugLayerOptionsBuilder` is now used for setting up per-test debug layer options (ignored if not SLANG_RHI_DEBUG)
* If missing debug-layer support or validation support of a particular type, we no longer `printError` and return `SLANG_FAIL`. We instead `printWarning` and skip enabling the particular feature (this was made to be consistent across `vk-device` and `d3d12-device`).
* added the new test `.cpp` file to the cmake list

* rename `m_totalLiveDevices` to `m_liveDeviceCount`

* run `pre-commit` and address review.

mostly clean-up (removing unused, styling, etc...)
and re-architecturing f... (continued)

9391 of 18910 branches covered (49.66%)

Branch coverage included in aggregate %.

145 of 253 new or added lines in 10 files covered. (57.31%)

5815 existing lines in 36 files now uncovered.

27548 of 45162 relevant lines covered (61.0%)

251645.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.89
/src/d3d/d3d-utils.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc