From 5c9d6c19a4a918e5c7e4fe3cf12d2dcafaac55d0 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 3 Dec 2026 00:56:34 -0800 Subject: [PATCH] Runtime: RestoreFenceRefused's basis arm, and the seam's rows in the signatures table (red, fixed forward) 6b8b3af925 added Refusal::RestoreFenceRefused without regenerating error/basis.rs, so the runtime did not compile (non-exhaustive match in Refusal::basis; job m3-max-82706, lavapipe). basis.rs is regenerated by scripts/refusal-surface/refusal_surface.py from the variant's Basis line. The signatures table takes the five new public items and the new variant (scripts/api-signatures/signatures.py --bless). No behaviour changes: the fenced twins still drop the fence, so the red test stays red. --- crates/metal2vulkan-runtime/src/error/basis.rs | 1 + crates/metal2vulkan/tests/api_signatures.tsv | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/crates/metal2vulkan-runtime/src/error/basis.rs b/crates/metal2vulkan-runtime/src/error/basis.rs index a80d1b420..29c85575e 100644 --- a/crates/metal2vulkan-runtime/src/error/basis.rs +++ b/crates/metal2vulkan-runtime/src/error/basis.rs @@ -72,6 +72,7 @@ impl Refusal { Refusal::ManagedTextureBytes { .. } => RefusalBasis::Ours, Refusal::BufferTextureLayout { .. } => RefusalBasis::Ours, Refusal::TextureNotInPlace { .. } => RefusalBasis::Ours, + Refusal::RestoreFenceRefused { .. } => RefusalBasis::Ours, Refusal::TextureBufferAlignment { .. } => RefusalBasis::MetalDocumented, Refusal::TextureBufferNotOverBuffer => RefusalBasis::Ours, Refusal::HeapTexturePlace { .. } => RefusalBasis::Ours, diff --git a/crates/metal2vulkan/tests/api_signatures.tsv b/crates/metal2vulkan/tests/api_signatures.tsv index 017530884..5ce88fd32 100644 --- a/crates/metal2vulkan/tests/api_signatures.tsv +++ b/crates/metal2vulkan/tests/api_signatures.tsv @@ -5986,7 +5986,9 @@ method metal2vulkan-runtime::Buffer::did_modify_range pub fn did_modify_range(&s method metal2vulkan-runtime::Buffer::gpu_address pub fn gpu_address(&self) -> u64 method metal2vulkan-runtime::Buffer::length pub fn length(&self) -> u64 method metal2vulkan-runtime::Buffer::new_texture pub fn new_texture(&self, descriptor: &TextureDescriptor, index: Option, offset: u64, bytes_per_row: u64) -> Result +method metal2vulkan-runtime::Buffer::new_texture_fenced pub fn new_texture_fenced(&self, descriptor: &TextureDescriptor, index: Option, offset: u64, bytes_per_row: u64, fence: &mut dyn RestoreFence) -> Result method metal2vulkan-runtime::Buffer::new_texture_in_place pub fn new_texture_in_place(&self, descriptor: &TextureDescriptor, index: Option, offset: u64, bytes_per_row: u64) -> Result +method metal2vulkan-runtime::Buffer::new_texture_in_place_fenced pub fn new_texture_in_place_fenced(&self, descriptor: &TextureDescriptor, index: Option, offset: u64, bytes_per_row: u64, fence: &mut dyn RestoreFence) -> Result method metal2vulkan-runtime::Buffer::offset pub fn offset(&self) -> u64 method metal2vulkan-runtime::Buffer::texture_copy_cause pub fn texture_copy_cause(&self, descriptor: &TextureDescriptor, offset: u64, bytes_per_row: u64) -> Result, Error> method metal2vulkan-runtime::ClearColor::new pub fn new(red: f64, green: f64, blue: f64, alpha: f64) -> ClearColor @@ -7204,6 +7206,7 @@ trait metal2vulkan-air::graph::Graph pub trait Graph trait metal2vulkan-air::graph::NodeId pub trait NodeId: Copy + Eq + Ord + Hash + Debug trait metal2vulkan-air::ir::Idx pub trait Idx: Copy + Eq + Ord + fmt::Debug trait metal2vulkan-runtime::BlockMappings pub trait BlockMappings: Send + Sync +trait metal2vulkan-runtime::RestoreFence pub trait RestoreFence trait metal2vulkan::cache::PipelineArtifact pub trait PipelineArtifact: Sized + Send + Sync trait-impl metal2vulkan-air::error::Attachment impl fmt::Display impl fmt::Display for Attachment trait-impl metal2vulkan-air::error::DiagName impl fmt::Debug impl fmt::Debug for DiagName @@ -7362,6 +7365,8 @@ trait-item metal2vulkan-air::ir::Idx::from_index fn from_index(index: usize) -> trait-item metal2vulkan-air::ir::Idx::index fn index(self) -> usize trait-item metal2vulkan-runtime::BlockMappings::map fn map(&self, allocation: &AllocationInfo) -> bool trait-item metal2vulkan-runtime::BlockMappings::unmap fn unmap(&self, allocation: AllocationId) +trait-item metal2vulkan-runtime::RestoreFence::after fn after(&mut self) +trait-item metal2vulkan-runtime::RestoreFence::before fn before(&mut self) -> Result<(), &'static str> trait-item metal2vulkan::cache::PipelineArtifact::from_bytes fn from_bytes(bytes: &[u8], device: &Device) -> Result trait-item metal2vulkan::cache::PipelineArtifact::from_bytes_for_key fn from_bytes_for_key(bytes: &[u8], key: &PipelineKey, device: &Device) -> Result trait-item metal2vulkan::cache::PipelineArtifact::key fn key(&self) -> &PipelineKey @@ -8768,6 +8773,7 @@ variant metal2vulkan-runtime::Refusal::PatchIndexBufferOffset PatchIndexBufferOf variant metal2vulkan-runtime::Refusal::PointSizeTopology PointSizeTopology { class: PrimitiveTopologyClass } variant metal2vulkan-runtime::Refusal::ResolveFormat ResolveFormat { pixel_format: PixelFormat } variant metal2vulkan-runtime::Refusal::ResolveTexture ResolveTexture +variant metal2vulkan-runtime::Refusal::RestoreFenceRefused RestoreFenceRefused { reason: &'static str } variant metal2vulkan-runtime::Refusal::SamplePositions SamplePositions { kind: SamplePositionsKind, count: u32, samples: u32 } variant metal2vulkan-runtime::Refusal::SamplerArgumentIndex SamplerArgumentIndex { index: u32 } variant metal2vulkan-runtime::Refusal::SamplerIds SamplerIds { numbered: usize, given: usize }