d3d12_close_parity_test: the unaligned footprint copies follow WARP's UnrestrictedBufferTextureCopyPitchSupported (OLD-6071) #989

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

@⁠Snooozs on GitHub · 2026-11-24 16:31 UTC · original
Snooozs:carry-old-6071 → main · +27 −6 · 1 files · 1 commits · open

Claimed in the coordination issue as: OLD-6071 (#14)

What and why

Carries on Felix Croasdale's old pull request 6071, which has no old-pr/ branch. The commit is cherry-picked unchanged and keeps its author; it applies cleanly. If the author would rather carry it on, say so and I will close this.

Three unaligned CopyTextureRegion cases are marked layer-stricter against a WARP that accepts them. Windows 10's WARP has no OPTIONS13 and refuses them as the layer does, so the table was wrong there. The test asks the live WARP device and compares the three as matches where the feature is missing.

Tested

Windows 10 Pro 22H2 (10.0.19045), NVIDIA GeForce RTX 5060 Ti (621.01) and WARP, VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, ctest -R "^d3d12_close_parity$":

  • main 3ed8e50b7: fails, now matches WARP; mark it Known::match in the table (3 cases)
  • with this commit: passes

I have not run it on Windows 11. check_no_game_data.py on the changed file: clean. Test-only change.

GPUs tested: NVIDIA GeForce RTX 5060 Ti, driver 621.01, Windows 10 22H2

AI-assisted: yes. Claude Code (Claude Opus 5.5) restored, reviewed and tested the original commit.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator rule)

🤖 Generated with Claude Code

**@⁠Snooozs** on GitHub · 2026-11-24 16:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/989) `Snooozs:carry-old-6071` → `main` · +27 −6 · 1 files · 1 commits · open Claimed in the coordination issue as: OLD-6071 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Carries on Felix Croasdale's old pull request 6071, which has no `old-pr/` branch. The commit is cherry-picked unchanged and keeps its author; it applies cleanly. If the author would rather carry it on, say so and I will close this. Three unaligned CopyTextureRegion cases are marked layer-stricter against a WARP that accepts them. Windows 10's WARP has no OPTIONS13 and refuses them as the layer does, so the table was wrong there. The test asks the live WARP device and compares the three as matches where the feature is missing. ### Tested Windows 10 Pro 22H2 (10.0.19045), NVIDIA GeForce RTX 5060 Ti (621.01) and WARP, VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, `ctest -R "^d3d12_close_parity$"`: - `main` 3ed8e50b7: fails, `now matches WARP; mark it Known::match in the table (3 cases)` - with this commit: passes I have not run it on Windows 11. `check_no_game_data.py` on the changed file: clean. Test-only change. GPUs tested: NVIDIA GeForce RTX 5060 Ti, driver 621.01, Windows 10 22H2 AI-assisted: yes. Claude Code (Claude Opus 5.5) restored, reviewed and tested the original commit. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The three CopyTextureRegion cases with an unaligned placement offset (16, 4) or row pitch (260) are marked
layer-stricter against a WARP that accepts them, which is a runtime reporting
D3D12_OPTIONS13.UnrestrictedBufferTextureCopyPitchSupported (the measured column is Windows 11). Windows 10's
built-in d3d12.dll predates OPTIONS13 (CheckFeatureSupport answers E_INVALIDARG): its WARP refuses them as the
layer does, so the test failed with "now matches WARP; mark it Known::match". The test now asks the live WARP
device and compares those three as matches where it lacks the feature; hosts that have it, and runs without a WARP
device, keep the measured column.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GZEZyXGTTXs4V33hrBw1tD
(cherry picked from commit 2b4da370952a722f355069acd5c3b5b646cc7c40)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:32:08 +00:00
Author
Owner

@⁠kawaii-shakal on GitHub · 2026-11-24 16:42 UTC · original

Review of #989, d3d12_close_parity_test: the unaligned footprint copies follow WARP's UnrestrictedBufferTextureCopyPitchSupported (OLD-6071)

Head: 325636d6d0 (one commit, cherry-picked from 2b4da3709, author Felix Croasdale). Base: merge-base with main is 3ed8e50b7, the current main. Only runtime/test/d3d12_close_parity_test.cpp changes, nothing else differs from main. The claim in #14 (comment 7137704829, OLD-6071) matches the pull request.

Environment: Windows 11 Pro 10.0.26300, d3d12.dll and d3d10warp.dll 10.0.26100.9818 (the same WARP build the table's measured column names), NVIDIA GeForce RTX 5070 Ti (driver 617.42, LEONIDA_VK_DEVICE=5070), VS 18 2026, RelWithDebInfo, -DBUILD_TESTING=ON, one worktree from origin/main. I swapped in only the changed file and rebuilt only d3d12_close_parity_test.

Commands: cmake --build runtime/build --config RelWithDebInfo --target d3d12_close_parity_test -- /m:4, then ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_close_parity$" -V.

Results:

  • main 3ed8e50b7: passes. "113 cases, 82 match WARP, 16 known layer-stricter, 15 known layer-looser, 0 not run, 0 where WARP differs from the measured column, 0 failures". The three unaligned copies: layer 0x80070057, WARP S_OK, layer stricter (known).
  • With the PR: passes with the same summary line, and no warnings in the changed file. This WARP reports OPTIONS13.UnrestrictedBufferTextureCopyPitchSupported, so the override is not applied and the measured column is used.
  • With the PR and the override forced (if (true || !relaxed_copy_pitch(host.p))): fails with 3 failures, for example "FAIL CopyTextureRegion upload, offset 16 (not 512-aligned): layer Close 0x80070057, WARP succeeds". Here that is the right outcome. The override only changes the expectation to "match", and the comparison still uses the live WARP verdict. So if the cap claim and WARP's real answer ever disagree, the test fails instead of passing quietly. On a real Windows 10 host, the live WARP refuses, so match plus the layer refusing passes, as the PR body reports.

Findings:

  1. The condition is a measured cap, not a hard-coded skip. relaxed_copy_pitch (d3d12_close_parity_test.cpp:155-161) queries D3D12_FEATURE_D3D12_OPTIONS13 on the live WARP device. A runtime without OPTIONS13 answers E_INVALIDARG, and that counts as "no". The override runs only after WARP was created and run (lines 515-523). With no WARP device (Wine, for example), the measured column stays.
  2. The layer is still checked, and just as strictly. For the three cases (table lines 230-235), the layer must refuse on both kinds of host. With the cap, the case is layer_stricter against WARP S_OK, so want_layer_ok = false (lines 527-529). Without the cap, it is match against a refusing WARP, so want_layer_ok = false again. A layer that started accepting unaligned footprints would fail on both kinds of host. No case was dropped or turned into a skip, so this fits "fix, don't disable".
  3. Nit: setting c.warp_ok = false for the override means a Windows 10 run no longer prints "WARP's verdict here differs from the measured column" for these rows. The new OPTIONS13 line (lines 516-517) says why instead, which is fine. The header comment at lines 14-18 documents it.
  4. table loses its const (line 481) so it can be changed, and relaxed_pitch has a default member initializer (line 152), so the other 110 rows do not change. Fine.

Verdict: approve. It passes here, the expectation comes from a cap the live WARP device actually reports, and the layer's verdict on the three cases is still asserted the same way on both kinds of host.

AI-assisted.

**@⁠kawaii-shakal** on GitHub · 2026-11-24 16:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/989#issuecomment-7138088559) Review of #989, d3d12_close_parity_test: the unaligned footprint copies follow WARP's UnrestrictedBufferTextureCopyPitchSupported (OLD-6071) Head: 325636d6d0748a3f634d377538fef669e8d6f114 (one commit, cherry-picked from 2b4da3709, author Felix Croasdale). Base: merge-base with main is 3ed8e50b7, the current main. Only runtime/test/d3d12_close_parity_test.cpp changes, nothing else differs from main. The claim in #14 (comment 7137704829, OLD-6071) matches the pull request. Environment: Windows 11 Pro 10.0.26300, d3d12.dll and d3d10warp.dll 10.0.26100.9818 (the same WARP build the table's measured column names), NVIDIA GeForce RTX 5070 Ti (driver 617.42, LEONIDA_VK_DEVICE=5070), VS 18 2026, RelWithDebInfo, -DBUILD_TESTING=ON, one worktree from origin/main. I swapped in only the changed file and rebuilt only d3d12_close_parity_test. Commands: `cmake --build runtime/build --config RelWithDebInfo --target d3d12_close_parity_test -- /m:4`, then `ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_close_parity$" -V`. Results: - main 3ed8e50b7: passes. "113 cases, 82 match WARP, 16 known layer-stricter, 15 known layer-looser, 0 not run, 0 where WARP differs from the measured column, 0 failures". The three unaligned copies: layer 0x80070057, WARP S_OK, layer stricter (known). - With the PR: passes with the same summary line, and no warnings in the changed file. This WARP reports OPTIONS13.UnrestrictedBufferTextureCopyPitchSupported, so the override is not applied and the measured column is used. - With the PR and the override forced (`if (true || !relaxed_copy_pitch(host.p))`): fails with 3 failures, for example "FAIL CopyTextureRegion upload, offset 16 (not 512-aligned): layer Close 0x80070057, WARP succeeds". Here that is the right outcome. The override only changes the expectation to "match", and the comparison still uses the live WARP verdict. So if the cap claim and WARP's real answer ever disagree, the test fails instead of passing quietly. On a real Windows 10 host, the live WARP refuses, so match plus the layer refusing passes, as the PR body reports. Findings: 1. The condition is a measured cap, not a hard-coded skip. `relaxed_copy_pitch` (d3d12_close_parity_test.cpp:155-161) queries D3D12_FEATURE_D3D12_OPTIONS13 on the live WARP device. A runtime without OPTIONS13 answers E_INVALIDARG, and that counts as "no". The override runs only after WARP was created and run (lines 515-523). With no WARP device (Wine, for example), the measured column stays. 2. The layer is still checked, and just as strictly. For the three cases (table lines 230-235), the layer must refuse on both kinds of host. With the cap, the case is layer_stricter against WARP S_OK, so want_layer_ok = false (lines 527-529). Without the cap, it is match against a refusing WARP, so want_layer_ok = false again. A layer that started accepting unaligned footprints would fail on both kinds of host. No case was dropped or turned into a skip, so this fits "fix, don't disable". 3. Nit: setting `c.warp_ok = false` for the override means a Windows 10 run no longer prints "WARP's verdict here differs from the measured column" for these rows. The new OPTIONS13 line (lines 516-517) says why instead, which is fine. The header comment at lines 14-18 documents it. 4. `table` loses its const (line 481) so it can be changed, and `relaxed_pitch` has a default member initializer (line 152), so the other 110 rows do not change. Fine. Verdict: approve. It passes here, the expectation comes from a cap the live WARP device actually reports, and the layer's verdict on the three cases is still asserted the same way on both kinds of host. AI-assisted.
Author
Owner

@⁠Snooozs on GitHub · 2026-11-24 16:44 UTC · original

Thanks @⁠kawaii-shakal. The forced-override run is the check I could not do: where WARP does accept the copies, the changed expectation fails instead of passing quietly. That matches the Windows 10 run in the description. No change needed from my side.

**@⁠Snooozs** on GitHub · 2026-11-24 16:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/989#issuecomment-7138127652) Thanks @⁠kawaii-shakal. The forced-override run is the check I could not do: where WARP does accept the copies, the changed expectation fails instead of passing quietly. That matches the Windows 10 run in the description. No change needed from my side.
Author
Owner

@⁠robot00f on GitHub · 2026-11-24 22:21 UTC · original

Reproduced the failure and checked this commit on a second Windows 10 machine, independent of the one in the description.

The branch is based on 3ed8e50b; git cherry-pick -n 325636d6 onto 6b1bc450 (current main) applies cleanly with no conflict, so only this one file is involved. Because of the older base I did not rebuild the whole tree: I compiled just d3d12_close_parity_test.cpp with the flags and include paths of the existing RelWithDebInfo build.ninja entry and linked it against the current main libraries (gta6rt_d3d12_com, gta6rt_root_signature) into a separate executable, run from the build directory.

Host: Windows 10 Pro 19045, NVIDIA GPU (Pascal class, 4 GB), driver 582.28, WARP from the in-box d3d12.dll 10.0.19041.4355.

  • main without the commit: fails 3/3, deterministic, same three cases (offset 16, offset 4, row pitch 260), each now matches WARP; mark it Known::match in the table; 82 match, 3 where WARP differs from the measured column, 3 failures.
  • with the commit: passes 3/3, WARP has no UnrestrictedBufferTextureCopyPitchSupported (D3D12_OPTIONS13): it refuses the unaligned footprint copies, as the layer does; 85 match, 0 where WARP differs, 0 failures.

So the feature gate is the right discriminator here: this WARP refuses exactly the three cases, and the table is corrected only where the runtime says it should be. python -I scripts/check_no_game_data.py on the file exits 0; tests/test_docs_links.py and tests/test_docs_table_rows.py stay OK.

What I could not check: Windows 11 (no such machine), so the accepted branch of the two is still only covered by your run. I also did not run it through ctest; the executable was invoked directly.

No objection to the change itself. If the original author wants to carry it, fine by me -- this is only a second measurement. AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash).

