From c5554f8cafdbb35a175e4e882059092ef73cdbaf Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 21:50:40 -0800 Subject: [PATCH] replay tests: the swizzled views' two output buffers a pin's 32-KiB span apart The old runtime's player now makes every buffer with a recorded range at its recorded address. The test recorded its two output buffers 4 KiB apart, inside one pin's span, which the runtime refuses (PlayError::Unpinned stopped the play). Metal's pins lie at least a granule apart, so the second buffer is recorded 32 KiB past the first. The addresses play no other part in the test. Verification: the replay device tests on lavapipe run as a potluck job on this commit. --- .../metal2vulkan-validation/src/runtime_lane/replay_streams.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-validation/src/runtime_lane/replay_streams.rs b/crates/metal2vulkan-validation/src/runtime_lane/replay_streams.rs index b0f42926c..9895d86f0 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/replay_streams.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/replay_streams.rs @@ -991,7 +991,8 @@ fn a_view_s_swizzle_is_what_a_kernel_samples() { args.extend(index.map(Value::Uint)); w.call(selector, 7, view, &args, &[])?; } - for (buffer, at) in [(10, OUTPUT), (11, OUTPUT + 0x1000)] { + // A granule apart: each buffer is made at its recorded address, which a pin's span holds. + for (buffer, at) in [(10, OUTPUT), (11, OUTPUT + (32 << 10))] { let length = [Value::Uint(256), Value::Uint(0)]; let at = addressed(at, 256); w.call("newBufferWithLength:options:", 1, buffer, &length, &at)?;