Skip to content

docs/testing.md: Known problems row for vk_predicated_copy on Intel ANV (#4709) - #4716

Open
junaydirfan wants to merge 6 commits into
ItsNotRexed:mainfrom
junaydirfan:docs/anv-statistics-transfer
Open

junaydirfan wants to merge 6 commits into
ItsNotRexed:mainfrom
junaydirfan:docs/anv-statistics-transfer

Conversation

@junaydirfan

Copy link
Copy Markdown

Claimed in the coordination issue as: #4683 (comment) (new TEST item)

Refs #4709

What and why

vk_predicated_copy fails on clean main on an Intel GPU with Mesa ANV (line 138: value==0), and nothing in docs/testing.md explains why. This adds one Known problems row.

The cause is in the driver, not the layer (#4709 has the details and a standalone repro). Once a command buffer has recorded a dispatch, ANV performs vkCmdCopyBuffer, vkCmdFillBuffer and vkCmdUpdateBuffer with its own compute shaders, and counts their invocations in the application's COMPUTE_SHADER_INVOCATIONS. The test's 17-byte CopyBufferRegion after SetPredication(nullptr) reads 32, and the count follows the copy size (1 → 16, 100 → 112, 1000 → 1008). I logged the layer's command stream and read back each statistics segment. Every helper dispatch is outside the segments; the 32 is in the last segment, which holds only that copy.

The row doesn't change or skip the test ("fix, don't disable"). The layer-side fix, splitting statistics segments around transfer commands, is posted as a finding for #313 to decide.

Tested

  • vk_predicated_copy_test on main 98fa503f:
    • Intel Raptor Lake-S iGPU (Xe-LP), Mesa ANV 26.3.1, CachyOS kernel 7.3.5: fails at line 138.
    • RTX 4080 Laptop GPU, NVIDIA 620.73.04, same machine: passes.
  • Full ctest at d0835dd9: 47 pass + 1 fail on Intel, 48 pass on NVIDIA (shader_library_corpus and vk_sync_validation skip on both).
  • Standalone repro from Intel ANV (Gen12, Mesa 26.3.1): vk_predicated_copy fails because transfer commands after a dispatch count CS invocations in a statistics query #4709: Intel 32 / 256 / 1024 / 16 after a dispatch, 0 without one; NVIDIA 0 in every case; 3 of 3 runs the same.
  • tests/test_docs_*.py (all 10), tests/test_i18n_index.py, tests/test_check_no_game_data.py, scripts/check_no_game_data.py and git diff --check pass.

Docs only. AI-assisted (Claude Code).

Checklist

  • 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. (Not applicable: no translator change.)

…NV (ItsNotRexed#4709)

On Mesa ANV 26.3.1 (Raptor Lake, Xe-LP), vk_predicated_copy fails at line 138: the empty pipeline-statistics
query reads 32 CS invocations. ANV performs vkCmdCopyBuffer, vkCmdFillBuffer and vkCmdUpdateBuffer with its
own compute shaders once the command buffer has recorded a dispatch, and counts them in the application's
COMPUTE_SHADER_INVOCATIONS (ItsNotRexed#4709 has a standalone Vulkan repro). The row says how to read the failure and
where the layer-side fix is tracked.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at 6f3847b81 on Windows 11: test_docs_table_rows.py 2 OK, test_docs_links.py 6 OK; git diff --check clean.

The new Known-problems row references #4709 for vk_predicated_copy on Intel ANV; the table and links validate. I cannot reproduce the Intel driver case here. No blocking issue.

@kapitche

Copy link
Copy Markdown
Contributor

Tested 6f3847b merged with main 98fa503 on Linux (Python 3.12.16): pass - docs-only; tests/test_docs_*.py 10 files, 30 tests OK. No new tests, so no negative control. Checked the claims against the repo: vk_predicated_copy_test.cpp line 138 is EXPECT(value==0), the test's 17-byte copy (copy_buffer({2,5000,1,0,17})) rounds up to 32 as stated, and #4709 is open with that title.

@memorypressure

memorypressure commented Nov 23, 2026 •

Copy link
Copy Markdown

Verified on Linux: the new Known-problems row is a single docs/testing.md change; test_docs_repo_paths, test_docs_links and the table tests all pass under python -I (the vk_predicated_copy ANV behaviour itself is hardware, unverifiable here). Two heads-ups: no CI checks had been scheduled on the branch yet, and the diff carries the whole round-43 stacked base (~915 commits) in front of your commit — consider rebasing onto main. Also #4212 edits the same file in other sections. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

Correction (2026-11-23): the rebase/integration-stack note above was wrong — our verifier tracked a stale main ref. Those base commits are current main; this head contains main and merge-trees cleanly against de67135. No rebase needed; the tests-pass verdict stands unchanged. See the correction note on #4421.

@tupacfan04

Copy link
Copy Markdown
Contributor

Docs facts check out; one link to fix before merge.

All 10 test_docs_*.py (30 tests), the rpf9 tool tests and compileall pass, merge is clean, and the cited lines match: runtime/test/vk_predicated_copy_test.cpp:138 is EXPECT(value == 0), the 17-byte copy is at :83, and #4709 is the right PR.

docs/testing.md:456, however, says the segment-splitting fix "is open in #4709", while #4709 explicitly defers it to #313 and the PR body says the same. Reword to point at #313 (or say it is unclaimed) and give the workaround the cell promises, rather than "the other tests' results still count".

ANV behaviour is GPU-only here and not reproduced.

AI-assisted review, docs only.

… at ItsNotRexed#313 and says what to do

Review on ItsNotRexed#4716: ItsNotRexed#4709 is the report, not where the fix is tracked; the layer change is an open question for
ItsNotRexed#313 with no PR. The What-to-do cell now tells a tester how to read the failure, and the Cause cell notes that
Mesa 26.3's fix (750db2444a26) disables the count only on newer GPUs.
@junaydirfan

Copy link
Copy Markdown
Author

@tupacfan04 thanks, fair point. Fixed in 505e3a22:

Docs tests still pass.

@memorypressure, the branch is one commit on top of main 98fa503f (+1/-0 before this fix), so there's no stacked base to rebase.

@KkelebekK

Copy link
Copy Markdown

Reviewed 505e3a2: docs-only, merges cleanly with main af70fc7, and the docs tests pass (30). The row matches #4709: vk_predicated_copy_test.cpp:138 is EXPECT(value==0), the byte-to-count figures (17 -> 32, 100 -> 112, 1000 -> 1008) are the issue's, and the Mesa 750db2444a26 caveat is hedged as in the issue. I could not check the Intel behaviour itself (no Intel GPU here). One thing to watch: the last cell says "no PR yet", but #4792 (D3D-494, splitting statistics segments around transfers for Intel Mesa) is now open. If it lands first, the cell should point to it, and the "Expected with Mesa ANV" advice would change.

@kapitche

Copy link
Copy Markdown
Contributor

Tested 505e3a2 merged with main 3faac55 on Linux (WSL2), Python 3.12.16: pass.
Docs-only change (one new troubleshooting row in docs/testing.md). Ran all 10 tests/test_docs_*.py files with -I (29 tests): all OK. No new tests, so no negative control applies.
Read-checked against the merged tree: runtime/test/vk_predicated_copy_test.cpp has EXPECT(value==0) on the statistics words at line 138 and a 17-byte copy_buffer, matching the row's "line 138: value==0" and "17-byte CopyBufferRegion".
Not checked here: the Mesa ANV behaviour and the Mesa fix hash (needs an Intel GPU).

@junaydirfan

Copy link
Copy Markdown
Author

@KkelebekK thanks, good catch. Fixed in 0a78cffd: the last cell now points at #4792 instead of "no PR yet". I tested #4792 on the Raptor Lake ANV GPU (result). Its workaround makes vk_predicated_copy pass on ANV, but only with the flag forced on. The test builds its own VulkanContext and never sets it, so the test still fails with #4792 as it is. That's why the advice to judge the change by the other tests stays for now. Docs tests: 30 passed.

@junaydirfan

Copy link
Copy Markdown
Author

Updated in dcaec961: #4792's new head (42ea27ee) turns the workaround on from the driver ID, and vk_predicated_copy_test passes with it on our ANV GPU (result). The row now says the failure is expected until #4792 is merged. Docs tests pass (11 files). If #4792 is merged first, this row can be dropped instead, and I can close this PR.

@kapitche

Copy link
Copy Markdown
Contributor

Tested dcaec96115 merged with main d327ddf on Linux (WSL2), Python 3.12.16: pass
Merge clean. Docs-only (one row in docs/testing.md). python -I -m compileall -q make_game.py tools tests clean; all 11 tests/test_docs_*.py files print OK under python -I.
Negative control: n/a (docs-only). Claims checked: runtime/test/vk_predicated_copy_test.cpp line 138 is EXPECT(value==0) inside the statistics-readback loop; #4709 exists with the title about vk_predicated_copy on Intel ANV; #4792 (D3D-494, ANV pipeline statistics for transfers) is open, matching the row's 'until #4792 is merged'.
Not checked: the ANV behaviour itself (no Intel ANV GPU here). The row depends on #4792, so it should be dropped or reworded when that lands.

@junaydirfan

Copy link
Copy Markdown
Author

Merged main dde82f27 in b4ab9713 to resolve the conflict: a new row (SHADER-995) landed at the same spot, so both rows are kept, ours after it. The diff against main is still the one row. Of the docs tests, 9 pass; test_docs_cli_flags and test_docs_links fail on main too, because of docs/embedded_shaders.md and docs/gpu_test_results.md, which several open PRs fix (#7879, #7532, #8169).

@YordiLorenzo

Copy link
Copy Markdown

Tested b4ab971 on Linux, Python 3.14.4: pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants