Skip to content

Invalidate translated shaders after bank changes - #793

Merged
NotRexed merged 1 commit into
NotRexed:mainfrom
klimovich008:codex/stamp-shader-bank
Nov 8, 2026
Merged

NotRexed merged 1 commit into
NotRexed:mainfrom
klimovich008:codex/stamp-shader-bank

Conversation

@klimovich008

@klimovich008 klimovich008 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

A build that changes only shader constant or storage-buffer bank handling can reuse translated shaders from the old code. vk_bank.cpp affects translation but is missing from the shader cache stamp.

Why merge

  • One-line change. Add the missing source to the existing stamp inputs.
  • Preserve the cache format, line-ending normalization, defaults and environment overrides.
  • Leave unrelated draw code outside the stamp; no runtime rendering path changes.

Change

  • nx2/build.py: include "vk_bank.cpp" in the explicit translator source tuple.
  • tests/test_shader_stamp_inputs.py: execute the production stamp block and check bank edits, unrelated draw edits and CRLF normalization.

Tested

  • python -I -B tests/run_all.py --jobs 1 --strict shader_stamp_inputs; checks the actual hash block using tiny temporary source files.
  • Fails on the old code, passes now: a bank-only edit leaves the old stamp unchanged and changes the fixed stamp.
  • Windows/Ryzen 7 5700X3D: the CPU-only regression and selected runner pass; no GPU is invoked.
  • CI: the new check passes on Windows/Linux. The suite fails test_mem_trim.py; the unchanged current base reproduces that failure, tracked in tests: mem_trim accepts the BC3 scratch's even-size argument #799.

Not covered

  • This invalidates existing translated caches once, requiring preparation again.
  • No game or GPU run; this does not identify the cause of an existing visual defect.

@NotRexed
NotRexed merged commit 15ec28d into NotRexed:main Nov 8, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants