From 742e320bee2d8bcb7c833ddd7d3c1e1a2b8b7244 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 9 Nov 2026 02:46:45 -0800 Subject: [PATCH] REFUSALS.md for what a recovery carries; the carry test's notification sends plainly REFUSALS.md is regenerated by scripts/refusal-surface/refusal_surface.py in job m3-max-11457, and its --check passes. MadeBeforeRecovery's row now says what the recovery does not carry and lists the exportable-event carry site. The carry test's notification no longer drops a Copy Result, which the CPU-ICD clippy rejected. (cherry picked from commit ef076009e82d2bde7f29ff9a81608ec40e94cb6a) --- .../metal2vulkan-runtime/src/tests/device_recovery_carry.rs | 4 +++- docs/REFUSALS.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/device_recovery_carry.rs b/crates/metal2vulkan-runtime/src/tests/device_recovery_carry.rs index 298bfbf48..86e79d9e3 100644 --- a/crates/metal2vulkan-runtime/src/tests/device_recovery_carry.rs +++ b/crates/metal2vulkan-runtime/src/tests/device_recovery_carry.rs @@ -127,7 +127,9 @@ fn a_recovery_carries_events_private_and_fresh_page_buffers() { event.set_signaled_value(5); let listener = SharedEventListener::new(); let (sent, notified) = mpsc::channel(); - let notification = move |_: &SharedEvent, value: u64| drop(sent.send(value)); + let notification = move |_: &SharedEvent, value: u64| { + let _ = sent.send(value); + }; event.notify_listener(&listener, 9, Box::new(notification)); let before = pooled.device().work_counts_now(); let from = heard.lock().unwrap().len(); diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index 26ab25eed..68778dcdd 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -264,7 +264,7 @@ Columns: | `MultisampledBufferCopy` | A blit copy between a buffer and a multisampled texture (`copyFromBuffer:...toTexture:` into, or `copyFromTexture:...toBuffer:` out of, a texture... | every device (runtime piece not built) | `ours` | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs (buffer_into_texture)`, `crates/metal2vulkan-runtime/src/blit_texture.rs (copy_from_texture_to_buffer)` | `rare`: a buffer<->multisampled-texture copy on a device without sample-rate shading, an integer multisample attachment at the count, or the copy format's storage; and, where maintenance8's depth/colour copies are missing or wrong, what the sample-rate draws cannot move: a 16-bit depth on a driver whose codes the fragment-depth draw is not measured to keep, or a depth or stencil texture they cannot sample or render to (emulated elsewhere; the consumer's Maps pans and screensaver make the copy) | | `MultisampledBufferLayout` | A blit copy between a buffer and a multisampled texture (as for `MultisampledBufferCopy`) in one of two buffer layouts that plain Metal copies by... | every device (runtime piece not built) | `ours` | 1: `crates/metal2vulkan-runtime/src/sample_interleave.rs (plan)` | `rare`: a buffer<->multisampled-texture copy at a bytesPerRow of 0 from an offset that is a multiple of 16, or of pixels of 32 bytes or more at a pitch below a row or off the pixel: Metal copies these by rules not yet reduced, and its API validation rejects them | | `ColorAttachmentGroups` | What a render pass the device draws in color groups does not build | every device (runtime piece not built) | `ours` | 1: `crates/metal2vulkan-runtime/src/render/color_groups.rs (gap)` | `app`: in a render pass of more color attachments than the device draws at once (five or more on a device of four), or one at an index past them: a pipeline state of other colors, a tile state, an execution of render commands, a draw reading another group's attachment | -| `MadeBeforeRecovery` | An object made before its device's recovery from the loss of its `VkDevice` (the runtime made a new `VkDevice` behind the device, announced as... | every device (runtime piece not built) | `ours` | 2: `crates/metal2vulkan-runtime/src/device/line.rs (foreign)`, `crates/metal2vulkan-runtime/src/device/line.rs (lost_refusal)` | `app`: any object a program made before its device recovered from a lost VkDevice, used after the recovery | +| `MadeBeforeRecovery` | An object made before its device's recovery from the loss of its `VkDevice` that the recovery did not carry to the new one (the runtime made a new... | every device (runtime piece not built) | `ours` | 3: `crates/metal2vulkan-runtime/src/device/line.rs (foreign)`, `crates/metal2vulkan-runtime/src/device/line.rs (lost_refusal)` (+1) | `app`: any object a program made before its device recovered from a lost VkDevice that the recovery does not carry (a pooled Shared or Managed buffer, a texture, a pipeline state), used after the recovery | | `AdoptedDeviceRecovery` | `Device::recover_for_test` on a device the consumer made (`Device::from_raw`) | every device (runtime piece not built) | `ours` | 1: `crates/metal2vulkan-runtime/src/device/line.rs (recover_for_test)` | `none`: the recovery test hook on a device the consumer made itself | ## 3. Apple-only calls (`Error::AppleOnly`) @@ -780,7 +780,7 @@ Each refusal's sites, with the function that builds it. - `gap::MultisampledBufferCopy`: `crates/metal2vulkan-runtime/src/blit_texture.rs (buffer_into_texture)`; `crates/metal2vulkan-runtime/src/blit_texture.rs (copy_from_texture_to_buffer)` - `gap::MultisampledBufferLayout`: `crates/metal2vulkan-runtime/src/sample_interleave.rs (plan)` - `gap::ColorAttachmentGroups`: `crates/metal2vulkan-runtime/src/render/color_groups.rs (gap)` -- `gap::MadeBeforeRecovery`: `crates/metal2vulkan-runtime/src/device/line.rs (foreign)`; `crates/metal2vulkan-runtime/src/device/line.rs (lost_refusal)` +- `gap::MadeBeforeRecovery`: `crates/metal2vulkan-runtime/src/device/line.rs (foreign)`; `crates/metal2vulkan-runtime/src/device/line.rs (lost_refusal)`; `crates/metal2vulkan-runtime/src/event.rs (carry)` - `gap::AdoptedDeviceRecovery`: `crates/metal2vulkan-runtime/src/device/line.rs (recover_for_test)` - `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs (commit_now)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs (refuse_protected_state_encoder)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs (set)` - `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs (check)`