Repository navigation
tests: fix descriptor-fetch runner mocks and cover all fetch modes - #7122
richardsenra wants to merge 3 commits into
Conversation
devnull34
left a comment
There was a problem hiding this comment.
Verified on Windows 11:
python -m unittest tests/test_shader_checks.pypassed all 92 tests (1.200s).- Validated
TableFetchCheckscovering all 5 descriptor fetch modes (fetch-sint,fetch-uint,fetch-miss,fetch-mixed,fetch-mixed-swap) and fixed shader-check runner mocks withcwdhandling. - Whitespace clean (
git diff HEAD~1..HEAD --check).
|
Independent native Windows/Python 3.15 verification at a233123 in an isolated detached worktree: python -I tests/test_shader_checks.py passes 92/92, no skips. This includes the Wave64 mocks affected by the cwd launch argument and the descriptor-fetch mode tests. Existing #7094 edits the same Wave64 harness signature, so keep that overlap in view at merge time. Synthetic CPU inputs only; no GPU/game files. AI-assisted (Codex). |
|
On
If the rebase takes a while, this turns the file green on - + len(check.TEXTURE_CONSTANTS) + 15)
+ + len(check.TEXTURE_CONSTANTS) + 16) # ... and ps_table_fetch
...
patch.object(check, "texture_gradient_a16_test", return_value=""),
+ patch.object(check, "table_fetch_test", return_value=""),The full Windows test report is in #7333. AI-assisted (Claude Code). |
Claimed in the coordination issue as: TEST-PS-TABLE-FETCH-CHECKS, #6910 (comment)
Depends on: #6866
Depends on: #6833
The descriptor-fetch fixtures in #6866 make 15 existing shader-check subcases crash: the mock runner does not accept
cwd. Teach the mock to accept the shader directory and write a fresh synthetic framebuffer for the five fetch modes; include both new cases in the expected summary count. The standalone command now also runs the four existing tests declared afterunittest.main().Four added tests exercise the actual
table_fetch_testhelper across all five modes: ordered successful runs, immediate failure/skip propagation, rejection of another mode's success line, and rejection of a stale framebuffer when the current invocation writes nothing. Pixel values remain checked by the native texture harness.Validation on Windows 11, Ryzen 7 5700X, 32 GB RAM, NVIDIA GeForce RTX 3070 Ti (8 GB), driver 621.24 / 32.0.16.2124; Python 3.12.10, MSVC 19.44.35230, LLVM 23.1.6, SPIRV-Tools 2026.4, Vulkan SDK 1.4.363.0:
python -I tests/test_shader_checks.py: 84 tests, 15 errors at parentaff46acac60a027f515487f0ae334969b5aa178e.test_run_gpu_tests49,test_run_gpu_tests_paths21,test_run_gpu_pixel_checks11,test_gpu_test_timeout8; all pass.test_check_no_game_data: 8 pass. compileall, make_game help and git diff --check pass.ps_table_fetch2/2 andps_texture_sample2/2 pass on this GPU withLEONIDA_W64_EMULATE=1. Each filter translates and validates all three required shaders; each checked draw compares all 4,096 pixels.test_text_write_line_endingsreportstools/f64_omod_probe.py:268both before and after this change. Existing fixes are f64_omod_probe: pin newline="\n" when writing JSON report #6461, f64_omod_probe: write the --json report with LF on every platform #6597 and tools: write f64_omod_probe reports with LF line endings #6687.This PR adds only the test-file change on top of #6866; the other files in the stacked diff belong to its dependencies. No translator implementation or contract rule changes. No game files or corpus run.
AI-assisted: Codex.