Overhaul the validation workflow around sharded authored cases, dependency-exact observations, incremental indexed corpus audits, bounded parallel translation, and native Metal/Vulkan comparison.\n\nExpand native AIR lowering, reflection, linked-function specialization, resource and stage-interface support, and structural CFG/pointer repair across the harvested macOS 26 corpus. Add exact intrinsic inventory, distributed 16x16x16 matrix lowering, explicit opaque tensor linkage, and regression coverage for the newly supported feature classes.\n\nThe final corpus verification accounts for all 88,819 indexed AIR modules under the current product fingerprint: 65,355 translate and validate directly, 23,464 require exact authored linkage, and zero fail or remain unresolved.
116 lines
4.5 KiB
Rust
116 lines
4.5 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
use std::{fmt, str::FromStr};
|
|
|
|
/// A concrete gap between harvested AIR structure and the authored execution contract.
|
|
///
|
|
/// This is the shared vocabulary for classification, schema/executor capability checks, cached
|
|
/// census rows, and focused audits. Keeping it typed prevents one component from silently
|
|
/// inventing a requirement name that another component cannot select or resolve.
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
|
|
#[serde(rename_all = "snake_case")]
|
|
pub enum ToolingRequirement {
|
|
FunctionConstantLiteral,
|
|
VertexAttributeLiteral,
|
|
TessellationAttributeLiteral,
|
|
TessellationSystemInputLiteral,
|
|
FragmentImageblockMemberLiteral,
|
|
KernelStageInputLiteral,
|
|
TextureBufferLiteral,
|
|
StorageTextureFormatLiteral,
|
|
StaticSamplerReduction,
|
|
StaticSamplerPixelFilter,
|
|
StaticSamplerBicubic,
|
|
StaticSamplerPixelAddress,
|
|
ImplicitImageblockLiteral,
|
|
RayIntersectionLowering,
|
|
IndirectCommandBuffer,
|
|
VisibleFunctionTable,
|
|
VertexSideEffectObservation,
|
|
FragmentVaryingObservationType,
|
|
FragmentVaryingLinkage,
|
|
FragmentOutputObservationType,
|
|
}
|
|
|
|
impl ToolingRequirement {
|
|
pub const ALL: [Self; 20] = [
|
|
Self::FunctionConstantLiteral,
|
|
Self::VertexAttributeLiteral,
|
|
Self::TessellationAttributeLiteral,
|
|
Self::TessellationSystemInputLiteral,
|
|
Self::FragmentImageblockMemberLiteral,
|
|
Self::KernelStageInputLiteral,
|
|
Self::TextureBufferLiteral,
|
|
Self::StorageTextureFormatLiteral,
|
|
Self::StaticSamplerReduction,
|
|
Self::StaticSamplerPixelFilter,
|
|
Self::StaticSamplerBicubic,
|
|
Self::StaticSamplerPixelAddress,
|
|
Self::ImplicitImageblockLiteral,
|
|
Self::RayIntersectionLowering,
|
|
Self::IndirectCommandBuffer,
|
|
Self::VisibleFunctionTable,
|
|
Self::VertexSideEffectObservation,
|
|
Self::FragmentVaryingObservationType,
|
|
Self::FragmentVaryingLinkage,
|
|
Self::FragmentOutputObservationType,
|
|
];
|
|
|
|
pub const fn as_str(self) -> &'static str {
|
|
match self {
|
|
Self::FunctionConstantLiteral => "function_constant_literal",
|
|
Self::VertexAttributeLiteral => "vertex_attribute_literal",
|
|
Self::TessellationAttributeLiteral => "tessellation_attribute_literal",
|
|
Self::TessellationSystemInputLiteral => "tessellation_system_input_literal",
|
|
Self::FragmentImageblockMemberLiteral => "fragment_imageblock_member_literal",
|
|
Self::KernelStageInputLiteral => "kernel_stage_input_literal",
|
|
Self::TextureBufferLiteral => "texture_buffer_literal",
|
|
Self::StorageTextureFormatLiteral => "storage_texture_format_literal",
|
|
Self::StaticSamplerReduction => "static_sampler_reduction",
|
|
Self::StaticSamplerPixelFilter => "static_sampler_pixel_filter",
|
|
Self::StaticSamplerBicubic => "static_sampler_bicubic",
|
|
Self::StaticSamplerPixelAddress => "static_sampler_pixel_address",
|
|
Self::ImplicitImageblockLiteral => "implicit_imageblock_literal",
|
|
Self::RayIntersectionLowering => "ray_intersection_lowering",
|
|
Self::IndirectCommandBuffer => "indirect_command_buffer",
|
|
Self::VisibleFunctionTable => "visible_function_table",
|
|
Self::VertexSideEffectObservation => "vertex_side_effect_observation",
|
|
Self::FragmentVaryingObservationType => "fragment_varying_observation_type",
|
|
Self::FragmentVaryingLinkage => "fragment_varying_linkage",
|
|
Self::FragmentOutputObservationType => "fragment_output_observation_type",
|
|
}
|
|
}
|
|
}
|
|
|
|
impl FromStr for ToolingRequirement {
|
|
type Err = String;
|
|
|
|
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
|
Self::ALL
|
|
.into_iter()
|
|
.find(|requirement| requirement.as_str() == value)
|
|
.ok_or_else(|| format!("unknown tooling requirement {value:?}"))
|
|
}
|
|
}
|
|
|
|
impl fmt::Display for ToolingRequirement {
|
|
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
formatter.write_str(self.as_str())
|
|
}
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn display_and_json_use_the_same_stable_requirement_name() {
|
|
for requirement in ToolingRequirement::ALL {
|
|
assert_eq!(
|
|
serde_json::to_string(&requirement).unwrap(),
|
|
format!("\"{requirement}\"")
|
|
);
|
|
assert_eq!(requirement.to_string().parse(), Ok(requirement));
|
|
}
|
|
}
|
|
}
|