Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/xcl/src/hle/d3d12x/real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4324,7 +4324,7 @@ unsafe impl Send for OwnedDesc {}

/// A hash of a pipeline's shaders in their order (never 0): what `pso_async` knows a used
/// pipeline by in the next run.
fn shaders_key(blobs: &[Vec<u8>]) -> u64 {
pub(crate) fn shaders_key(blobs: &[Vec<u8>]) -> u64 {
let mut h = 0xcbf2_9ce4_8422_2325u64;
for b in blobs {
h = (h ^ crate::gpu::shader::fnv64(b)).wrapping_mul(0x0000_0100_0000_01b3);
Expand Down
7 changes: 7 additions & 0 deletions crates/xcl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Usage:
--direct [--sample N] [--seed S] [--validate] [--compare]: direct DXIL translator
coverage over a seeded sample (default 200 programs, 0 = all); also
--timeout, --max-bytes, --threads, --json, --hash H, --dump DIR.
xcl pso-precompile <game folder | shaders.rpf> [--threads N] [--records FILE] [--used]
Before a run: translates the game's compute programs (its shaders.rpf) and has the
driver compile their pipelines, the ones an earlier run used first, biggest first.
Fills the caches the run reads (DXIL, driver blobs); what is cached is skipped.
--records FILE / --used: only the programs of these record hashes / pipeline keys.
Run it with the run's XCL_DIRECT_DXIL / XCL_HEAP_WINDOWS: they change the keys.
xcl rpf <package.rpf> [--top N] [--find NAME] [--extract NAME --out DIR]
Lists or extracts readable inline records. Archives larger than 1 GB use a
bounded-memory header probe; --probe requests it explicitly and --full overrides it.
Expand Down Expand Up @@ -72,6 +78,7 @@ fn main() {
}
Some("disasm") if args.len() >= 2 => xcl::disasm::run(&PathBuf::from(&args[1]), &args[2..]),
Some("shaders") if args.len() >= 2 => xcl::shaders::run(&PathBuf::from(&args[1]), &args[2..]),
Some("pso-precompile") if args.len() >= 2 => xcl::shaders::pso_precompile(&PathBuf::from(&args[1]), &args[2..]),
Some("rpf") if args.len() >= 2 => xcl::rpf::run(&PathBuf::from(&args[1]), &args[2..]),
Some("--version") | Some("-V") => {
println!("xcl {}", env!("CARGO_PKG_VERSION"));
Expand Down
Loading
Loading