Frame replay: --shaders takes passes of ours too, by their own hash

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 13:32:18 -06:00
1 parent 03fbb23b27
commit eaef3651c6
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -97,7 +97,7 @@ pub struct Options {
/// these in it.
pub skip_shaders: Vec<String>,
/// Shaders taken from this folder where it has them: `<hash>.dxil`, by
/// the hash the runtime names the title's shader by.
/// the hash the runtime names the title's shader by (ours: by their own).
pub shaders: Option<PathBuf>,
/// With `compare`: the folder the shaders of the second are from.
pub shaders_b: Option<PathBuf>,
@@ -948,7 +948,8 @@ impl Player {
let taken = std::cell::Cell::new(false);
let mut m = super::pso::make(&device, &p.parts, root, |i| {
let other = shaders.and_then(|dir| {
let hash = title_hash(p, i)?;
let own = || frame.codes.get(i as usize).map(|c| c.hash[..8].iter().map(|b| format!("{b:02x}")).collect());
let hash = title_hash(p, i).map(str::to_owned).or_else(own)?;
std::fs::read(dir.join(format!("{hash}.dxil"))).ok()
});
taken.set(taken.get() || other.is_some());