Repository navigation
Conversation
Grimkeh
left a comment
There was a problem hiding this comment.
Independent Linux CPU review (b2517d4d)
What changed: shader_meta recognizes literal samplers built with signed BFE; design.md + tests.
Checked: test_shader_meta 29 OK.
Looks correct; no game files.
|
Tested b2517d4 on Windows 11 (CPU only, no GPU needed): pass Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested
AI-assisted (Claude Code). |
Claimed as a new item for signed BFE literal-sampler provenance in #8504. Related: #4604, already merged.
shader_metadropped a literal sampler when a dword came froms_bfe_i32with known operands. For example, offset 28 and width 127 on0xd2f90159leave the signed four-bit field0xd. It sign-extends to0xfffffffd, and masking that to0xc00000produces the same sampler word as an immediate move. The symbol analysis previously emitted no literal sampler for the extract sequence.Fold the signed extract using the existing offset and width clamp, then sign-extend from the last bit of the clamped field. A zero-width field produces zero. An unknown source or control invalidates the destination's previous constant. The regression covers source and control aliasing, ignored control bits, overflow past bit 31, a positive field, zero width, and unknown inputs.
Verification
867d922f0: three subcases fail. Patch: all 29 shader metadata tests and all five operand tests pass. Shader index tests pass.spirv-asandspirv-valfor Vulkan 1.2.salu_diffmatched 500/500 seeded programs.test_image_atomics_guardandtest_image_store_d16(see tests/semantic: three image test files red on main (stale after #4473 and #6805; LLVM_MC on Windows) #7284 and test: cover supported d16 cube image stores #7194) andtest_image_cube_store_glc(missingllvm-mcon PATH). The docs table test also reproduces its failure on base due to duplicate index rows indocs/README.md(docs/README.md: one row each for strand_grooms and ped_catalogues, every fact kept #8366).CPU-only on Windows 11 build 26340, Python 3.14.7, SPIRV-Tools 2026.4. RTX 5090 driver 621.24 installed. No GPU runs or game files.
AI-assisted with Codex.