Skip to content

runtime: name the missing BCPack predictor instead of a blank picture (BCPACK-PREDICTOR-DIAGNOSTIC) - #1660

Closed
slauko wants to merge 1 commit into
ProjectLeonida:mainfrom
slauko:bcpack-predictor-diag
Closed

slauko wants to merge 1 commit into
ProjectLeonida:mainfrom
slauko:bcpack-predictor-diag

Conversation

@slauko

@slauko slauko commented Nov 25, 2026

Copy link
Copy Markdown

Claimed in the coordination issue as: BCPACK-PREDICTOR-DIAGNOSTIC (#1608 (comment)).

What and why

docs/linux_proton.md lists three setup mistakes that each give a blank or empty picture. Two are owned elsewhere (#1528 for SDL3/input, #387 for the executable's embedded shaders); the third is the missing BCPack predictor profile. The runtime already opened <work>/bcpack/history.bcph and fell back silently, and the runtime stage generated it with tools/build_dstorage_history.py --if-needed without checking the result.

  • The runtime's DStorage open line now names the expected path (or LEONIDA_DSTORAGE_HISTORY), the generator, and the consequence (loading art and most BC7 textures stay empty).
  • The runtime stage warns when the generation did not leave the profile behind.

No behaviour change: an existing profile is loaded exactly as before, and an absent one keeps the built-in codec policy; only the message and the warning are new.

Tested

  • python -I tests/test_make_game_dstorage_profile.py — 2 tests: a missing profile names the path, the generator and the BC7 consequence; a present profile returns no hint.
  • python -m compileall -q make_game.py tests/test_make_game_dstorage_profile.py
  • python -I tests/test_make_game_argparse.py — unchanged and green.
  • The C++ change is a string in an existing log_once; the Windows runtime CI compiles it.

No game data: the tests use an empty temporary directory and a synthetic BCPHIST1 file.

AI-assisted: yes.

… (BCPACK-PREDICTOR-DIAGNOSTIC)

The runtime's DStorage open path names the expected profile (LEONIDA_DSTORAGE_HISTORY or <work>/bcpack/history.bcph), the generator tools/build_dstorage_history.py, and the consequence: loading art and most BC7 textures stay empty. The runtime stage warns when --if-needed did not leave the profile behind. No behaviour change; synthetic tests only.
@whoalin1

Copy link
Copy Markdown
Contributor

Independent verification (native Windows): diagnostics-only change (log string + make_game warning). test_make_game_dstorage_profile.py 2 tests OK; ctest -R dstorage passes on both RTX 4070 SUPER and AMD gfx1036 iGPU. AI-assisted verification.

clquwu added a commit to clquwu/leonida-ultimate that referenced this pull request Nov 25, 2026
…Pack diagnostics & parallel DirectStorage pool

- Shaders (tools/rdna2spirv.py):
  - Pixel-shader v_readfirstlane_b32 helper-lane self-read via BuiltIn
    HelperInvocation (Marvisak/VIctory@0601955361, GPL-3.0), preventing
    helper-lane waterfall spins / DEVICE_HUNG and stale lane-0 reads.
  - 64-bit R64ui storage image atomics (dmask:0x3 standard ops + swap,
    dmask:0xf cmpswap, 2D & 3D, glc dual-dword write-back) via Int64ImageEXT /
    SPV_EXT_shader_image_int64 when --int64-atomics is enabled (SW-S4-02,
    ThatRecompDev/five-star-recomp@97dafaa, GPL-3.0).
  - Verified s_setreg_imm32_b32 hwreg(HW_REG_MODE, 2, 2) between S# load and
    image_sample (ThatRecompDev/five-star-recomp@00675d3) already lowers cleanly.
- Wave64 graphics (tools/wave64_halves.py):
  - Propagate UVOTE through untainted s_cselect_b64 and uniform s_and_b64 /
    s_or_b64 / s_cmp_{eq,lg}_u64, promoting uniform scalar-flag branches from
    false-positive Tier C to Tier A/B (soundness-checked against tainted SCC
    and narrowed EXEC).
- BCPack diagnostics & external tables (runtime/src/bcpack.{h,cpp},
  runtime/shims/dstorage.cpp):
  - Name exact BCPack mode, missing predictor (endpoint/index history entry,
    inferred BC7 signature, anchor/p-bit consistency), and guessed block count
    (ProjectLeonida/mandy#1660, GPL-3.0).
  - Load user-calibrated JSON tables for BC1/BC3/BC4/BC5/BC6H/BC7 via
    LEONIDA_BCPACK_TABLES / LEONIDA_DSTORAGE_HISTORY.
- Parallel DirectStorage worker pool (runtime/shims/dstorage.cpp):
  - Clean-room bounded worker pool executing contiguous Request batches
    between Status/Signal/Event barriers concurrently (inspired by
    brcly/TuxBox@285a7ab, Apache-2.0) while preserving strict barrier ordering
    and deterministic queue-order FirstFailure/since_notify_ reporting; zero
    non-trivial thread_local.
@aslan2142 aslan2142 added the needs rebase Conflicts with the base branch: rebase it on main label Nov 25, 2026
@slauko slauko closed this by deleting the head repository Nov 27, 2026
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.

3 participants