feat(runtime): add feature size validation helpers and unit test suite for d3d12_feature_compat #2067

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

@⁠abnalstlll-byte on GitHub · 2026-11-25 19:26 UTC · original
abnalstlll-byte:feat/rt-d3d12-feature-compat-coverage → main · +185 −0 · 3 files · 1 commits · open

Summary

  • Added helper functions to
    untime/shims/d3d12_feature_compat.h\ for validating SDK-newer feature query payloads:
    • \is_compat_feature(feature): checks whether an enum value is one of the compatibility-defined features (\OPTIONS20, \PREDICATION, \OPTIONS21, \APPLICATION_SPECIFIC_DRIVER_STATE, \BYTECODE_BYPASS_HASH_SUPPORTED).
    • \compat_feature_data_size(feature): returns expected payload size in bytes (8, 16, 4), or 0 for unknown.
    • \is_valid_compat_feature_size(feature, size): checks if query payload buffer size matches expected requirement.
    • \compat_feature_name(feature): provides human-readable identifier strings.
  • Added comprehensive unit test suite in
    untime/test/d3d12_feature_compat_test.cpp\ verifying ABI constants, struct geometry, offsets, predicates, payload size validation, and name mappings.
  • Registered \d3d12_feature_compat_test\ in
    untime/CMakeLists.txt\ under \if(WIN32).

Verification

  • Claimed prior to work in #1608: \RT-D3D12-FEATURE-COMPAT-COVERAGE\ (claim comment: #1608).
  • Compiled with MinGW C++20 and executed \d3d12_feature_compat_test: all test categories passed.
  • Verified test registration: \python -I tests/test_ctest_registration.py\ (5/5 passed).
  • Verified CI registration: \python -I tests/test_ci_registration.py\ (16/16 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:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2067) `abnalstlll-byte:feat/rt-d3d12-feature-compat-coverage` → `main` · +185 −0 · 3 files · 1 commits · open ### Summary - Added helper functions to \ untime/shims/d3d12_feature_compat.h\ for validating SDK-newer feature query payloads: - \is_compat_feature(feature)\: checks whether an enum value is one of the compatibility-defined features (\OPTIONS20\, \PREDICATION\, \OPTIONS21\, \APPLICATION_SPECIFIC_DRIVER_STATE\, \BYTECODE_BYPASS_HASH_SUPPORTED\). - \compat_feature_data_size(feature)\: returns expected payload size in bytes (8, 16, 4), or 0 for unknown. - \is_valid_compat_feature_size(feature, size)\: checks if query payload buffer size matches expected requirement. - \compat_feature_name(feature)\: provides human-readable identifier strings. - Added comprehensive unit test suite in \ untime/test/d3d12_feature_compat_test.cpp\ verifying ABI constants, struct geometry, offsets, predicates, payload size validation, and name mappings. - Registered \d3d12_feature_compat_test\ in \ untime/CMakeLists.txt\ under \if(WIN32)\. ### Verification - Claimed prior to work in #1608: \RT-D3D12-FEATURE-COMPAT-COVERAGE\ (claim comment: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). - Compiled with MinGW C++20 and executed \d3d12_feature_compat_test\: all test categories passed. - Verified test registration: \python -I tests/test_ctest_registration.py\ (5/5 passed). - Verified CI registration: \python -I tests/test_ci_registration.py\ (16/16 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 helper functions is_compat_feature, compat_feature_data_size, is_valid_compat_feature_size, and compat_feature_name to runtime/shims/d3d12_feature_compat.h for validating SDK-newer D3D12 feature query payloads. Add a comprehensive unit test suite in runtime/test/d3d12_feature_compat_test.cpp and register it in runtime/CMakeLists.txt.

Claimed in #1608: RT-D3D12-FEATURE-COMPAT-COVERAGE.

AI-assisted (Claude Code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:42 +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/2067/head:github-bot/gh-2067'
git switch 'github-bot/gh-2067'

Merge

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