From db5fefc2ce1c0d12518fa4b6ee671ce7496b0864 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 21 Nov 2026 11:40:45 -0800 Subject: [PATCH] Translator tests: a volatile pointer load through a loaded pointer is one access Under the resident-table domains a pointer loaded through a wide pointer is two whole words reached through PsbMem, which now reads them as one PhysicalStorageBuffer access (Aligned 4) instead of two word loads. The test counted two volatile loads; it now counts one and still checks the value the chased pointer reaches. Verified: the suite job m3-max-64513 at 428ff0fedd failed this assertion (left 1, right 2) on moltenvk-m3 robust=true; rerun below. --- crates/metal2vulkan/src/tests/engine_dynamic_roots.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan/src/tests/engine_dynamic_roots.rs b/crates/metal2vulkan/src/tests/engine_dynamic_roots.rs index 40bea0cbc..12db7be38 100644 --- a/crates/metal2vulkan/src/tests/engine_dynamic_roots.rs +++ b/crates/metal2vulkan/src/tests/engine_dynamic_roots.rs @@ -944,8 +944,8 @@ fn volatile_accesses_through_a_loaded_pointer_are_exact() { } /// A volatile load of a pointer from the allocation a loaded pointer reaches (a pointer loaded -/// through a wide pointer): its guest address's two words are volatile loads by device address, and -/// the pointer it yields resolves to its allocation. +/// through a wide pointer): its guest address, two whole words, is one volatile load by device +/// address, and the pointer it yields resolves to its allocation. #[test] fn a_volatile_pointer_load_through_a_loaded_pointer_is_exact() { let name = "dyn_volatile_chase"; @@ -971,7 +971,7 @@ fn a_volatile_pointer_load_through_a_loaded_pointer_is_exact() { let a = compile(&bc, name, &p).unwrap_or_else(|e| panic!("{what}: {e}")); link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: L3: {e}")); let (plan, m) = typed_module(&bc, name, &p).expect("module"); - assert_eq!(volatiles(&m), (vec![(PSB, 2)], vec![]), "{what}"); + assert_eq!(volatiles(&m), (vec![(PSB, 1)], vec![]), "{what}"); let res = Resources { buffers: vec![ slot_buffer(0, ptrs.clone()),