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

Open
opened 2026-11-26 21:19:58 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2074
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: feat/rt-indirect-draw-policy-coverage


📝 Commits (1)

  • 2aa908f feat(runtime): add policy parse helpers and unit test suite for d3d12_indirect_draw_policy

📊 Changes

3 files changed (+72 additions, -3 deletions)

View changed files

📝 runtime/CMakeLists.txt (+6 -0)
📝 runtime/shims/d3d12_indirect_draw_policy.h (+16 -3)
➕ runtime/test/d3d12_indirect_draw_policy_test.cpp (+50 -0)

📄 Description

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://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172469043).
  • 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)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2074 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/rt-indirect-draw-policy-coverage` --- ### 📝 Commits (1) - [`2aa908f`](https://github.com/ubiquitarianism/leonida/commit/2aa908fea2f6f519770b2be3172377e3f0fcdd91) feat(runtime): add policy parse helpers and unit test suite for d3d12_indirect_draw_policy ### 📊 Changes **3 files changed** (+72 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+6 -0) 📝 `runtime/shims/d3d12_indirect_draw_policy.h` (+16 -3) ➕ `runtime/test/d3d12_indirect_draw_policy_test.cpp` (+50 -0) </details> ### 📄 Description ### 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://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172469043). - 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2080
No description provided.