**@⁠robot00f** on GitHub · 2026-11-24 22:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/989#issuecomment-7146136921) Reproduced the failure and checked this commit on a second Windows 10 machine, independent of the one in the description. The branch is based on `3ed8e50b`; `git cherry-pick -n 325636d6` onto `6b1bc450` (current `main`) applies cleanly with no conflict, so only this one file is involved. Because of the older base I did not rebuild the whole tree: I compiled just `d3d12_close_parity_test.cpp` with the flags and include paths of the existing `RelWithDebInfo` `build.ninja` entry and linked it against the current `main` libraries (`gta6rt_d3d12_com`, `gta6rt_root_signature`) into a separate executable, run from the build directory. Host: Windows 10 Pro 19045, NVIDIA GPU (Pascal class, 4 GB), driver 582.28, WARP from the in-box `d3d12.dll` 10.0.19041.4355. - `main` without the commit: fails 3/3, deterministic, same three cases (`offset 16`, `offset 4`, `row pitch 260`), each `now matches WARP; mark it Known::match in the table`; 82 match, 3 where WARP differs from the measured column, 3 failures. - with the commit: passes 3/3, `WARP has no UnrestrictedBufferTextureCopyPitchSupported (D3D12_OPTIONS13): it refuses the unaligned footprint copies, as the layer does`; 85 match, 0 where WARP differs, 0 failures. So the feature gate is the right discriminator here: this WARP refuses exactly the three cases, and the table is corrected only where the runtime says it should be. `python -I scripts/check_no_game_data.py` on the file exits 0; `tests/test_docs_links.py` and `tests/test_docs_table_rows.py` stay OK. What I could not check: Windows 11 (no such machine), so the accepted branch of the two is still only covered by your run. I also did not run it through `ctest`; the executable was invoked directly. No objection to the change itself. If the original author wants to carry it, fine by me -- this is only a second measurement. AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash).
Author
Owner

