Skip to content

test_dmsh_pool_arrays: the reflect() calls pass an empty cbufs - #2248

Closed
lunks wants to merge 1 commit into
seedds:mainfrom
lunks:pr/pool-arrays-cbufs
Closed

lunks wants to merge 1 commit into
seedds:mainfrom
lunks:pr/pool-arrays-cbufs

Conversation

@lunks

@lunks lunks commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

What and why

e45694b7 made the fixed per-cbuf reflection read res['cbufs'] for every CBUF binding. dm/tools/tests/test_dmsh_pool_arrays.py still calls reflect() with only {'sbufs': []}, so one of its eight tests raises KeyError: 'cbufs' on main. The three calls now pass {'sbufs': [], 'cbufs': []}. Tests only: the shader build is unchanged.

Checked

  • Tests: python3 -I dm/tools/tests/test_dmsh_pool_arrays.py 8 of 8 (1 error before); every test_dmsh_*.py under dm/tools/tests and dm/gfx/tests passes (test_dmsh_pairs.py with DM_GAME set, as it needs); docs_symptoms.py --check current.
  • Games run: none (tests only).
  • Devices and OS: M5 Pro, macOS 27.0.
  • Not checked: iOS; the host and graphics suites (not touched).

Docs

  • No reference entry needed (a test fix); the symptom index is current
  • No game files, keys or data extracted from a game in the change or the attachments

…e fixed per-cbuf reflection reads it

e45694b's fixed per-cbuf reflection reads res['cbufs'] for each CBUF binding, so
the test's three reflect() calls with only 'sbufs' raised KeyError: 'cbufs' (one of
the eight tests reached it). Tests only; the shader build is unchanged.
@github-actions github-actions Bot added the tools Tools and scripts (dm/tools, scripts) label Nov 10, 2026
seedds added a commit that referenced this pull request Nov 11, 2026
…45694b made reflect() read res['cbufs'] for each game uniform slot, which the translator's report always carries, and the suite's three calls still passed only sbufs, so test_pools_and_attributes raised KeyError: 'cbufs' on main (8 tests, 1 error). The calls now pass cbufs, and the first gives slot 5 a fixed extent of 64 bytes and checks that fp_c5 reflects as KIND_CBUF, reg 2, fixed 64, which no test covered. Tests only: no chain tool changes. 8 of 8 pass (PR #2248, PR #2256)

Co-authored-by: Pedro Nascimento <91118+lunks@users.noreply.github.com>
Co-authored-by: akratch <70729875+akratch@users.noreply.github.com>
@seedds

seedds commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Landed on main as c823c3c, with your three calls kept and you credited as co-author. One addition from #2256: the first call gives slot 5 a fixed extent of 64 bytes and asserts that fp_c5 reflects as KIND_CBUF, reg 2, fixed 64, since no test checked that reflect() carries the translator's fixed count through. The suite passes 8 of 8. Thank you.

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

Labels

tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants