Skip to content

make_game: ignore partial vulkaninfo output after a failed probe (OLD-10067) - #736

Closed
abnalstlll-byte wants to merge 1 commit into
ProjectLeonida:mainfrom
abnalstlll-byte:restore/old-10067-vulkaninfo-probe
Closed

abnalstlll-byte wants to merge 1 commit into
ProjectLeonida:mainfrom
abnalstlll-byte:restore/old-10067-vulkaninfo-probe

Conversation

@abnalstlll-byte

@abnalstlll-byte abnalstlll-byte commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Restores old upstream PR 10067 (OLD-10067, replaces draft #332) with original author attribution (@AGInformatique81) preserved.

When the local vulkaninfo process fails after printing a 64-wide adapter, the build could prematurely select native wave64 by reading that partial output. This change verifies the process exit status before reading adapter limits, ensuring a failed probe reliably falls back to wave64 emulation.

Verification

  • Tested with standard library: python -I tests/test_make_game_wave64.py (39/39 PASS in 2.91s).
  • Clean-room check: python -I scripts/check_no_game_data.py clean (0 issues).
  • Zero external runtime dependencies.
  • AI-assisted (Claude Code).

@KernelSmoker KernelSmoker 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.

Independent Bazzite/Linux verification of PR head c5c7a19c53555c4aa8f040907d35eadea16037ca (base 2d73c242fddfe26d57b52ee150704e6c3b23cff4): python3 -I tests/test_make_game_wave64.py passed 39/39; py_compile and git diff --check passed.

I also exercised the host probe path: vulkaninfo exited 1 with 0 stdout characters, and wave64_settings("auto") returned (True, True), selecting the documented Wave64-emulation fallback. Since this host emitted no partial stdout, that real-device probe does not exercise the new partial-output case; the new regression test covers it with a mocked nonzero exit and parsed-looking stdout. No game data used. AI-assisted independent verification.

@abnalstlll-byte
abnalstlll-byte force-pushed the restore/old-10067-vulkaninfo-probe branch from c5c7a19 to 5f11174 Compare November 25, 2026 21:54
@abnalstlll-byte

Copy link
Copy Markdown
Contributor Author

Rebased onto latest \main.
Verified \python3 -I tests/test_make_game_wave64.py\ (39/39 passed in 3.4s), \scripts/check_no_game_data.py\ (clean), and \git diff --check.

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

@wavehs

wavehs commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

This needs a rebase, and the bug it fixes is still on main f107ae044.

The diff no longer applies: make_game.wave64_settings() has moved (now at make_game.py:1932) and max_subgroup_decider() now returns three values (size, decider, left_out), so the hunk's size = smallest_max_subgroup(r.stdout) no longer exists. The equivalent change is:

-            size, decider, left_out = max_subgroup_decider(r.stdout)
+            if r.returncode == 0:
+                size, decider, left_out = max_subgroup_decider(r.stdout)

The test file still has decide(self, mode, which="vulkaninfo", stdout="", error=None) and real_format(), so the second hunk only needs the returncode=0 parameter and the new test_auto_ignores_partial_stdout_when_vulkaninfo_fails.

I reproduced the defect on current main with the test's own helper: a CompletedProcess(returncode=1, stdout=real_format(("First adapter", 64, []))) and runtime_gpu_info() == {} makes wave64_settings("auto") return (False, True) — native wave64 chosen from a failed probe — where it should return (True, True). No GPU is needed; the script mocks shutil.which, subprocess.run and runtime_gpu_info.

Duplicate: this and #937 are the same change (identical content, different rebase bases), both non-draft and both claiming to replace draft #332. This one is earlier, so it is the one to rebase; #937 can close once this lands.

AI-assisted (review/verification only).

@wavehs

wavehs commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Correction to my recommendation above: the fix now has a consolidated carrier, #2208 ("make_game: harden crash reporting, WINE resolution, and vulkaninfo probing"), which folds in the former #2217 and is the one to rebase. This PR and #937 are duplicates of that part and can close once #2208 lands.

The live-bug evidence above still stands ((False, True) on a failed probe with partial 64-wide output), and #2208 has the same one-line adaptation to make: if r.returncode == 0: around size, decider, left_out = max_subgroup_decider(r.stdout) on current main. If #2208 is abandoned, then rebase the earlier of #736/#937 as previously described.

AI-assisted (review only).

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 27, 2026
@MoonEyes

Copy link
Copy Markdown
Collaborator

Thanks a lot for this, @abnalstlll-byte. The same change is in #937: it carries the same commit by AGInformatique81 (from draft #332) with the same diff to make_game.py and tests/test_make_game_wave64.py, and it was claimed in #14 as DRAFT-332. We could not find a claim for OLD-10067 from this account in #14 or #1608.

I am closing this one so the review happens in one place. Please continue the discussion on #937, or reopen this one if you see something it misses.

AI-assisted (Claude Code, Claude Opus 5.5)

@MoonEyes MoonEyes closed this Nov 27, 2026
tiguan26 pushed a commit to tiguan26/leonida that referenced this pull request Nov 28, 2026
The console compiler loops over a per-lane descriptor by reading the
first active lane's table offset (v_readfirstlane_b32), narrowing EXEC
to the lanes with the same one (v_cmpx_eq_u32), loading that entry
(s_load_dwordx8) and dropping those lanes (s_andn2_wrexec). Such a load
now goes through the waterfall proof; when it holds, each lane loads its
own entry through a non-uniform handle. Unproven, the offset stays the
first lane's, as before.

Translation census over the title's 26,096 programs: none lost, 108 get
past these loops to a later refusal. The 249 programs behind ProjectLeonida#736 also
need per-lane size queries in loops without an access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants