Skip to content

run_gpu_tests: ps_heap_index is run by d3d12_heap_index_test, so skip it there - #9491

Closed
GustawMatuszewski wants to merge 1 commit into
ProjectLeonida:mainfrom
GustawMatuszewski:t13-psheap
Closed

GustawMatuszewski wants to merge 1 commit into
ProjectLeonida:mainfrom
GustawMatuszewski:t13-psheap

Conversation

@GustawMatuszewski

Copy link
Copy Markdown
Contributor

What

ps_heap_index is assembled and translated by scripts/run_gpu_tests.py, but no checker in that runner can judge it, and the pixel fallback has no OTHER_HARNESS entry for it, so it reaches ok, detail = False, "no checker defined". The suite therefore prints

  FAIL  ps_heap_index         no checker defined

and exits 1 on every host — Linux included — for a shader that translates and passes spirv-val. One entry in OTHER_HARNESS puts it where it belongs, next to ps_m2*/ps_m3*: the fixture's own header says Run: d3d12_heap_index_test, and that program is the only thing that can run it (it needs a D3D12 device, the layer's root arguments and the code base — vk_harness binds neither a root signature nor a direct heap base).

                  "cs_buf_typed": "d3d12_buffer_uav_test", "cs_buf_counter": "d3d12_buffer_uav_test",
-                 "ps_live_width": "w64_graphics.py"}
+                 "ps_live_width": "w64_graphics.py",
+                 "ps_heap_index": "d3d12_heap_index_test"}

ps_heap_index.asm arrives with #9276 (d3d12: graphics root arguments in the console layout, head a8dbcb5); that PR does not touch this runner, which is what makes its head red here. The entry is inert on main until the fixture lands, and it is what makes #9276's head green, so it can merge in either order.

Reproduction

Fresh clone of main 5d74c27 (Linux), the fixture from #9276 (runtime/test/shaders/ps_heap_index.asm) in place, runtime/build/linux built from the same commit:

python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --filter heap

Before, scripts/run_gpu_tests.py at 5d74c27:

=== GPU TEST RESULTS ===
  PASS  cs_heap_init          0x1badb002 0xcafef00d 0x80000001 0xffff 0x0 0x0 0x0 0x0
  FAIL  ps_heap_index         no checker defined

1/2 passed
EXIT=1

After, this branch (cb242d0):

=== GPU TEST RESULTS ===
  PASS  cs_heap_init          0x1badb002 0xcafef00d 0x80000001 0xffff 0x0 0x0 0x0 0x0
  SKIP  ps_heap_index         SKIP (run by d3d12_heap_index_test)

1/2 passed, 1 skipped
EXIT=0

Full suite, same box, same build, back to back (only the two lines below differ; the failing sets are identical):

result ps_heap_index exit
5d74c27 224/242 passed, 16 skipped FAIL no checker defined 1
this branch 224/242 passed, 17 skipped SKIP (run by d3d12_heap_index_test) 1

The full-suite exit stays 1 because of one pre-existing, unrelated failure on this GPU: ms_wave_info_s3 reads the clear color (got (-1,-1,-1,-1), want (0.0078,0.0078,0.5,1)), identical before and after this change and untouched by it.

Covering CPU tests, python3 -I:

python3 -I tests/test_run_gpu_tests.py          # 62 tests, OK
python3 -I tests/test_run_gpu_pixel_checks.py   # 11 tests, OK
python3 -I tests/test_shader_checks.py          # 84 tests, 15 errors — same 15 on 5d74c27 (pre-existing, `patch.object(rgt, "run_cmd", ...)` stubs reject `cwd=`)

Synthetic fixtures only, no game files, python -I throughout.

GPU: AMD RX 9060 XT (RDNA4/GFX1200), RADV Mesa 26.0.8, Ubuntu 26.04.
AI-assisted.

… it there

The heap-indexing pixel fixture reads the bound CBV/SRV/UAV heap's base from
its root arguments and loads through s[24:27], which vk_harness cannot give it:
it needs a D3D12 device, the layer's root arguments and the code base. Without
an OTHER_HARNESS entry the pixel fallback in the judging loop reaches its
"no checker defined" branch, so the suite reports

  FAIL  ps_heap_index  no checker defined

and exits 1 on every host, Linux included, even though the shader translates
and spirv-val accepts it. ps_heap_index.asm (runtime/test/shaders) names
d3d12_heap_index_test as its owner, as the other OTHER_HARNESS entries do.
@DaviTostes

Copy link
Copy Markdown

Tested cb242d020 (as pushed, based on main 5d74c2723) on Arch Linux, CPython 3.14.10: no regression, but the mapping itself is not observable here.

  • Full scripts/run_gpu_tests.py: 224/241 passed, 16 skipped, the one failure the known ms_wave_info_s3 flake — same counts as 5d74c2723 on this machine.
  • ps_heap_index produces no standalone case in either the base or this head on Linux: --filter ps_heap_index answers error: --filter 'ps_heap_index' matched no GPU test cases, and the suite log has no ps_heap_index line. The new OTHER_HARNESS entry is what routes it, and d3d12_heap_index_test is a Windows binary that this Linux build does not produce, so the routing can only be exercised on Windows.

Counts and pass/fail only; no game files. AI-assisted (DeepSeek V4.1 Flash coding agent).

@ddaikodaiko

Copy link
Copy Markdown

Windows + GPU check of cb242d0: Windows 10 Pro 10.0.19045, GeForce RTX 3060 Ti, NVIDIA 610.88, MSVC 19.44, Python 3.14.3, llvm-mc 21.1.8. No game files.

python -I scripts\run_gpu_tests.py --build runtime\build --assembler python --no-validate --filter heap
  PASS  cs_heap_init          0x1badb002 0xcafef00d 0x80000001 0xffff 0x0 0x0 0x0 0x0
1/1 passed
python -I tests\test_run_gpu_tests.py         -> Ran 62 tests ... OK
python -I tests\test_run_gpu_pixel_checks.py  -> Ran 11 tests ... OK

ps_heap_index is not selected by the heap filter any more (only cs_heap_init is), which is the change; its own d3d12 test path is not in this build.

One caveat on the fourth command from the description: python -I tests\test_shader_checks.py reports FAILED (errors=15) with TypeError: Wave64Checks.run_checks.<locals>.harness() got an unexpected keyword argument 'cwd'. That is not this PR: the same 15 errors appear on main 867d922 with the same file untouched here.

@sayak-brm sayak-brm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Read the diff (one dict entry in scripts/run_gpu_tests.py), the PR text, and the code around OTHER_HARNESS on main. The branch that reads the table (elif name in OTHER_HARNESS) runs before the ps_ pixel fallback, so the SKIP line should appear as described. On main, neither ps_heap_index.asm nor d3d12_heap_index_test exists, so the entry is inert there, as the description says.

This was a static review. I did not run the tests named in the description or the GPU suite.

Two small points on the PR text, per AGENTS.md and CONTRIBUTING.md: the body does not name a claim ID from the coordination issue, and it has no Depends on: line. If this should merge after #9276, add Depends on: #9276. If it can merge in either order, say so in the body.

Review prepared with Claude Code.

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.

5 participants