feat(runtime): add policy parse helpers and unit test suite for d3d12_indirect_draw_policy #2074

Open
github-bot wants to merge 1 commit from github-bot/gh-2074 into main AGit
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-25 19:36 UTC · original
abnalstlll-byte:feat/rt-indirect-draw-policy-coverage → main · +72 −3 · 3 files · 1 commits · open

Summary

  • Added pure parse helpers to
    untime/shims/d3d12_indirect_draw_policy.h:
    • \parse_indirect_draws_disabled(value, len): evaluates boolean policy directly from string buffer without modifying process environment or static cache.
    • \is_indirect_draws_raw_obsolete(value, len): detects obsolete raw mode string.
  • Authored portable unit test suite in
    untime/test/d3d12_indirect_draw_policy_test.cpp\ verifying parse logic across edge cases (case-sensitivity, length bounds, null inputs, obsolete tags) and default environment behaviour.
  • Registered \d3d12_indirect_draw_policy_test\ in
    untime/CMakeLists.txt\ under \if(WIN32).

Verification

  • Claimed in #1608: \RT-INDIRECT-DRAW-POLICY-COVERAGE\ (claim comment: #1608).
  • Compiled and executed \d3d12_indirect_draw_policy_test\ with MinGW C++20: all checks passed.
  • Verified test registration: \python -I tests/test_ctest_registration.py\ (5/5 passed).
  • Line ending check: \python -I tests/test_text_write_line_endings.py\ (passed).
  • Clean-room check: \python -I scripts/check_no_game_data.py\ (passed).

AI-assisted (Claude Code)

**@⁠abnalstlll-byte** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2074) `abnalstlll-byte:feat/rt-indirect-draw-policy-coverage` → `main` · +72 −3 · 3 files · 1 commits · open ### Summary - Added pure parse helpers to \ untime/shims/d3d12_indirect_draw_policy.h\: - \parse_indirect_draws_disabled(value, len)\: evaluates boolean policy directly from string buffer without modifying process environment or static cache. - \is_indirect_draws_raw_obsolete(value, len)\: detects obsolete raw mode string. - Authored portable unit test suite in \ untime/test/d3d12_indirect_draw_policy_test.cpp\ verifying parse logic across edge cases (case-sensitivity, length bounds, null inputs, obsolete tags) and default environment behaviour. - Registered \d3d12_indirect_draw_policy_test\ in \ untime/CMakeLists.txt\ under \if(WIN32)\. ### Verification - Claimed in #1608: \RT-INDIRECT-DRAW-POLICY-COVERAGE\ (claim comment: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). - Compiled and executed \d3d12_indirect_draw_policy_test\ with MinGW C++20: all checks passed. - Verified test registration: \python -I tests/test_ctest_registration.py\ (5/5 passed). - Line ending check: \python -I tests/test_text_write_line_endings.py\ (passed). - Clean-room check: \python -I scripts/check_no_game_data.py\ (passed). AI-assisted (Claude Code)
Add pure parse helper functions parse_indirect_draws_disabled and is_indirect_draws_raw_obsolete in runtime/shims/d3d12_indirect_draw_policy.h to allow direct validation of environment strings. Add a unit test suite in runtime/test/d3d12_indirect_draw_policy_test.cpp and register it in runtime/CMakeLists.txt.

Claimed in #1608: RT-INDIRECT-DRAW-POLICY-COVERAGE.

AI-assisted (Claude Code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:56 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2074/head:github-bot/gh-2074'
git switch 'github-bot/gh-2074'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2074'
git switch 'github-bot/gh-2074'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2074'
git switch 'github-bot/gh-2074'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2074'
git switch 'main'
git merge --squash 'github-bot/gh-2074'
git switch 'main'
git merge --ff-only 'github-bot/gh-2074'
git switch 'main'
git merge 'github-bot/gh-2074'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.