From b30d81ad8b6f35af8293e38273c4e1b7893cda18 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 23 Nov 2026 01:04:32 -0800 Subject: [PATCH] Runtime: floor::Capabilities and floor::Features are Debug What: #[derive(Debug)] on floor::Capabilities, and Debug added to floor::Features' derives (which Capabilities holds); the signature table is re-blessed for the two rows. Why: Capabilities holds the answers the runtime's query-chosen forms take (float16, storage reads without a format, 64-bit atomics and floats, maximal reconvergence, subgroup-uniform control flow, the texel offset operand, attachment reads, the feedback loop) and what device creation enables. A consumer that logs a device's answers once at start could print them only field by field. Nothing breaks for a consumer: a derive only adds an impl. Verified: the signature check passes after the bless (source only); the build is the check job dispatched with this commit, and development's checks follow. --- crates/metal2vulkan-runtime/src/floor.rs | 3 ++- crates/metal2vulkan/tests/api_signatures.tsv | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/floor.rs b/crates/metal2vulkan-runtime/src/floor.rs index 389a718c3..21fb33197 100644 --- a/crates/metal2vulkan-runtime/src/floor.rs +++ b/crates/metal2vulkan-runtime/src/floor.rs @@ -324,7 +324,7 @@ pub(crate) const MEMORY_FLAG_NAMES: [(vk::MemoryPropertyFlags, &str); 4] = [ /// The feature structures of Vulkan 1.3 that the floor reads and device creation enables, each /// without its `p_next` link. -#[derive(Clone, Copy, Default)] +#[derive(Clone, Copy, Debug, Default)] pub struct Features { /// `VkPhysicalDeviceFeatures`. pub core: vk::PhysicalDeviceFeatures, @@ -990,6 +990,7 @@ impl std::error::Error for BelowFloor {} /// Metal's counterparts are per-family capabilities (`supportsFamily`), and for storage reads /// `readWriteTextureSupport`; here each is one Vulkan feature. The SIMD groups' other answers /// (subgroup sizes, stages and operations) are properties the translator reads itself. +#[derive(Debug)] pub struct Capabilities { /// `shaderFloat16`: `half` arithmetic in 16 bits. pub float16: bool, diff --git a/crates/metal2vulkan/tests/api_signatures.tsv b/crates/metal2vulkan/tests/api_signatures.tsv index 96c18478d..fb9990359 100644 --- a/crates/metal2vulkan/tests/api_signatures.tsv +++ b/crates/metal2vulkan/tests/api_signatures.tsv @@ -6895,9 +6895,9 @@ struct metal2vulkan-runtime::Viewport #[derive(Clone, Copy, Debug, PartialEq)] p struct metal2vulkan-runtime::VisibleFunctionTable #[derive(Clone)] pub struct VisibleFunctionTable struct metal2vulkan-runtime::VisibleFunctionTableDescriptor #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] #[non_exhaustive] pub struct VisibleFunctionTableDescriptor struct metal2vulkan-runtime::floor::BelowFloor #[derive(Clone, Debug, PartialEq, Eq)] pub struct BelowFloor -struct metal2vulkan-runtime::floor::Capabilities pub struct Capabilities +struct metal2vulkan-runtime::floor::Capabilities #[derive(Debug)] pub struct Capabilities struct metal2vulkan-runtime::floor::DgcFeatures #[derive(Clone, Copy)] #[repr(C)] pub struct DgcFeatures -struct metal2vulkan-runtime::floor::Features #[derive(Clone, Copy, Default)] pub struct Features +struct metal2vulkan-runtime::floor::Features #[derive(Clone, Copy, Debug, Default)] pub struct Features struct metal2vulkan-runtime::floor::IndirectCommandLimits #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct IndirectCommandLimits struct metal2vulkan-runtime::floor::Maintenance8Features #[derive(Clone, Copy)] #[repr(C)] pub struct Maintenance8Features struct metal2vulkan-runtime::floor::MemoryTypes #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct MemoryTypes