@⁠Snooozs on GitHub · 2026-11-24 22:29 UTC · original

Thanks for reproducing it. One correction: I have not run it on Windows 11 either (the description says so), so the branch where WARP accepts the copies is not covered by my run.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠Snooozs** on GitHub · 2026-11-24 22:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/989#issuecomment-7146299071) Thanks for reproducing it. One correction: I have not run it on Windows 11 either (the description says so), so the branch where WARP accepts the copies is not covered by my run. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠qhukz13 on GitHub · 2026-11-25 09:33 UTC · original

Confirmed on a second Windows 10 machine: GeForce GTX 1050 Ti, NVIDIA 582.66, Windows 10 Pro 19045, MSVC RelWithDebInfo, main cdb003ea1 + this PR. d3d12_close_parity fails on main (3 failures: the CopyTextureRegion upload offset 16 / offset 4 / row pitch 260 cases "now match WARP") and passes 3 of 3 with the PR (WARP has no UnrestrictedBufferTextureCopyPitchSupported (D3D12_OPTIONS13); 116 cases, 88 match WARP, ... 0 failures). AI-assisted (Claude Code).

**@⁠qhukz13** on GitHub · 2026-11-25 09:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/989#issuecomment-7158500742) Confirmed on a second Windows 10 machine: GeForce GTX 1050 Ti, NVIDIA 582.66, Windows 10 Pro 19045, MSVC RelWithDebInfo, `main` `cdb003ea1` + this PR. `d3d12_close_parity` fails on `main` (3 failures: the `CopyTextureRegion upload` offset 16 / offset 4 / row pitch 260 cases "now match WARP") and passes 3 of 3 with the PR (`WARP has no UnrestrictedBufferTextureCopyPitchSupported (D3D12_OPTIONS13)`; `116 cases, 88 match WARP, ... 0 failures`). AI-assisted (Claude Code).
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/989/head:github-bot/gh-989'
git switch 'github-bot/gh-989'

Merge

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