Run tile threadgroups of every even shape in Metal's thread layout
The steps this packet landed as, in order: - Read the coverage after the early depth test for [[sample_mask, post_depth_coverage]] - Copy a stencil view's texels by the CPU as plain Metal does - Give multisampled fragment imageblocks a block per sample, and test before writes a test may drop Content: the tree of `development` at becd3e74a9, unchanged.
This commit is contained in:
1 parent
a653c11b49
commit
e323ba2f72
59 files changed
+2735
-390
No files matched your search
@@ -92,6 +92,7 @@ struct Attrs {
|
||||
invariant: bool,
|
||||
clip_array_size: Option<u32>,
|
||||
depth: Option<DepthQualifier>,
|
||||
post_depth_coverage: bool,
|
||||
}
|
||||
|
||||
impl Attrs {
|
||||
@@ -431,6 +432,7 @@ impl<'m> Cx<'m, '_> {
|
||||
Key::Shared => a.shared = true,
|
||||
Key::Invariant => a.invariant = true,
|
||||
Key::ClipDistanceArraySize => a.clip_array_size = Some(ops.u32(name)?),
|
||||
Key::PostDepthCoverage => a.post_depth_coverage = true,
|
||||
Key::DepthQualifier => {
|
||||
a.depth = Some(match key(ops)? {
|
||||
Key::Any => DepthQualifier::Any,
|
||||
@@ -718,6 +720,10 @@ impl<'m> Cx<'m, '_> {
|
||||
Key::PointCoord => builtin(self.meter, Builtin::PointCoord)?,
|
||||
Key::PrimitiveId => builtin(self.meter, Builtin::PrimitiveId)?,
|
||||
Key::SampleId => builtin(self.meter, Builtin::SampleId)?,
|
||||
Key::SampleMaskIn if a.post_depth_coverage && !indirect => {
|
||||
a.allow(self.meter, site, &[&[Key::PostDepthCoverage]])?;
|
||||
ParamRole::Builtin(Builtin::PostDepthCoverage)
|
||||
}
|
||||
Key::SampleMaskIn => builtin(self.meter, Builtin::SampleMaskIn)?,
|
||||
Key::RenderTargetArrayIndex => builtin(self.meter, Builtin::RenderTargetArrayIndex)?,
|
||||
Key::ViewportArrayIndex => builtin(self.meter, Builtin::ViewportArrayIndex)?,
|
||||
@@ -1036,6 +1042,7 @@ fn input_in_stage(role: &ParamRole, stage: &Stage) -> bool {
|
||||
| Builtin::PrimitiveId
|
||||
| Builtin::SampleId
|
||||
| Builtin::SampleMaskIn
|
||||
| Builtin::PostDepthCoverage
|
||||
| Builtin::BarycentricCoord(_) => FRAGMENT,
|
||||
Builtin::RenderTargetArrayIndex | Builtin::ViewportArrayIndex => KERNEL | FRAGMENT,
|
||||
},
|
||||
|
||||
@@ -107,6 +107,9 @@ pub(super) enum Key {
|
||||
Invariant,
|
||||
ClipDistanceArraySize,
|
||||
DepthQualifier,
|
||||
/// `air.post_depth_coverage` (on `air.sample_mask_in`): the coverage after the depth and
|
||||
/// stencil tests.
|
||||
PostDepthCoverage,
|
||||
// ---- Depth qualifier values ----
|
||||
Any,
|
||||
Less,
|
||||
@@ -283,6 +286,7 @@ const KEYS: &[(&str, Key)] = &[
|
||||
("air.invariant", Key::Invariant),
|
||||
("air.clip_distance_array_size", Key::ClipDistanceArraySize),
|
||||
("air.depth_qualifier", Key::DepthQualifier),
|
||||
("air.post_depth_coverage", Key::PostDepthCoverage),
|
||||
("air.any", Key::Any),
|
||||
("air.less", Key::Less),
|
||||
("air.greater", Key::Greater),
|
||||
|
||||
@@ -923,6 +923,10 @@ pub enum Builtin {
|
||||
SampleId,
|
||||
/// `[[sample_mask]]` as an input (`air.sample_mask_in`): the fragment's coverage mask.
|
||||
SampleMaskIn,
|
||||
/// `[[sample_mask, post_depth_coverage]]` (`air.sample_mask_in` with
|
||||
/// `air.post_depth_coverage`): the fragment's coverage mask after the depth and stencil tests,
|
||||
/// in a function Metal's compiler requires to declare `[[early_fragment_tests]]`.
|
||||
PostDepthCoverage,
|
||||
/// `[[barycentric_coord]]`: the fragment's barycentric coordinates, with their
|
||||
/// interpolation.
|
||||
BarycentricCoord(Interpolation),
|
||||
|
||||
@@ -5,9 +5,9 @@ use super::md::{abi_error, diag, kept_bytes, kept_diag, node_ops, tok, Ops, Site
|
||||
use super::sampler::decode_global;
|
||||
use super::structs::Structs;
|
||||
use super::{
|
||||
AirAbi, CompileOptions, EntryPoint, FunctionConstantDecl, LanguageVersion, LinkageSignature,
|
||||
LinkageSignatureKind, ModuleLimits, PatchInfo, PatchKind, Stage, StaticSampler, Version,
|
||||
VisibleFunctionRef, VisibleSymbol, VisibleTarget,
|
||||
AirAbi, Builtin, CompileOptions, EntryPoint, FunctionConstantDecl, LanguageVersion,
|
||||
LinkageSignature, LinkageSignatureKind, ModuleLimits, ParamRole, PatchInfo, PatchKind, Stage,
|
||||
StaticSampler, Version, VisibleFunctionRef, VisibleSymbol, VisibleTarget,
|
||||
};
|
||||
use crate::budget::Meter;
|
||||
use crate::error::Error;
|
||||
@@ -477,6 +477,20 @@ fn entry(cx: &mut Cx<'_, '_>, stage: Named, id: MdId) -> Result<EntryPoint, Erro
|
||||
let op = op.ok_or_else(|| site.err(AbiError::BadValue, None))?;
|
||||
params.push(cx.param(op, &name, &stage, types)?);
|
||||
}
|
||||
// Metal's compiler requires `[[early_fragment_tests]]` of a function that reads the coverage
|
||||
// after the depth test ("'early_fragment_tests' is required ... by attribute
|
||||
// 'post_depth_coverage'"): without it the coverage the input names is not defined.
|
||||
let post_depth = params
|
||||
.iter()
|
||||
.any(|p| p.role == ParamRole::Builtin(Builtin::PostDepthCoverage));
|
||||
if post_depth
|
||||
&& stage
|
||||
!= (Stage::Fragment {
|
||||
early_fragment_tests: true,
|
||||
})
|
||||
{
|
||||
return Err(site.err(AbiError::MissingKey, Some("early_fragment_tests")));
|
||||
}
|
||||
Ok(EntryPoint {
|
||||
func,
|
||||
stage,
|
||||
|
||||
@@ -736,6 +736,59 @@ fn vertex_and_fragment_interfaces_decode() {
|
||||
);
|
||||
}
|
||||
|
||||
/// A fragment function reading `uint` input `mask` with the sample-mask keys `keys`, declaring
|
||||
/// `[[early_fragment_tests]]` where `early`.
|
||||
fn fragment_mask(keys: &[&'static str], early: bool) -> Result<AirAbi, Error> {
|
||||
let mut b = ModuleBuilder::new();
|
||||
let f32t = b.float();
|
||||
let v4 = b.vector(f32t, 4);
|
||||
let i32t = b.int(32);
|
||||
let fs = entry_fn(&mut b, "fs", v4, &[i32t]);
|
||||
let rt = node(&mut b, &[S("air.render_target"), I(0), I(0)]);
|
||||
let fs_out = node(&mut b, &[N(rt)]);
|
||||
let mut ops = vec![I(0)];
|
||||
ops.extend(keys.iter().map(|&k| S(k)));
|
||||
ops.extend([
|
||||
S("air.arg_type_name"),
|
||||
S("uint"),
|
||||
S("air.arg_name"),
|
||||
S("mask"),
|
||||
]);
|
||||
let mask = node(&mut b, &ops);
|
||||
let fs_in = node(&mut b, &[N(mask)]);
|
||||
let mut entry = vec![F(fs), N(fs_out), N(fs_in)];
|
||||
if early {
|
||||
entry.push(S("early_fragment_tests"));
|
||||
}
|
||||
let e = node(&mut b, &entry);
|
||||
b.named_md("air.fragment", &[e]);
|
||||
let m = b.finish().unwrap();
|
||||
decode(&m, &PointeeTable::default(), &mut meter())
|
||||
}
|
||||
|
||||
/// `[[sample_mask, post_depth_coverage]]` (`air.sample_mask_in` with `air.post_depth_coverage`,
|
||||
/// as Apple's compiler writes it) decodes as the coverage after the depth test, in a function that
|
||||
/// declares `[[early_fragment_tests]]`, which Metal's compiler requires of it; without them, and
|
||||
/// on another builtin, the key is refused.
|
||||
#[test]
|
||||
fn post_depth_coverage_decodes_with_early_tests() {
|
||||
let role = |abi: AirAbi| abi.entries[0].params[0].role.clone();
|
||||
assert_eq!(
|
||||
role(fragment_mask(&["air.sample_mask_in"], false).unwrap()),
|
||||
ParamRole::Builtin(Builtin::SampleMaskIn)
|
||||
);
|
||||
let post = ["air.sample_mask_in", "air.post_depth_coverage"];
|
||||
assert_eq!(
|
||||
role(fragment_mask(&post, true).unwrap()),
|
||||
ParamRole::Builtin(Builtin::PostDepthCoverage)
|
||||
);
|
||||
expect_abi(fragment_mask(&post, false), AbiError::MissingKey);
|
||||
expect_abi(
|
||||
fragment_mask(&["air.sample_id", "air.post_depth_coverage"], true),
|
||||
AbiError::UnknownKey,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn outputs_must_match_the_return_value() {
|
||||
expect_abi(graphics(true), AbiError::SignatureMismatch);
|
||||
|
||||
@@ -638,8 +638,9 @@ degradations! {
|
||||
/// read and write in a storage image of the render area (`fragment_imageblock.rs`).
|
||||
FragmentImageblockStorage = "fragment-imageblock-storage", Performance,
|
||||
"an R32Uint array image per pass over the render area, a layer per 4 bytes of a \
|
||||
pixel's imageblock, cleared before the pass, which the draws read and write in the \
|
||||
pixel interlock: memory and bandwidth that Metal's tile memory does not spend";
|
||||
pixel's imageblock and per sample, cleared before the pass, which the draws read \
|
||||
and write in the pixel interlock: memory and bandwidth that Metal's tile memory \
|
||||
does not spend";
|
||||
/// A command buffer uses a texture over the caller's image whose home layout is not
|
||||
/// `GENERAL` (`Device::new_texture_with_vk_image`): every image the runtime uses rests in
|
||||
/// `GENERAL`.
|
||||
|
||||
@@ -960,6 +960,7 @@ const EXTENSIONS: &[(VkExtension, &CStr)] = {
|
||||
(X::KhrShaderBfloat16, c"VK_KHR_shader_bfloat16"),
|
||||
(X::QcomTileShading, c"VK_QCOM_tile_shading"),
|
||||
(X::KhrFormatFeatureFlags2, c"VK_KHR_format_feature_flags2"),
|
||||
(X::ExtPostDepthCoverage, c"VK_EXT_post_depth_coverage"),
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,9 @@ use crate::capabilities::Query;
|
||||
use crate::error::RuntimeGap;
|
||||
use crate::framebuffer_fetch::{through_inputs, through_storage};
|
||||
use crate::rate_mapped_pass::RegionRefusal;
|
||||
use metal2vulkan::device::{OpBits, StageSimd, SubgroupOp, VkExtension, VkFeature, VkProperty};
|
||||
use metal2vulkan::device::{
|
||||
DriverWorkaround, OpBits, StageSimd, SubgroupOp, VkExtension, VkFeature, VkProperty,
|
||||
};
|
||||
use metal2vulkan::error::{Capability, Feature, LowerFamily, Unsupported};
|
||||
use metal2vulkan::metal::format::storage_image_choice;
|
||||
use metal2vulkan::metal::{ArgumentBuffersTier, PixelFormat, ReadWriteTextureTier};
|
||||
@@ -920,12 +922,11 @@ impl FeatureRow {
|
||||
// (`buffer_texture::view_usage`), and a texture over a buffer whose image no copy can
|
||||
// write (`texture.rs`).
|
||||
F::LinearTextures => first([gap(G::Textures)]),
|
||||
// A stencil view of a depth/stencil texture (`Texture::new_texture_view`): sampled,
|
||||
// read and blitted where the view is `X32Stencil8` of `Depth32FloatStencil8`
|
||||
// (probes). A blit through a depth or stencil view of another format than its
|
||||
// texture's, and a stencil view's host access, are refused
|
||||
// (`NotImplemented(Textures)`): Metal's answers are not measured.
|
||||
F::StencilTextureViews => first([gap(G::Textures)]),
|
||||
// The stencil view of a combined depth/stencil texture (`X32Stencil8` of
|
||||
// `Depth32FloatStencil8`, `Texture::new_texture_view`), the one depth or stencil view
|
||||
// of another format Metal makes: sampled, read, blitted and copied by the CPU as
|
||||
// plain Metal does (probes).
|
||||
F::StencilTextureViews => RowState::Exact,
|
||||
// Arrays of textures and samplers indexed by a value the function computes: the
|
||||
// compile layer's descriptor arrays, which `shader*ArrayDynamicIndexing` lets it index.
|
||||
F::ArrayOfTexturesRead => first([needs_features(
|
||||
@@ -1201,9 +1202,27 @@ impl FeatureRow {
|
||||
F::Tessellation | F::IndirectTessellationArguments => {
|
||||
first([not_implemented(Feature::Tessellation)])
|
||||
}
|
||||
// Coverage after the depth test (`[[post_depth_coverage]]`): not lowered.
|
||||
// Coverage after the depth test (`[[sample_mask, post_depth_coverage]]`): `SampleMask`
|
||||
// under the `PostDepthCoverage` mode, which `VK_EXT_post_depth_coverage` provides. A
|
||||
// driver that splits a clipped triangle's pixel-rate fragments refuses every coverage
|
||||
// read of a multisampled pipeline (`pipeline::link`), the only one where it differs.
|
||||
F::PostDepthCoverage => {
|
||||
first([not_implemented(Feature::Lowering(LowerFamily::Fragment))])
|
||||
let split = DriverWorkaround::ClippedTrianglesSplitPixelFragments;
|
||||
first([
|
||||
(!f.profile
|
||||
.enabled()
|
||||
.extensions
|
||||
.contains(&VkExtension::ExtPostDepthCoverage))
|
||||
.then(|| {
|
||||
refused(Unsupported::needs(
|
||||
Feature::PostDepthCoverage,
|
||||
Capability::Extension(VkExtension::ExtPostDepthCoverage),
|
||||
))
|
||||
}),
|
||||
f.profile.workarounds().contains(&split).then(|| {
|
||||
refused(Unsupported::driver_defect(Feature::PixelCoverage, split))
|
||||
}),
|
||||
])
|
||||
}
|
||||
// Pre-raster per-vertex values, and global built-ins and bindings: not lowered.
|
||||
F::PreRasterVertexValues | F::GlobalBuiltinsAndBindings => {
|
||||
@@ -1325,8 +1344,15 @@ impl FeatureRow {
|
||||
// sharing the pass's storage with its tile functions' explicit imageblocks. The runtime
|
||||
// refuses a pass whose draws view imageblocks of different masters or sizes
|
||||
// (`ImageblockMasters`), and one with a tile function's explicit imageblock aliased
|
||||
// onto the attachments beside them (`TileAndFragmentImageblocks`); the compile layer
|
||||
// refuses a multisampled pass's, and one a test may drop after it wrote.
|
||||
// onto the attachments beside them (`TileAndFragmentImageblocks`). A multisampled
|
||||
// pass's function reaches each sample's block, once per sample, and a write the tests
|
||||
// may drop runs the tests first, early or in the shader (`TestedStorageWrites`); the
|
||||
// compile layer and the binder refuse, as not implemented, a writing function under
|
||||
// alpha to coverage, and where its tests act in a counted draw, over a depth format
|
||||
// other than 32-bit float or a stencil attachment alone; and, on MoltenVK at more
|
||||
// than one sample, whose early tests drop image writes
|
||||
// (`EarlyTestsDropMultisampledImageWrites`), one declaring early tests that discards,
|
||||
// returns depth, stencil or a mask, or writes other memory.
|
||||
F::Imageblocks => first([
|
||||
needs_features(
|
||||
f,
|
||||
@@ -1340,12 +1366,12 @@ impl FeatureRow {
|
||||
not_implemented(Feature::Imageblocks),
|
||||
]),
|
||||
// Tile dispatches run in the render encoder: a tile function over the pass's tiles, in
|
||||
// a single-sampled pass of one layer, in threadgroups of a measured layout (squares to
|
||||
// 32x32 and power-of-two rectangles). The compile layer and the binder refuse the rest
|
||||
// of what Metal takes (`NotImplemented(TileShading)`): a multisampled pass's tile
|
||||
// function, and so its sample coverage, a threadgroup of another shape (odd sides,
|
||||
// 16x2), and a layered pass. Threadgroup memory that persists through the pass is
|
||||
// built.
|
||||
// a single-sampled pass of one layer, in threadgroups of even sides to 32x32 (and the
|
||||
// single thread), each thread at Metal's place. The compile layer and the binder
|
||||
// refuse the rest of what Metal takes (`NotImplemented(TileShading)`): a multisampled
|
||||
// pass's tile function, and so its sample coverage, a threadgroup with an odd side,
|
||||
// whose quads leave lanes empty, and a layered pass. Threadgroup memory that persists
|
||||
// through the pass is built.
|
||||
F::TileShaders | F::ImageblockSampleCoverageControl | F::NonsquareTileDispatch => {
|
||||
first([not_implemented(Feature::TileShading)])
|
||||
}
|
||||
|
||||
@@ -7,7 +7,12 @@
|
||||
//! the whole pass: an `R32_UINT` 2D-array storage image of every pixel of every tile over the
|
||||
//! render area (from the origin; the render area itself in a pass of no tile size) and one
|
||||
//! layer per word of the cell (`FragmentImageblock::words`), whose layer `w` holds word `w` of
|
||||
//! pixel `(x, y)`'s cell at texel `(x, y)`. Made at the pass's first draw or tile dispatch that
|
||||
//! pixel `(x, y)`'s cell at texel `(x, y)`. A pass of more than one sample keeps a cell per
|
||||
//! sample, as Metal does (measured on the M3 Max at four samples): layer `s * words + w` holds
|
||||
//! word `w` of sample `s`'s cell, which a function compiled for the pass's pipelines reaches at
|
||||
//! its `SampleId` (`lower::fragment::imageblock`); only draws make such a storage (a tile
|
||||
//! function in a multisampled pass is refused), so every draw's cell is its words. Made at the
|
||||
//! pass's first draw or tile dispatch that
|
||||
//! reaches it, it rests in `GENERAL` like every runtime image, and is bound to each such draw
|
||||
//! and dispatch as a storage view of every layer where the plan writes
|
||||
//! `WriteSource::Imageblock`.
|
||||
@@ -97,8 +102,10 @@ use metal2vulkan::vk::{
|
||||
#[derive(Clone)]
|
||||
pub(super) struct PassImageblock {
|
||||
texture: Texture,
|
||||
/// One layer per word of the cell.
|
||||
/// The words of a cell.
|
||||
words: u32,
|
||||
/// One layer per word of each sample's cell.
|
||||
layers: u32,
|
||||
/// The bytes of a cell: the fragment functions' `air.imageblock_data_size`, or the tile
|
||||
/// function's cell.
|
||||
bytes: u32,
|
||||
@@ -154,12 +161,15 @@ impl PassImageblock {
|
||||
));
|
||||
}
|
||||
let [width, height] = covered(layout);
|
||||
let layers = words
|
||||
.checked_mul(layout.samples.max(1))
|
||||
.ok_or_else(|| internal("an imageblock storage of too many layers"))?;
|
||||
let descriptor = TextureDescriptor {
|
||||
texture_type: TextureType::Type2DArray,
|
||||
pixel_format: PixelFormat::R32Uint,
|
||||
width: width.into(),
|
||||
height: height.into(),
|
||||
array_length: words.into(),
|
||||
array_length: layers.into(),
|
||||
usage: TextureUsage::SHADER_READ | TextureUsage::SHADER_WRITE,
|
||||
resource_options: ResourceOptions::private(),
|
||||
..TextureDescriptor::default()
|
||||
@@ -171,7 +181,7 @@ impl PassImageblock {
|
||||
format: Format::R32_UINT,
|
||||
extent: [width, height, 1],
|
||||
levels: 1,
|
||||
layers: words,
|
||||
layers,
|
||||
samples: sample_count(1).ok_or_else(|| internal("one sample"))?,
|
||||
usage: ImageUsageFlags::STORAGE | ImageUsageFlags::TRANSFER_DST,
|
||||
view_formats: Vec::new(),
|
||||
@@ -184,6 +194,7 @@ impl PassImageblock {
|
||||
Ok(PassImageblock {
|
||||
texture,
|
||||
words,
|
||||
layers,
|
||||
bytes,
|
||||
alignment,
|
||||
extent: layout.extent,
|
||||
@@ -222,7 +233,7 @@ impl PassImageblock {
|
||||
base_level: 0,
|
||||
level_count: 1,
|
||||
base_layer: 0,
|
||||
layer_count: self.words,
|
||||
layer_count: self.layers,
|
||||
usage: ImageUsageFlags::STORAGE,
|
||||
})
|
||||
}
|
||||
@@ -240,7 +251,7 @@ impl PassImageblock {
|
||||
fn uses(&self, stage: vk::PipelineStageFlags2) -> Result<Vec<Use<ResourceKey>>, Error> {
|
||||
let read = Access::new(stage, vk::AccessFlags2::SHADER_STORAGE_READ);
|
||||
let write = Access::new(stage, vk::AccessFlags2::SHADER_STORAGE_WRITE);
|
||||
let layers = 0..self.words;
|
||||
let layers = 0..self.layers;
|
||||
Ok(vec![
|
||||
self.texture.image_use(0..1, layers.clone(), read, false)?,
|
||||
self.texture.image_use(0..1, layers, write, true)?,
|
||||
@@ -252,8 +263,8 @@ impl PassImageblock {
|
||||
let write = Access::new(TRANSFER, vk::AccessFlags2::TRANSFER_WRITE);
|
||||
Ok(ImageblockClear {
|
||||
image: self.texture.raw_image()?,
|
||||
layers: self.words,
|
||||
uses: [self.texture.image_use(0..1, 0..self.words, write, true)?],
|
||||
layers: self.layers,
|
||||
uses: [self.texture.image_use(0..1, 0..self.layers, write, true)?],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,50 @@ fn view_formats_follow_metals_measured_verdicts() {
|
||||
}
|
||||
}
|
||||
|
||||
/// The one depth or stencil view of another format than its texture's that a texture of a format
|
||||
/// Metal makes takes is the stencil view of a combined texture (`X32Stencil8` of
|
||||
/// `Depth32FloatStencil8`), and its reverse, which `Texture::new_texture_view` stops: so the
|
||||
/// blits' and the CPU copies' refusal of another (`NotImplemented(Textures)`) meets no view.
|
||||
#[test]
|
||||
fn the_only_depth_view_of_another_format_is_the_stencil_view_of_a_combined_texture() {
|
||||
use metal2vulkan::metal::format::is_depth_stencil;
|
||||
use PixelFormat as P;
|
||||
let (_, device) = lavapipe();
|
||||
let depth: Vec<P> = P::ALL
|
||||
.iter()
|
||||
.copied()
|
||||
.filter(|&pf| is_depth_stencil(pf))
|
||||
.collect();
|
||||
let mut made = Vec::new();
|
||||
for &format in &depth {
|
||||
let usage = TextureUsage::SHADER_READ | TextureUsage::PIXEL_FORMAT_VIEW;
|
||||
let descriptor = TextureDescriptor {
|
||||
pixel_format: format,
|
||||
width: 8,
|
||||
height: 8,
|
||||
usage,
|
||||
..TextureDescriptor::default()
|
||||
};
|
||||
let Ok(layout) = descriptor.check(APPLE) else {
|
||||
continue;
|
||||
};
|
||||
let source = ViewRecord::of_texture(&layout, usage, descriptor.swizzle);
|
||||
for view in P::ALL.iter().copied().filter(|&pf| pf != format) {
|
||||
let request = ViewRequest::of_format(&source, view);
|
||||
if check_view(&source, &request, device.profile()).is_ok() {
|
||||
made.push((format, view));
|
||||
}
|
||||
}
|
||||
}
|
||||
assert_eq!(
|
||||
made,
|
||||
[
|
||||
(P::Depth32FloatStencil8, P::X32Stencil8),
|
||||
(P::X32Stencil8, P::Depth32FloatStencil8),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/// The texture-type pairs probe 2 measured.
|
||||
#[test]
|
||||
fn view_types_follow_metals_measured_verdicts() {
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
//! present. Every copy
|
||||
//! into the texture writes both (`replace_region`, the blit encoder's copies), and reads come
|
||||
//! from its image; the twin shares the image's resource identity.
|
||||
//! - **Not yet:** CPU access through a stencil view of a combined depth/stencil texture, and
|
||||
//! blits of textures over buffers, are refused `NotImplemented`.
|
||||
//! - **Not yet:** blits of textures over buffers are refused `NotImplemented`.
|
||||
|
||||
use super::address::{ObjectsToken, RangeToken};
|
||||
use super::address_map::AddressModeMap;
|
||||
@@ -5189,12 +5188,13 @@ impl Texture {
|
||||
/// exactly, 0 as every row at the image's first byte, and one between 0 and a row writes
|
||||
/// nothing. A `bytes_per_image` off Metal's rules, off the pixel or below the region's rows, is
|
||||
/// taken exactly, as plain Metal takes it. A combined depth/stencil format writes its depth, 4
|
||||
/// bytes a texel, its stencil left as it is, as plain Metal does. Refused: what Metal stops
|
||||
/// (`Invalid`: with a [`CopyProblem`], a private texture but an IOSurface plane's over a buffer
|
||||
/// the CPU reaches, whose bytes it reads and writes as plain Metal does, a region outside the
|
||||
/// level, a `bytes_per_row` off Metal's rules of a texture over a buffer or of 0 for more than
|
||||
/// one row and image (not measured), `bytes` shorter than the layout reads); a stencil view of
|
||||
/// a combined depth/stencil texture (`NotImplemented`, unmeasured).
|
||||
/// bytes a texel, its stencil left as it is, and its stencil view (`X32Stencil8`) the
|
||||
/// stencil, a byte a texel, its depth left as it is, as plain Metal does (its validation stops
|
||||
/// both). Refused: what Metal stops (`Invalid`: with a [`CopyProblem`], a private texture but
|
||||
/// an IOSurface plane's over a buffer the CPU reaches, whose bytes it reads and writes as plain
|
||||
/// Metal does, a region outside the level, a `bytes_per_row` off Metal's rules of a texture
|
||||
/// over a buffer or of 0 for more than one row and image (not measured), `bytes` shorter than
|
||||
/// the layout reads).
|
||||
///
|
||||
/// A PVRTC texture's whole level takes its blocks in plain Metal's CPU order, Z order with
|
||||
/// the y bit lowest, with a `bytes_per_row` of 0 or of the level's row of blocks
|
||||
@@ -5394,8 +5394,9 @@ impl Texture {
|
||||
/// between rows and images are left as they are; with a `bytes_per_row` of 0 each row is
|
||||
/// written at the image's first byte in turn, so the last one stays, as plain Metal writes
|
||||
/// them, and images closer than a region's rows are written in turn, the later image's bytes
|
||||
/// staying. A combined depth/stencil format reads its depth. A PVRTC texture's whole level
|
||||
/// gives its blocks in plain Metal's CPU order.
|
||||
/// staying. A combined depth/stencil format reads its depth, and its stencil view
|
||||
/// (`X32Stencil8`) the stencil, a byte a texel. A PVRTC texture's whole level gives its blocks
|
||||
/// in plain Metal's CPU order.
|
||||
///
|
||||
/// Refused as [`replace_region`](Self::replace_region) is.
|
||||
pub fn get_bytes(
|
||||
@@ -5626,12 +5627,20 @@ impl Texture {
|
||||
(two_planes::UNIT, false)
|
||||
}
|
||||
Storage::Image(image) => {
|
||||
// The stencil view of a combined depth/stencil texture (`X32Stencil8` of
|
||||
// `Depth32FloatStencil8`, the one `new_texture_view` makes) moves the stencil, a
|
||||
// byte a texel, its depth kept, as its blits do (`copy_unit`): plain Metal's
|
||||
// answer on an M3 Max under macOS 27.0.1 (a probe; its validation stops the
|
||||
// CPU access). Another depth or stencil view of a combined texture is not
|
||||
// measured.
|
||||
let of = image.plan().pixel_format;
|
||||
let stencil_view = record.pixel_format == PixelFormat::X32Stencil8
|
||||
&& of == PixelFormat::Depth32FloatStencil8;
|
||||
if is_depth_stencil(record.pixel_format)
|
||||
&& !combined(record.pixel_format)
|
||||
&& combined(image.plan().pixel_format)
|
||||
&& combined(of)
|
||||
&& !stencil_view
|
||||
{
|
||||
// A stencil view of a combined depth/stencil texture: Metal's answer is not
|
||||
// measured.
|
||||
return Err(Error::NotImplemented(RuntimeGap::Textures));
|
||||
}
|
||||
// A combined depth/stencil format copies its depth, as a blit without an option
|
||||
|
||||
@@ -125,6 +125,7 @@ fixture hrd_half_read: metal: Apple metal version 32023.921 (metalfe-32023.921.6
|
||||
fixture hrd_half_widen: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture hsw_storage_writes: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture hwd_half_reads: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture ibs_sample_imageblocks: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture icb_copy_encode: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture icb_imageblock_encode: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture icb_imageblock_template: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
@@ -210,6 +211,7 @@ fixture ob3_stage_input: metal: Apple metal version 32023.921 (metalfe-32023.921
|
||||
fixture ob3_texture_array: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture ob3_vertex_input: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture pdc_compare_clamp: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture pdc_post_depth_coverage: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture primitive_ids: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture rch_guarded_effects: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture rch_helper_branch: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
; Generated by scripts/regen-air-fixtures from ibs_sample_imageblocks.metal (typed pointers; xcrun metal-as reassembles it). Do not edit.
|
||||
; ModuleID = '-'
|
||||
source_filename = "-"
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
|
||||
%struct.IbsCell = type { float }
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <{ <4 x float> }> @ibs_vertex(i32 noundef %0, <2 x float> addrspace(2)* nocapture noundef readonly "air-buffer-no-alias" %1, float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %2) local_unnamed_addr #0 {
|
||||
%4 = zext i32 %0 to i64
|
||||
%5 = getelementptr inbounds <2 x float>, <2 x float> addrspace(2)* %1, i64 %4
|
||||
%6 = load <2 x float>, <2 x float> addrspace(2)* %5, align 8, !tbaa !45, !alias.scope !48, !noalias !51
|
||||
%7 = shufflevector <2 x float> %6, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
|
||||
%8 = load float, float addrspace(2)* %2, align 4, !tbaa !53, !alias.scope !51, !noalias !48
|
||||
%9 = insertelement <4 x float> %7, float 1.000000e+00, i64 3
|
||||
%10 = insertelement <4 x float> %9, float %8, i64 2
|
||||
%11 = insertvalue <{ <4 x float> }> undef, <4 x float> %10, 0
|
||||
ret <{ <4 x float> }> %11
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <{ %struct.IbsCell }> @ibs_write(float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %0) local_unnamed_addr #0 {
|
||||
%2 = load float, float addrspace(2)* %0, align 4, !tbaa !53, !alias.scope !55
|
||||
%3 = insertvalue %struct.IbsCell poison, float %2, 0
|
||||
%4 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %3, 0
|
||||
ret <{ %struct.IbsCell }> %4
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <{ %struct.IbsCell }> @ibs_write_early(float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %0) local_unnamed_addr #0 {
|
||||
%2 = load float, float addrspace(2)* %0, align 4, !tbaa !53, !alias.scope !58
|
||||
%3 = insertvalue %struct.IbsCell poison, float %2, 0
|
||||
%4 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %3, 0
|
||||
ret <{ %struct.IbsCell }> %4
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <{ %struct.IbsCell }> @ibs_add(%struct.IbsCell %0, float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %1) local_unnamed_addr #0 {
|
||||
%3 = extractvalue %struct.IbsCell %0, 0
|
||||
%4 = load float, float addrspace(2)* %1, align 4, !tbaa !53, !alias.scope !61
|
||||
%5 = fadd fast float %4, %3
|
||||
%6 = insertvalue %struct.IbsCell poison, float %5, 0
|
||||
%7 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %6, 0
|
||||
ret <{ %struct.IbsCell }> %7
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
define <{ %struct.IbsCell }> @ibs_add_discard(%struct.IbsCell %0, float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %1, <4 x float> noundef %2) local_unnamed_addr #1 {
|
||||
%4 = extractelement <4 x float> %2, i64 0
|
||||
%5 = tail call i32 @air.convert.u.i32.f.f32(float %4) #5
|
||||
%6 = icmp eq i32 %5, 7
|
||||
br i1 %6, label %7, label %8
|
||||
|
||||
7: ; preds = %3
|
||||
tail call void @air.discard_fragment() #6
|
||||
br label %8
|
||||
|
||||
8: ; preds = %7, %3
|
||||
%9 = extractvalue %struct.IbsCell %0, 0
|
||||
%10 = load float, float addrspace(2)* %1, align 4, !tbaa !53, !alias.scope !64
|
||||
%11 = fadd fast float %10, %9
|
||||
%12 = insertvalue %struct.IbsCell poison, float %11, 0
|
||||
%13 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %12, 0
|
||||
ret <{ %struct.IbsCell }> %13
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn
|
||||
declare i32 @air.convert.u.i32.f.f32(float) local_unnamed_addr #2
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <{ %struct.IbsCell, i32 }> @ibs_write_masked(float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %0) local_unnamed_addr #0 {
|
||||
%2 = load float, float addrspace(2)* %0, align 4, !tbaa !53, !alias.scope !67
|
||||
%3 = insertvalue %struct.IbsCell poison, float %2, 0
|
||||
%4 = insertvalue <{ %struct.IbsCell, i32 }> undef, %struct.IbsCell %3, 0
|
||||
%5 = insertvalue <{ %struct.IbsCell, i32 }> %4, i32 5, 1
|
||||
ret <{ %struct.IbsCell, i32 }> %5
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <4 x float> @ibs_read(%struct.IbsCell %0) local_unnamed_addr #3 {
|
||||
%2 = extractvalue %struct.IbsCell %0, 0
|
||||
%3 = insertelement <4 x float> <float poison, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, float %2, i64 0
|
||||
ret <4 x float> %3
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <4 x float> @ibs_plain() local_unnamed_addr #3 {
|
||||
ret <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
declare void @air.discard_fragment() local_unnamed_addr #4
|
||||
|
||||
attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #1 = { mustprogress nounwind willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #2 = { mustprogress nofree nosync nounwind readnone willreturn }
|
||||
attributes #3 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #4 = { mustprogress nounwind willreturn }
|
||||
attributes #5 = { nounwind readnone willreturn }
|
||||
attributes #6 = { nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!air.vertex = !{!9}
|
||||
!air.fragment = !{!16, !22, !23, !27, !30, !33, !37}
|
||||
!air.compile_options = !{!39, !40, !41}
|
||||
!llvm.ident = !{!42}
|
||||
!air.version = !{!43}
|
||||
!air.language_version = !{!44}
|
||||
|
||||
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
|
||||
!1 = !{i32 1, !"wchar_size", i32 4}
|
||||
!2 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
|
||||
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
|
||||
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
|
||||
!6 = !{i32 7, !"air.max_textures", i32 128}
|
||||
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
|
||||
!8 = !{i32 7, !"air.max_samplers", i32 16}
|
||||
!9 = !{<{ <4 x float> }> (i32, <2 x float> addrspace(2)*, float addrspace(2)*)* @ibs_vertex, !10, !12}
|
||||
!10 = !{!11}
|
||||
!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
|
||||
!12 = !{!13, !14, !15}
|
||||
!13 = !{i32 0, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"}
|
||||
!14 = !{i32 1, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"float2", !"air.arg_name", !"corners"}
|
||||
!15 = !{i32 2, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"depth"}
|
||||
!16 = !{<{ %struct.IbsCell }> (float addrspace(2)*)* @ibs_write, !17, !20}
|
||||
!17 = !{!18}
|
||||
!18 = !{!"air.imageblock_data", !"air.imageblock_data_size", i32 4, !"air.struct_type_info", !19, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"IbsCell", !"air.arg_name", !"cell"}
|
||||
!19 = !{i32 0, i32 4, i32 0, !"float", !"v", !"air.raster_order_group", i32 0}
|
||||
!20 = !{!21}
|
||||
!21 = !{i32 0, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"value"}
|
||||
!22 = !{<{ %struct.IbsCell }> (float addrspace(2)*)* @ibs_write_early, !17, !20, !"early_fragment_tests"}
|
||||
!23 = !{<{ %struct.IbsCell }> (%struct.IbsCell, float addrspace(2)*)* @ibs_add, !17, !24}
|
||||
!24 = !{!25, !26}
|
||||
!25 = !{i32 0, !"air.imageblock_data", !"air.imageblock_data_size", i32 4, !"air.struct_type_info", !19, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"IbsCell", !"air.arg_name", !"in"}
|
||||
!26 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"value"}
|
||||
!27 = !{<{ %struct.IbsCell }> (%struct.IbsCell, float addrspace(2)*, <4 x float>)* @ibs_add_discard, !17, !28}
|
||||
!28 = !{!25, !26, !29}
|
||||
!29 = !{i32 2, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
|
||||
!30 = !{<{ %struct.IbsCell, i32 }> (float addrspace(2)*)* @ibs_write_masked, !31, !20}
|
||||
!31 = !{!18, !32}
|
||||
!32 = !{!"air.sample_mask", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"}
|
||||
!33 = !{<4 x float> (%struct.IbsCell)* @ibs_read, !34, !36}
|
||||
!34 = !{!35}
|
||||
!35 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"float4"}
|
||||
!36 = !{!25}
|
||||
!37 = !{<4 x float> ()* @ibs_plain, !34, !38}
|
||||
!38 = !{}
|
||||
!39 = !{!"air.compile.denorms_disable"}
|
||||
!40 = !{!"air.compile.fast_math_enable"}
|
||||
!41 = !{!"air.compile.framebuffer_fetch_enable"}
|
||||
!42 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
|
||||
!43 = !{i32 2, i32 8, i32 0}
|
||||
!44 = !{!"Metal", i32 4, i32 0, i32 0}
|
||||
!45 = !{!46, !46, i64 0}
|
||||
!46 = !{!"omnipotent char", !47, i64 0}
|
||||
!47 = !{!"Simple C++ TBAA"}
|
||||
!48 = !{!49}
|
||||
!49 = distinct !{!49, !50, !"air-alias-scope-arg(1)"}
|
||||
!50 = distinct !{!50, !"air-alias-scopes(ibs_vertex)"}
|
||||
!51 = !{!52}
|
||||
!52 = distinct !{!52, !50, !"air-alias-scope-arg(2)"}
|
||||
!53 = !{!54, !54, i64 0}
|
||||
!54 = !{!"float", !46, i64 0}
|
||||
!55 = !{!56}
|
||||
!56 = distinct !{!56, !57, !"air-alias-scope-arg(0)"}
|
||||
!57 = distinct !{!57, !"air-alias-scopes(ibs_write)"}
|
||||
!58 = !{!59}
|
||||
!59 = distinct !{!59, !60, !"air-alias-scope-arg(0)"}
|
||||
!60 = distinct !{!60, !"air-alias-scopes(ibs_write_early)"}
|
||||
!61 = !{!62}
|
||||
!62 = distinct !{!62, !63, !"air-alias-scope-arg(1)"}
|
||||
!63 = distinct !{!63, !"air-alias-scopes(ibs_add)"}
|
||||
!64 = !{!65}
|
||||
!65 = distinct !{!65, !66, !"air-alias-scope-arg(1)"}
|
||||
!66 = distinct !{!66, !"air-alias-scopes(ibs_add_discard)"}
|
||||
!67 = !{!68}
|
||||
!68 = distinct !{!68, !69, !"air-alias-scope-arg(0)"}
|
||||
!69 = distinct !{!69, !"air-alias-scopes(ibs_write_masked)"}
|
||||
@@ -0,0 +1,180 @@
|
||||
; Generated by scripts/regen-air-fixtures from ibs_sample_imageblocks.metal (llvm-dis of ibs_sample_imageblocks.air). Do not edit.
|
||||
; ModuleID = '<stdin>'
|
||||
source_filename = "-"
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
|
||||
%struct.IbsCell = type { float }
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <{ <4 x float> }> @ibs_vertex(i32 noundef %0, ptr addrspace(2) noundef readonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %2) local_unnamed_addr #0 {
|
||||
%4 = zext i32 %0 to i64
|
||||
%5 = getelementptr inbounds <2 x float>, ptr addrspace(2) %1, i64 %4
|
||||
%6 = load <2 x float>, ptr addrspace(2) %5, align 8, !tbaa !45, !alias.scope !48, !noalias !51
|
||||
%7 = shufflevector <2 x float> %6, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
|
||||
%8 = load float, ptr addrspace(2) %2, align 4, !tbaa !53, !alias.scope !51, !noalias !48
|
||||
%9 = insertelement <4 x float> %7, float 1.000000e+00, i64 3
|
||||
%10 = insertelement <4 x float> %9, float %8, i64 2
|
||||
%11 = insertvalue <{ <4 x float> }> undef, <4 x float> %10, 0
|
||||
ret <{ <4 x float> }> %11
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <{ %struct.IbsCell }> @ibs_write(ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %0) local_unnamed_addr #0 {
|
||||
%2 = load float, ptr addrspace(2) %0, align 4, !tbaa !53, !alias.scope !55
|
||||
%3 = insertvalue %struct.IbsCell poison, float %2, 0
|
||||
%4 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %3, 0
|
||||
ret <{ %struct.IbsCell }> %4
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <{ %struct.IbsCell }> @ibs_write_early(ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %0) local_unnamed_addr #0 {
|
||||
%2 = load float, ptr addrspace(2) %0, align 4, !tbaa !53, !alias.scope !58
|
||||
%3 = insertvalue %struct.IbsCell poison, float %2, 0
|
||||
%4 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %3, 0
|
||||
ret <{ %struct.IbsCell }> %4
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <{ %struct.IbsCell }> @ibs_add(%struct.IbsCell %0, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %1) local_unnamed_addr #0 {
|
||||
%3 = extractvalue %struct.IbsCell %0, 0
|
||||
%4 = load float, ptr addrspace(2) %1, align 4, !tbaa !53, !alias.scope !61
|
||||
%5 = fadd fast float %4, %3
|
||||
%6 = insertvalue %struct.IbsCell poison, float %5, 0
|
||||
%7 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %6, 0
|
||||
ret <{ %struct.IbsCell }> %7
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
define <{ %struct.IbsCell }> @ibs_add_discard(%struct.IbsCell %0, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %1, <4 x float> noundef %2) local_unnamed_addr #1 {
|
||||
%4 = extractelement <4 x float> %2, i64 0
|
||||
%5 = tail call i32 @air.convert.u.i32.f.f32(float %4) #5
|
||||
%6 = icmp eq i32 %5, 7
|
||||
br i1 %6, label %7, label %8
|
||||
|
||||
7: ; preds = %3
|
||||
tail call void @air.discard_fragment() #6
|
||||
br label %8
|
||||
|
||||
8: ; preds = %7, %3
|
||||
%9 = extractvalue %struct.IbsCell %0, 0
|
||||
%10 = load float, ptr addrspace(2) %1, align 4, !tbaa !53, !alias.scope !64
|
||||
%11 = fadd fast float %10, %9
|
||||
%12 = insertvalue %struct.IbsCell poison, float %11, 0
|
||||
%13 = insertvalue <{ %struct.IbsCell }> undef, %struct.IbsCell %12, 0
|
||||
ret <{ %struct.IbsCell }> %13
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
|
||||
declare i32 @air.convert.u.i32.f.f32(float) local_unnamed_addr #2
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <{ %struct.IbsCell, i32 }> @ibs_write_masked(ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %0) local_unnamed_addr #0 {
|
||||
%2 = load float, ptr addrspace(2) %0, align 4, !tbaa !53, !alias.scope !67
|
||||
%3 = insertvalue %struct.IbsCell poison, float %2, 0
|
||||
%4 = insertvalue <{ %struct.IbsCell, i32 }> undef, %struct.IbsCell %3, 0
|
||||
%5 = insertvalue <{ %struct.IbsCell, i32 }> %4, i32 5, 1
|
||||
ret <{ %struct.IbsCell, i32 }> %5
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <4 x float> @ibs_read(%struct.IbsCell %0) local_unnamed_addr #3 {
|
||||
%2 = extractvalue %struct.IbsCell %0, 0
|
||||
%3 = insertelement <4 x float> <float poison, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, float %2, i64 0
|
||||
ret <4 x float> %3
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <4 x float> @ibs_plain() local_unnamed_addr #3 {
|
||||
ret <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
declare void @air.discard_fragment() local_unnamed_addr #4
|
||||
|
||||
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #1 = { mustprogress nounwind willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) }
|
||||
attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #4 = { mustprogress nounwind willreturn }
|
||||
attributes #5 = { nounwind willreturn memory(none) }
|
||||
attributes #6 = { nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!air.vertex = !{!9}
|
||||
!air.fragment = !{!16, !22, !23, !27, !30, !33, !37}
|
||||
!air.compile_options = !{!39, !40, !41}
|
||||
!llvm.ident = !{!42}
|
||||
!air.version = !{!43}
|
||||
!air.language_version = !{!44}
|
||||
|
||||
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
|
||||
!1 = !{i32 1, !"wchar_size", i32 4}
|
||||
!2 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
|
||||
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
|
||||
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
|
||||
!6 = !{i32 7, !"air.max_textures", i32 128}
|
||||
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
|
||||
!8 = !{i32 7, !"air.max_samplers", i32 16}
|
||||
!9 = !{ptr @ibs_vertex, !10, !12}
|
||||
!10 = !{!11}
|
||||
!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
|
||||
!12 = !{!13, !14, !15}
|
||||
!13 = !{i32 0, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"}
|
||||
!14 = !{i32 1, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"float2", !"air.arg_name", !"corners"}
|
||||
!15 = !{i32 2, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"depth"}
|
||||
!16 = !{ptr @ibs_write, !17, !20}
|
||||
!17 = !{!18}
|
||||
!18 = !{!"air.imageblock_data", !"air.imageblock_data_size", i32 4, !"air.struct_type_info", !19, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"IbsCell", !"air.arg_name", !"cell"}
|
||||
!19 = !{i32 0, i32 4, i32 0, !"float", !"v", !"air.raster_order_group", i32 0}
|
||||
!20 = !{!21}
|
||||
!21 = !{i32 0, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"value"}
|
||||
!22 = !{ptr @ibs_write_early, !17, !20, !"early_fragment_tests"}
|
||||
!23 = !{ptr @ibs_add, !17, !24}
|
||||
!24 = !{!25, !26}
|
||||
!25 = !{i32 0, !"air.imageblock_data", !"air.imageblock_data_size", i32 4, !"air.struct_type_info", !19, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"IbsCell", !"air.arg_name", !"in"}
|
||||
!26 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"value"}
|
||||
!27 = !{ptr @ibs_add_discard, !17, !28}
|
||||
!28 = !{!25, !26, !29}
|
||||
!29 = !{i32 2, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
|
||||
!30 = !{ptr @ibs_write_masked, !31, !20}
|
||||
!31 = !{!18, !32}
|
||||
!32 = !{!"air.sample_mask", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"}
|
||||
!33 = !{ptr @ibs_read, !34, !36}
|
||||
!34 = !{!35}
|
||||
!35 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"float4"}
|
||||
!36 = !{!25}
|
||||
!37 = !{ptr @ibs_plain, !34, !38}
|
||||
!38 = !{}
|
||||
!39 = !{!"air.compile.denorms_disable"}
|
||||
!40 = !{!"air.compile.fast_math_enable"}
|
||||
!41 = !{!"air.compile.framebuffer_fetch_enable"}
|
||||
!42 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
|
||||
!43 = !{i32 2, i32 8, i32 0}
|
||||
!44 = !{!"Metal", i32 4, i32 0, i32 0}
|
||||
!45 = !{!46, !46, i64 0}
|
||||
!46 = !{!"omnipotent char", !47, i64 0}
|
||||
!47 = !{!"Simple C++ TBAA"}
|
||||
!48 = !{!49}
|
||||
!49 = distinct !{!49, !50, !"air-alias-scope-arg(1)"}
|
||||
!50 = distinct !{!50, !"air-alias-scopes(ibs_vertex)"}
|
||||
!51 = !{!52}
|
||||
!52 = distinct !{!52, !50, !"air-alias-scope-arg(2)"}
|
||||
!53 = !{!54, !54, i64 0}
|
||||
!54 = !{!"float", !46, i64 0}
|
||||
!55 = !{!56}
|
||||
!56 = distinct !{!56, !57, !"air-alias-scope-arg(0)"}
|
||||
!57 = distinct !{!57, !"air-alias-scopes(ibs_write)"}
|
||||
!58 = !{!59}
|
||||
!59 = distinct !{!59, !60, !"air-alias-scope-arg(0)"}
|
||||
!60 = distinct !{!60, !"air-alias-scopes(ibs_write_early)"}
|
||||
!61 = !{!62}
|
||||
!62 = distinct !{!62, !63, !"air-alias-scope-arg(1)"}
|
||||
!63 = distinct !{!63, !"air-alias-scopes(ibs_add)"}
|
||||
!64 = !{!65}
|
||||
!65 = distinct !{!65, !66, !"air-alias-scope-arg(1)"}
|
||||
!66 = distinct !{!66, !"air-alias-scopes(ibs_add_discard)"}
|
||||
!67 = !{!68}
|
||||
!68 = distinct !{!68, !69, !"air-alias-scope-arg(0)"}
|
||||
!69 = distinct !{!69, !"air-alias-scopes(ibs_write_masked)"}
|
||||
@@ -0,0 +1,77 @@
|
||||
// Owned fixture: a fragment imageblock of one float in passes of one and four samples, and beside a
|
||||
// depth attachment. `ibs_write` writes the cell, `ibs_add` adds to it, `ibs_add_discard` adds but
|
||||
// discards column 7, `ibs_write_masked` writes it and returns the sample mask 0b0101,
|
||||
// `ibs_write_early` writes it under `[[early_fragment_tests]]`, and `ibs_read` returns the cell as
|
||||
// red. `ibs_plain` returns 1.0, with no imageblock: its resolve is a draw's coverage. On the M3 Max
|
||||
// (macOS 27.0.1) Metal keeps a cell per sample at four samples, runs each function that reaches it
|
||||
// once per covered sample, keeps a write only where the returned mask has the run's sample, and
|
||||
// drops the write of a fragment its depth test fails. Loop-free.
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
struct IbsCorner {
|
||||
float4 position [[position]];
|
||||
};
|
||||
|
||||
// Corner `id` of the triangle in buffer 0, at the depth in buffer 1.
|
||||
vertex IbsCorner ibs_vertex(uint id [[vertex_id]], constant float2 *corners [[buffer(0)]],
|
||||
constant float &depth [[buffer(1)]]) {
|
||||
return IbsCorner { float4(corners[id], depth, 1.0) };
|
||||
}
|
||||
|
||||
struct IbsCell {
|
||||
float v [[raster_order_group(0)]];
|
||||
};
|
||||
|
||||
struct IbsCellOut {
|
||||
IbsCell cell [[imageblock_data]];
|
||||
};
|
||||
|
||||
struct IbsMaskOut {
|
||||
IbsCell cell [[imageblock_data]];
|
||||
uint mask [[sample_mask]];
|
||||
};
|
||||
|
||||
fragment IbsCellOut ibs_write(constant float &value [[buffer(0)]]) {
|
||||
IbsCellOut out;
|
||||
out.cell.v = value;
|
||||
return out;
|
||||
}
|
||||
|
||||
[[early_fragment_tests]] fragment IbsCellOut ibs_write_early(constant float &value [[buffer(0)]]) {
|
||||
IbsCellOut out;
|
||||
out.cell.v = value;
|
||||
return out;
|
||||
}
|
||||
|
||||
fragment IbsCellOut ibs_add(IbsCell in [[imageblock_data]], constant float &value [[buffer(0)]]) {
|
||||
IbsCellOut out;
|
||||
out.cell.v = in.v + value;
|
||||
return out;
|
||||
}
|
||||
|
||||
fragment IbsCellOut ibs_add_discard(IbsCell in [[imageblock_data]],
|
||||
constant float &value [[buffer(0)]],
|
||||
float4 position [[position]]) {
|
||||
if (uint(position.x) == 7u) {
|
||||
discard_fragment();
|
||||
}
|
||||
IbsCellOut out;
|
||||
out.cell.v = in.v + value;
|
||||
return out;
|
||||
}
|
||||
|
||||
fragment IbsMaskOut ibs_write_masked(constant float &value [[buffer(0)]]) {
|
||||
IbsMaskOut out;
|
||||
out.cell.v = value;
|
||||
out.mask = 0x5u;
|
||||
return out;
|
||||
}
|
||||
|
||||
fragment float4 ibs_read(IbsCell in [[imageblock_data]]) {
|
||||
return float4(in.v, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
fragment float4 ibs_plain() {
|
||||
return float4(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
; Generated by scripts/regen-air-fixtures from pdc_post_depth_coverage.metal (typed pointers; xcrun metal-as reassembles it). Do not edit.
|
||||
; ModuleID = '-'
|
||||
source_filename = "-"
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <{ <4 x float> }> @pdc_vertex(i32 noundef %0, <2 x float> addrspace(2)* nocapture noundef readonly "air-buffer-no-alias" %1, float addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %2) local_unnamed_addr #0 {
|
||||
%4 = zext i32 %0 to i64
|
||||
%5 = getelementptr inbounds <2 x float>, <2 x float> addrspace(2)* %1, i64 %4
|
||||
%6 = load <2 x float>, <2 x float> addrspace(2)* %5, align 8, !tbaa !29, !alias.scope !32, !noalias !35
|
||||
%7 = shufflevector <2 x float> %6, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
|
||||
%8 = load float, float addrspace(2)* %2, align 4, !tbaa !37, !alias.scope !35, !noalias !32
|
||||
%9 = insertelement <4 x float> %7, float 1.000000e+00, i64 3
|
||||
%10 = insertelement <4 x float> %9, float %8, i64 2
|
||||
%11 = insertvalue <{ <4 x float> }> undef, <4 x float> %10, 0
|
||||
ret <{ <4 x float> }> %11
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn
|
||||
define <4 x float> @pdc_after(i32 noundef %0) local_unnamed_addr #1 {
|
||||
%2 = tail call i32 @air.popcount.i32(i32 %0) #4
|
||||
%3 = tail call fast float @air.convert.f.f32.u.i32(i32 %2) #4
|
||||
%4 = fmul fast float %3, 2.500000e-01
|
||||
%5 = insertelement <4 x float> <float poison, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, float %4, i64 0
|
||||
ret <4 x float> %5
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn
|
||||
declare float @air.convert.f.f32.u.i32(i32) local_unnamed_addr #2
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
|
||||
define <4 x float> @pdc_plain() local_unnamed_addr #3 {
|
||||
ret <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn
|
||||
declare i32 @air.popcount.i32(i32) local_unnamed_addr #2
|
||||
|
||||
attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #1 = { mustprogress nofree nosync nounwind readnone willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #2 = { mustprogress nofree nosync nounwind readnone willreturn }
|
||||
attributes #3 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #4 = { nounwind readnone willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!air.vertex = !{!9}
|
||||
!air.fragment = !{!16, !21}
|
||||
!air.compile_options = !{!23, !24, !25}
|
||||
!llvm.ident = !{!26}
|
||||
!air.version = !{!27}
|
||||
!air.language_version = !{!28}
|
||||
|
||||
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
|
||||
!1 = !{i32 1, !"wchar_size", i32 4}
|
||||
!2 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
|
||||
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
|
||||
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
|
||||
!6 = !{i32 7, !"air.max_textures", i32 128}
|
||||
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
|
||||
!8 = !{i32 7, !"air.max_samplers", i32 16}
|
||||
!9 = !{<{ <4 x float> }> (i32, <2 x float> addrspace(2)*, float addrspace(2)*)* @pdc_vertex, !10, !12}
|
||||
!10 = !{!11}
|
||||
!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
|
||||
!12 = !{!13, !14, !15}
|
||||
!13 = !{i32 0, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"}
|
||||
!14 = !{i32 1, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"float2", !"air.arg_name", !"corners"}
|
||||
!15 = !{i32 2, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"depth"}
|
||||
!16 = !{<4 x float> (i32)* @pdc_after, !17, !19, !"early_fragment_tests"}
|
||||
!17 = !{!18}
|
||||
!18 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"float4"}
|
||||
!19 = !{!20}
|
||||
!20 = !{i32 0, !"air.sample_mask_in", !"air.post_depth_coverage", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"}
|
||||
!21 = !{<4 x float> ()* @pdc_plain, !17, !22, !"early_fragment_tests"}
|
||||
!22 = !{}
|
||||
!23 = !{!"air.compile.denorms_disable"}
|
||||
!24 = !{!"air.compile.fast_math_enable"}
|
||||
!25 = !{!"air.compile.framebuffer_fetch_enable"}
|
||||
!26 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
|
||||
!27 = !{i32 2, i32 8, i32 0}
|
||||
!28 = !{!"Metal", i32 4, i32 0, i32 0}
|
||||
!29 = !{!30, !30, i64 0}
|
||||
!30 = !{!"omnipotent char", !31, i64 0}
|
||||
!31 = !{!"Simple C++ TBAA"}
|
||||
!32 = !{!33}
|
||||
!33 = distinct !{!33, !34, !"air-alias-scope-arg(1)"}
|
||||
!34 = distinct !{!34, !"air-alias-scopes(pdc_vertex)"}
|
||||
!35 = !{!36}
|
||||
!36 = distinct !{!36, !34, !"air-alias-scope-arg(2)"}
|
||||
!37 = !{!38, !38, i64 0}
|
||||
!38 = !{!"float", !30, i64 0}
|
||||
@@ -0,0 +1,92 @@
|
||||
; Generated by scripts/regen-air-fixtures from pdc_post_depth_coverage.metal (llvm-dis of pdc_post_depth_coverage.air). Do not edit.
|
||||
; ModuleID = '<stdin>'
|
||||
source_filename = "-"
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <{ <4 x float> }> @pdc_vertex(i32 noundef %0, ptr addrspace(2) noundef readonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %2) local_unnamed_addr #0 {
|
||||
%4 = zext i32 %0 to i64
|
||||
%5 = getelementptr inbounds <2 x float>, ptr addrspace(2) %1, i64 %4
|
||||
%6 = load <2 x float>, ptr addrspace(2) %5, align 8, !tbaa !29, !alias.scope !32, !noalias !35
|
||||
%7 = shufflevector <2 x float> %6, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
|
||||
%8 = load float, ptr addrspace(2) %2, align 4, !tbaa !37, !alias.scope !35, !noalias !32
|
||||
%9 = insertelement <4 x float> %7, float 1.000000e+00, i64 3
|
||||
%10 = insertelement <4 x float> %9, float %8, i64 2
|
||||
%11 = insertvalue <{ <4 x float> }> undef, <4 x float> %10, 0
|
||||
ret <{ <4 x float> }> %11
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
|
||||
define <4 x float> @pdc_after(i32 noundef %0) local_unnamed_addr #1 {
|
||||
%2 = tail call i32 @air.popcount.i32(i32 %0) #4
|
||||
%3 = tail call fast float @air.convert.f.f32.u.i32(i32 %2) #4
|
||||
%4 = fmul fast float %3, 2.500000e-01
|
||||
%5 = insertelement <4 x float> <float poison, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, float %4, i64 0
|
||||
ret <4 x float> %5
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
|
||||
declare float @air.convert.f.f32.u.i32(i32) local_unnamed_addr #2
|
||||
|
||||
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
|
||||
define <4 x float> @pdc_plain() local_unnamed_addr #3 {
|
||||
ret <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
|
||||
declare i32 @air.popcount.i32(i32) local_unnamed_addr #2
|
||||
|
||||
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) }
|
||||
attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
|
||||
attributes #4 = { nounwind willreturn memory(none) }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!air.vertex = !{!9}
|
||||
!air.fragment = !{!16, !21}
|
||||
!air.compile_options = !{!23, !24, !25}
|
||||
!llvm.ident = !{!26}
|
||||
!air.version = !{!27}
|
||||
!air.language_version = !{!28}
|
||||
|
||||
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
|
||||
!1 = !{i32 1, !"wchar_size", i32 4}
|
||||
!2 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
|
||||
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
|
||||
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
|
||||
!6 = !{i32 7, !"air.max_textures", i32 128}
|
||||
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
|
||||
!8 = !{i32 7, !"air.max_samplers", i32 16}
|
||||
!9 = !{ptr @pdc_vertex, !10, !12}
|
||||
!10 = !{!11}
|
||||
!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
|
||||
!12 = !{!13, !14, !15}
|
||||
!13 = !{i32 0, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"}
|
||||
!14 = !{i32 1, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"float2", !"air.arg_name", !"corners"}
|
||||
!15 = !{i32 2, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"float", !"air.arg_name", !"depth"}
|
||||
!16 = !{ptr @pdc_after, !17, !19, !"early_fragment_tests"}
|
||||
!17 = !{!18}
|
||||
!18 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"float4"}
|
||||
!19 = !{!20}
|
||||
!20 = !{i32 0, !"air.sample_mask_in", !"air.post_depth_coverage", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"}
|
||||
!21 = !{ptr @pdc_plain, !17, !22, !"early_fragment_tests"}
|
||||
!22 = !{}
|
||||
!23 = !{!"air.compile.denorms_disable"}
|
||||
!24 = !{!"air.compile.fast_math_enable"}
|
||||
!25 = !{!"air.compile.framebuffer_fetch_enable"}
|
||||
!26 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
|
||||
!27 = !{i32 2, i32 8, i32 0}
|
||||
!28 = !{!"Metal", i32 4, i32 0, i32 0}
|
||||
!29 = !{!30, !30, i64 0}
|
||||
!30 = !{!"omnipotent char", !31, i64 0}
|
||||
!31 = !{!"Simple C++ TBAA"}
|
||||
!32 = !{!33}
|
||||
!33 = distinct !{!33, !34, !"air-alias-scope-arg(1)"}
|
||||
!34 = distinct !{!34, !"air-alias-scopes(pdc_vertex)"}
|
||||
!35 = !{!36}
|
||||
!36 = distinct !{!36, !34, !"air-alias-scope-arg(2)"}
|
||||
!37 = !{!38, !38, i64 0}
|
||||
!38 = !{!"float", !30, i64 0}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Owned fixture: [[sample_mask, post_depth_coverage]] under early fragment tests. A pass at 4
|
||||
// samples draws a depth-writing triangle, then a triangle covering the whole target behind part
|
||||
// of it: `pdc_after` reads the coverage left after the depth test and writes its popcount / 4,
|
||||
// `pdc_plain` writes 1.0. Each runs once per pixel and writes its samples that pass, so the
|
||||
// resolved red of `pdc_after` is the square of `pdc_plain`'s (an M3 Max, measured). Loop-free.
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
struct PdcPoint {
|
||||
float4 position [[position]];
|
||||
};
|
||||
|
||||
// Corner `id` of the triangle in buffer 0, at the depth in buffer 1.
|
||||
vertex PdcPoint pdc_vertex(uint id [[vertex_id]], constant float2 *corners [[buffer(0)]],
|
||||
constant float &depth [[buffer(1)]]) {
|
||||
return PdcPoint { float4(corners[id], depth, 1.0) };
|
||||
}
|
||||
|
||||
// The share of the pixel's samples that passed the early depth test.
|
||||
[[early_fragment_tests]] fragment float4 pdc_after(uint mask [[sample_mask, post_depth_coverage]]) {
|
||||
return float4(float(popcount(mask)) / 4.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
// 1.0 on every sample that passes.
|
||||
[[early_fragment_tests]] fragment float4 pdc_plain() {
|
||||
return float4(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
@@ -382,7 +382,9 @@ impl AnswerGap {
|
||||
&& !param.binding.unused
|
||||
&& matches!(
|
||||
param.binding.role,
|
||||
ParamRole::Builtin(Builtin::SampleMaskIn)
|
||||
ParamRole::Builtin(
|
||||
Builtin::SampleMaskIn | Builtin::PostDepthCoverage
|
||||
)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -619,6 +619,8 @@ mod pool_churn;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod pool_slots;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod post_depth_coverage;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) mod predication;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod presenting;
|
||||
@@ -703,6 +705,8 @@ mod sample_copies;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod sample_fills;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod sample_imageblocks;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod sample_positions;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod separate_samples;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! Blit copies between textures of different formats and within one texture on the device the cfg
|
||||
//! selects, under the validation layer, against what Metal probes measured on an M3 Max (macOS
|
||||
//! 26.7) and an M4 (macOS 27.0.1), alike without API validation:
|
||||
//! Blit copies between textures of different formats and within one texture, and the CPU's copies
|
||||
//! through a stencil view, on the device the cfg selects, under the validation layer, against what
|
||||
//! Metal probes measured on an M3 Max (macOS 26.7 and 27.0.1) and an M4 (macOS 27.0.1), alike
|
||||
//! without API validation:
|
||||
//!
|
||||
//! - Between a depth-only or stencil-only format, or the stencil view `X32Stencil8` of a
|
||||
//! `Depth32FloatStencil8` texture, and a colour format of its copy unit (2 bytes for
|
||||
@@ -18,9 +19,11 @@
|
||||
//! - A region copied onto itself keeps its texels; a copy between other overlapping regions of
|
||||
//! one texture gives `memmove`'s answer, Metal's for small regions (its copy races past a few
|
||||
//! hundred texels), announcing `overlapping-texture-copy-as-memmove` once.
|
||||
//! - The CPU's copies through the stencil view of a `Shared` combined texture move the stencil, a
|
||||
//! byte a texel, rows `bytes_per_row` apart, its depth kept.
|
||||
//!
|
||||
//! Every texture is `Private` and read back through a buffer, as the probes read theirs. Depth
|
||||
//! values lie in `[0, 1]` wherever a depth image holds them, so no device's clamping decides
|
||||
//! Every other texture is `Private` and read back through a buffer, as the probes read theirs.
|
||||
//! Depth values lie in `[0, 1]` wherever a depth image holds them, so no device's clamping decides
|
||||
//! (`texture_blits` measures that).
|
||||
|
||||
use super::degrade_notices::assert_once;
|
||||
@@ -29,7 +32,7 @@ use crate::gpu::TEST_DEVICE;
|
||||
use metal2vulkan::metal::{PixelFormat, TextureUsage};
|
||||
use metal2vulkan_runtime::{
|
||||
BlitCommandEncoder, BlitOption, Buffer, CommandQueue, CopyProblem, CpuCacheMode, Degradation,
|
||||
Device, Error, HazardTrackingMode, Invalid, Origin, Problem, ResourceOptions, Size,
|
||||
Device, Error, HazardTrackingMode, Invalid, Origin, Problem, Region, ResourceOptions, Size,
|
||||
StorageMode, Texture, TextureDescriptor,
|
||||
};
|
||||
use std::time::Duration;
|
||||
@@ -396,6 +399,80 @@ fn the_stencil_view_of_a_combined_texture_copies_its_stencil() {
|
||||
assert_eq!(messages.take(), Vec::new(), "the validation layer reported");
|
||||
}
|
||||
|
||||
/// The CPU's copies through the stencil view `X32Stencil8` of a `Shared` `Depth32FloatStencil8`
|
||||
/// texture move the stencil, a byte a texel, rows `bytes_per_row` apart, the depth kept; the
|
||||
/// texture's own copies move the depth: plain Metal's answers on an M3 Max under macOS 27.0.1 (a
|
||||
/// probe at 32 and 4 bytes a row; its validation stops the CPU access).
|
||||
#[test]
|
||||
fn the_cpu_copies_through_the_stencil_view_move_the_stencil() {
|
||||
let messages = Messages::default();
|
||||
let cache = ScratchCache::new().unwrap();
|
||||
{
|
||||
let device = validated_device(TEST_DEVICE, &messages, cache.path()).unwrap();
|
||||
let name = device.name().to_owned();
|
||||
let lane = Lane {
|
||||
queue: device.new_command_queue().unwrap(),
|
||||
device,
|
||||
};
|
||||
let mut d = TextureDescriptor::texture_2d(PixelFormat::Depth32FloatStencil8, W, 2, false);
|
||||
d.usage = TextureUsage::SHADER_READ
|
||||
| TextureUsage::RENDER_TARGET
|
||||
| TextureUsage::PIXEL_FORMAT_VIEW;
|
||||
d.resource_options = ResourceOptions::shared();
|
||||
let texture = lane.device.new_texture(&d).unwrap();
|
||||
let view = texture.new_texture_view(PixelFormat::X32Stencil8).unwrap();
|
||||
let region = Region::new_2d(0, 0, W, 2);
|
||||
let depth = [FOUR, FOUR].concat();
|
||||
texture
|
||||
.replace_region(region, 0, 0, &depth, 16, 32)
|
||||
.unwrap();
|
||||
// The stencil, rows 32 bytes apart, the bytes between them unread.
|
||||
let mut apart = [0xeeu8; 64];
|
||||
apart[..4].copy_from_slice(&[0x10, 0x11, 0x12, 0x13]);
|
||||
apart[32..36].copy_from_slice(&[0x30, 0x31, 0x32, 0x33]);
|
||||
view.replace_region(region, 0, 0, &apart, 32, 64).unwrap();
|
||||
let mut got = [0xeeu8; 64];
|
||||
view.get_bytes(&mut got, 32, 64, region, 0, 0).unwrap();
|
||||
assert_eq!(got, apart, "the stencil 32 bytes a row on {name}");
|
||||
let mut packed = [0xeeu8; 8];
|
||||
view.get_bytes(&mut packed, 4, 8, region, 0, 0).unwrap();
|
||||
let stencil = [0x10, 0x11, 0x12, 0x13, 0x30, 0x31, 0x32, 0x33];
|
||||
assert_eq!(packed, stencil, "the stencil 4 bytes a row on {name}");
|
||||
let mut held = [0u8; 32];
|
||||
texture.get_bytes(&mut held, 16, 32, region, 0, 0).unwrap();
|
||||
assert_eq!(held.to_vec(), depth, "the depth kept on {name}");
|
||||
// A write at 4 bytes a row, read back by a blit of the texture's stencil.
|
||||
let rows = [0x5a, 0xff, 0x01, 0x80, 0x14, 0x15, 0x16, 0x17];
|
||||
view.replace_region(region, 0, 0, &rows, 4, 8).unwrap();
|
||||
let blitted = lane
|
||||
.run(|blit| {
|
||||
let buffer = lane.buffer(&[0xee; 16]);
|
||||
blit.copy_from_texture_to_buffer(
|
||||
&texture,
|
||||
0,
|
||||
0,
|
||||
Origin::new(0, 0, 0),
|
||||
Size::new(W, 2, 1),
|
||||
&buffer,
|
||||
0,
|
||||
W,
|
||||
2 * W,
|
||||
BlitOption::StencilFromDepthStencil,
|
||||
)?;
|
||||
Ok(vec![(buffer, 8)])
|
||||
})
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
blitted,
|
||||
vec![rows.to_vec()],
|
||||
"the stencil blitted on {name}"
|
||||
);
|
||||
texture.get_bytes(&mut held, 16, 32, region, 0, 0).unwrap();
|
||||
assert_eq!(held.to_vec(), depth, "the depth kept again on {name}");
|
||||
}
|
||||
assert_eq!(messages.take(), Vec::new(), "the validation layer reported");
|
||||
}
|
||||
|
||||
/// Probes 7, 7b and 8b: a region copied onto itself keeps its texels, the whole texture or a
|
||||
/// part; between other overlapping regions of one texture, through the texture or a view of it,
|
||||
/// the copy gives `memmove`'s answer (Metal's for these small regions), and the
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
//! Device tests of `[[sample_mask, post_depth_coverage]]` on the device the cfg selects, under the
|
||||
//! validation layer, over the owned fixture `pdc_post_depth_coverage`.
|
||||
//!
|
||||
//! An 8x8 pass at 4 samples (a 4-sample `R32Float` color resolved into a 1-sample one, and a
|
||||
//! 4-sample `Depth32Float` cleared to 1.0) draws a triangle that writes depth 0.25 over part of the
|
||||
//! target, then the triangle over the whole target at depth 0.5 under `Less`, without depth
|
||||
//! writes, through `pdc_after` (the popcount / 4 of the coverage after the early depth test) or
|
||||
//! `pdc_plain` (1.0). Each runs once per pixel and writes the samples that pass, so where `k` of a
|
||||
//! pixel's samples pass, `pdc_plain` resolves to k / 4 and `pdc_after` to (k / 4)²: Metal's answer
|
||||
//! on an M3 Max, at every pixel, over 12 partly covered pixels of this pass. A device without
|
||||
//! `VK_EXT_post_depth_coverage` refuses `pdc_after` by that need; a device whose driver splits a
|
||||
//! clipped triangle's pixel-rate fragments (lavapipe) may refuse it for that first.
|
||||
|
||||
use super::{buffer_with, validated_device, Messages, ScratchCache, WAIT};
|
||||
use crate::air_library::AirLibrary;
|
||||
use crate::gpu::TEST_DEVICE;
|
||||
use metal2vulkan::device::{DriverWorkaround, VkExtension};
|
||||
use metal2vulkan::error::{Capability, Feature, Needs};
|
||||
use metal2vulkan::metal::state::DepthStencilDescriptor;
|
||||
use metal2vulkan::metal::{
|
||||
ColorWriteMask, CompareFunction, PixelFormat, PrimitiveType, TextureType, TextureUsage,
|
||||
};
|
||||
use metal2vulkan::pipeline::{ColorAttachmentDescriptor, RenderPipelineDescriptor, StageSource};
|
||||
use metal2vulkan_devtools::llvm_assemble;
|
||||
use metal2vulkan_runtime::{
|
||||
CommandBufferStatus, Device, Error, Library, LoadAction, PipelineOptions, Region,
|
||||
RenderPassDescriptor, RenderPipelineState, ResourceOptions, StoreAction, Texture,
|
||||
TextureDescriptor,
|
||||
};
|
||||
use std::path::Path;
|
||||
|
||||
/// The pass's side in pixels.
|
||||
const SIDE: u64 = 8;
|
||||
|
||||
/// The fixture's library on `device`.
|
||||
fn library(device: &Device) -> Library {
|
||||
let ll = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("fixtures/public/engine/pdc_post_depth_coverage.ll");
|
||||
device
|
||||
.new_library_with_air(&llvm_assemble(&ll).unwrap())
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
/// A pipeline of `pdc_vertex` and `fragment` at 4 samples over an `R32Float` color, written or
|
||||
/// not, and a `Depth32Float` depth.
|
||||
fn pipeline(
|
||||
device: &Device,
|
||||
library: &Library,
|
||||
fragment: &str,
|
||||
written: bool,
|
||||
) -> Result<RenderPipelineState, Error> {
|
||||
let function = |name: &str| {
|
||||
StageSource::Function(
|
||||
library
|
||||
.new_function_with_name(name)
|
||||
.unwrap()
|
||||
.function_descriptor(),
|
||||
)
|
||||
};
|
||||
let mut descriptor = RenderPipelineDescriptor::new(function("pdc_vertex"));
|
||||
descriptor.fragment = Some(function(fragment));
|
||||
let mut color = ColorAttachmentDescriptor::new(PixelFormat::R32Float);
|
||||
if !written {
|
||||
color.write_mask = ColorWriteMask::NONE;
|
||||
}
|
||||
descriptor.color_attachments[0] = Some(color);
|
||||
descriptor.depth_format = Some(PixelFormat::Depth32Float);
|
||||
descriptor.raster_sample_count = 4;
|
||||
device.new_render_pipeline_state(&descriptor, &PipelineOptions::default())
|
||||
}
|
||||
|
||||
/// A texture of `pf`, SIDE wide and high, of `samples`, a render target, shared or private.
|
||||
fn texture(device: &Device, pf: PixelFormat, samples: u64, shared: bool) -> Texture {
|
||||
let mut descriptor = TextureDescriptor::texture_2d(pf, SIDE, SIDE, false);
|
||||
if samples > 1 {
|
||||
descriptor.texture_type = TextureType::Type2DMultisample;
|
||||
}
|
||||
descriptor.sample_count = samples;
|
||||
descriptor.usage = TextureUsage::RENDER_TARGET;
|
||||
descriptor.resource_options = if shared {
|
||||
ResourceOptions::shared()
|
||||
} else {
|
||||
ResourceOptions::private()
|
||||
};
|
||||
device.new_texture(&descriptor).unwrap()
|
||||
}
|
||||
|
||||
/// The resolved red of each pixel after the pass draws the depth triangle through `depth`, then
|
||||
/// the whole target through `drawn` (see the module docs).
|
||||
fn drawn(device: &Device, depth: &RenderPipelineState, drawn: &RenderPipelineState) -> Vec<f32> {
|
||||
let color = texture(device, PixelFormat::R32Float, 4, false);
|
||||
let resolved = texture(device, PixelFormat::R32Float, 1, true);
|
||||
let depth_texture = texture(device, PixelFormat::Depth32Float, 4, false);
|
||||
let mut pass = RenderPassDescriptor::new();
|
||||
pass.color_attachments[0].texture = Some(color);
|
||||
pass.color_attachments[0].load_action = LoadAction::Clear;
|
||||
pass.color_attachments[0].store_action = StoreAction::MultisampleResolve;
|
||||
pass.color_attachments[0].resolve_texture = Some(resolved.clone());
|
||||
pass.depth_attachment.texture = Some(depth_texture);
|
||||
pass.depth_attachment.load_action = LoadAction::Clear;
|
||||
pass.depth_attachment.clear_depth = 1.0;
|
||||
pass.depth_attachment.store_action = StoreAction::DontCare;
|
||||
let state = |compare, write| {
|
||||
let mut state = DepthStencilDescriptor::default();
|
||||
state.depth_compare_function = compare;
|
||||
state.depth_write_enabled = write;
|
||||
device.new_depth_stencil_state(&state).unwrap()
|
||||
};
|
||||
let (always, less) = (
|
||||
state(CompareFunction::Always, true),
|
||||
state(CompareFunction::Less, false),
|
||||
);
|
||||
let floats =
|
||||
|values: &[f32]| -> Vec<u8> { values.iter().flat_map(|v| v.to_le_bytes()).collect() };
|
||||
let near = buffer_with(device, &floats(&[-1.0, -1.0, 1.0, -0.3, -1.0, 1.0])).unwrap();
|
||||
let whole = buffer_with(device, &floats(&[-1.0, -1.0, 3.0, -1.0, -1.0, 3.0])).unwrap();
|
||||
let queue = device.new_command_queue().unwrap();
|
||||
let command_buffer = queue.command_buffer().unwrap();
|
||||
let mut encoder = command_buffer.render_command_encoder(&pass).unwrap();
|
||||
for (pipeline, state, corners, z) in [
|
||||
(depth, &always, &near, 0.25f32),
|
||||
(drawn, &less, &whole, 0.5),
|
||||
] {
|
||||
encoder.set_render_pipeline_state(pipeline).unwrap();
|
||||
encoder.set_depth_stencil_state(state).unwrap();
|
||||
encoder.set_vertex_buffer(Some(corners), 0, 0).unwrap();
|
||||
encoder.set_vertex_bytes(&z.to_le_bytes(), 1).unwrap();
|
||||
encoder
|
||||
.draw_primitives(PrimitiveType::Triangle, 0, 3, 1, 0)
|
||||
.unwrap();
|
||||
}
|
||||
encoder.end_encoding().unwrap();
|
||||
command_buffer.commit().unwrap();
|
||||
command_buffer.wait_until_completed_for(WAIT).unwrap();
|
||||
assert_eq!(command_buffer.status(), CommandBufferStatus::Completed);
|
||||
let mut bytes = vec![0u8; (4 * SIDE * SIDE) as usize];
|
||||
resolved
|
||||
.get_bytes(
|
||||
&mut bytes,
|
||||
4 * SIDE,
|
||||
4 * SIDE * SIDE,
|
||||
Region::new_2d(0, 0, SIDE, SIDE),
|
||||
0,
|
||||
0,
|
||||
)
|
||||
.unwrap();
|
||||
bytes
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|b| f32::from_le_bytes(*b))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// The coverage after the early depth test reads as Metal's: `pdc_after` resolves to the square
|
||||
/// of `pdc_plain` at every pixel, partly covered ones among them.
|
||||
#[test]
|
||||
fn the_coverage_after_the_depth_test_reads_as_metal_s() {
|
||||
let cache = ScratchCache::new().unwrap();
|
||||
let messages = Messages::default();
|
||||
{
|
||||
let device = validated_device(TEST_DEVICE, &messages, cache.path()).unwrap();
|
||||
let name = device.name().to_owned();
|
||||
let library = library(&device);
|
||||
let after = match pipeline(&device, &library, "pdc_after", true) {
|
||||
Ok(after) => after,
|
||||
Err(Error::Unsupported(u)) => {
|
||||
let ext = VkExtension::ExtPostDepthCoverage;
|
||||
let lacks = u.feature == Feature::PostDepthCoverage
|
||||
&& u.needs == Needs::AnyOf(vec![vec![Capability::Extension(ext)]])
|
||||
&& !device
|
||||
.compile_device()
|
||||
.profile()
|
||||
.enabled()
|
||||
.extensions
|
||||
.contains(&ext);
|
||||
let split = DriverWorkaround::ClippedTrianglesSplitPixelFragments;
|
||||
let splits = u.feature == Feature::PixelCoverage
|
||||
&& u.needs == Needs::DriverDefect(split)
|
||||
&& device
|
||||
.compile_device()
|
||||
.profile()
|
||||
.workarounds()
|
||||
.contains(&split);
|
||||
assert!(lacks || splits, "pdc_after on {name}: {u:?}");
|
||||
eprintln!("post-depth coverage on {name}: refused, {u:?}");
|
||||
return;
|
||||
}
|
||||
Err(error) => panic!("pdc_after on {name}: {error}"),
|
||||
};
|
||||
let plain = pipeline(&device, &library, "pdc_plain", true).unwrap();
|
||||
let depth = pipeline(&device, &library, "pdc_plain", false).unwrap();
|
||||
let reds = drawn(&device, &depth, &plain);
|
||||
let squares = drawn(&device, &depth, &after);
|
||||
let partial = reds.iter().filter(|&&r| r > 0.0 && r < 1.0).count();
|
||||
assert!(partial > 0, "no pixel partly covered on {name}: {reds:?}");
|
||||
assert_eq!(
|
||||
squares,
|
||||
reds.iter().map(|r| r * r).collect::<Vec<_>>(),
|
||||
"pdc_after against pdc_plain squared on {name}"
|
||||
);
|
||||
eprintln!("post-depth coverage on {name}: Metal's, {partial} pixels partly covered");
|
||||
}
|
||||
let reported = messages.take();
|
||||
assert!(
|
||||
reported.is_empty(),
|
||||
"the validation layer reported: {reported:#?}"
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
//! Device tests of a fragment imageblock in passes of one and four samples, and beside a depth
|
||||
//! attachment, on the device the cfg selects, under the validation layer, over the owned fixture
|
||||
//! `ibs_sample_imageblocks`: each pass is 8x8, an `R32Float` color (resolved at four samples) and
|
||||
//! the cell's float, which `ibs_read` returns as red. Against Metal on the M3 Max (macOS 27.0.1,
|
||||
//! a probe of the same functions):
|
||||
//!
|
||||
//! - At four samples the imageblock is per sample: after a write of 1 over the whole target, an
|
||||
//! add of 2 through a triangle that covers part of some pixels, and a read, a pixel resolves to
|
||||
//! `1 + 2c`, `c` the share of its samples the triangle covers (`ibs_plain`'s resolve); and
|
||||
//! `11 + 2c` after a further add of 10 over the whole target. A write returning the sample mask
|
||||
//! 0b0101 keeps samples 0 and 2: 4 everywhere.
|
||||
//! - A fragment its depth test fails drops its write; one that passes writes: after a write of 1,
|
||||
//! a write of 7 failing over the whole target and a write of 5 passing through the triangle,
|
||||
//! `1 + 4c`, at one sample and four, and so for a function under `[[early_fragment_tests]]`
|
||||
//! (whose draws test in the shader at four samples on a driver that drops an early-tests
|
||||
//! shader's image writes there). An add that discards column 7, failing with 2 and passing with
|
||||
//! 4, leaves 5 but 1 in column 7.
|
||||
|
||||
use super::{buffer_with, validated_device, Messages, ScratchCache, WAIT};
|
||||
use crate::air_library::AirLibrary;
|
||||
use crate::gpu::TEST_DEVICE;
|
||||
use metal2vulkan::error::{Feature, Needs};
|
||||
use metal2vulkan::metal::state::DepthStencilDescriptor;
|
||||
use metal2vulkan::metal::{
|
||||
ColorWriteMask, CompareFunction, PixelFormat, PrimitiveType, TextureType, TextureUsage,
|
||||
};
|
||||
use metal2vulkan::pipeline::{ColorAttachmentDescriptor, RenderPipelineDescriptor, StageSource};
|
||||
use metal2vulkan_devtools::llvm_assemble;
|
||||
use metal2vulkan_runtime::{
|
||||
CommandBufferStatus, Device, Error, Library, LoadAction, PipelineOptions, Region,
|
||||
RenderPassDescriptor, RenderPipelineState, ResourceOptions, StoreAction, Texture,
|
||||
TextureDescriptor,
|
||||
};
|
||||
use std::path::Path;
|
||||
|
||||
/// The pass's side in pixels.
|
||||
const SIDE: u64 = 8;
|
||||
|
||||
/// The triangle over the whole target, and the one that covers part of some pixels.
|
||||
const WHOLE: [f32; 6] = [-1.0, -1.0, 3.0, -1.0, -1.0, 3.0];
|
||||
const PART: [f32; 6] = [-1.0, -1.0, 1.0, -0.3, -1.0, 1.0];
|
||||
|
||||
/// One draw: the fragment function, the value in its buffer 0, its triangle, its depth, and
|
||||
/// whether it tests depth `Less` (else `Always`); no draw writes depth.
|
||||
struct Draw {
|
||||
fragment: &'static str,
|
||||
value: f32,
|
||||
corners: [f32; 6],
|
||||
z: f32,
|
||||
less: bool,
|
||||
}
|
||||
|
||||
const fn draw(fragment: &'static str, value: f32, corners: [f32; 6], z: f32, less: bool) -> Draw {
|
||||
Draw {
|
||||
fragment,
|
||||
value,
|
||||
corners,
|
||||
z,
|
||||
less,
|
||||
}
|
||||
}
|
||||
|
||||
/// The fixture's library on `device`.
|
||||
fn library(device: &Device) -> Library {
|
||||
let ll = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("fixtures/public/engine/ibs_sample_imageblocks.ll");
|
||||
device
|
||||
.new_library_with_air(&llvm_assemble(&ll).unwrap())
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
/// A pipeline of `ibs_vertex` and `fragment` at `samples` over the `R32Float` color (written by
|
||||
/// the functions that return a color) and, `depth`, a `Depth32Float` depth.
|
||||
fn pipeline(
|
||||
device: &Device,
|
||||
library: &Library,
|
||||
fragment: &str,
|
||||
samples: u32,
|
||||
depth: bool,
|
||||
) -> Result<RenderPipelineState, Error> {
|
||||
let function = |name: &str| {
|
||||
StageSource::Function(
|
||||
library
|
||||
.new_function_with_name(name)
|
||||
.unwrap()
|
||||
.function_descriptor(),
|
||||
)
|
||||
};
|
||||
let mut descriptor = RenderPipelineDescriptor::new(function("ibs_vertex"));
|
||||
descriptor.fragment = Some(function(fragment));
|
||||
let mut color = ColorAttachmentDescriptor::new(PixelFormat::R32Float);
|
||||
if !matches!(fragment, "ibs_read" | "ibs_plain") {
|
||||
color.write_mask = ColorWriteMask::NONE;
|
||||
}
|
||||
descriptor.color_attachments[0] = Some(color);
|
||||
if depth {
|
||||
descriptor.depth_format = Some(PixelFormat::Depth32Float);
|
||||
}
|
||||
descriptor.raster_sample_count = samples;
|
||||
device.new_render_pipeline_state(&descriptor, &PipelineOptions::default())
|
||||
}
|
||||
|
||||
/// A render target of `pf`, SIDE wide and high, of `samples`, shared where `shared`.
|
||||
fn texture(device: &Device, pf: PixelFormat, samples: u64, shared: bool) -> Texture {
|
||||
let mut descriptor = TextureDescriptor::texture_2d(pf, SIDE, SIDE, false);
|
||||
if samples > 1 {
|
||||
descriptor.texture_type = TextureType::Type2DMultisample;
|
||||
}
|
||||
descriptor.sample_count = samples;
|
||||
descriptor.usage = TextureUsage::RENDER_TARGET;
|
||||
descriptor.resource_options = if shared {
|
||||
ResourceOptions::shared()
|
||||
} else {
|
||||
ResourceOptions::private()
|
||||
};
|
||||
device.new_texture(&descriptor).unwrap()
|
||||
}
|
||||
|
||||
/// The red of each pixel after a pass at `samples` (beside a depth cleared to 0.5 where `depth`)
|
||||
/// runs `draws` through `pipelines` (one per draw), resolved at more than one sample.
|
||||
fn run(
|
||||
device: &Device,
|
||||
pipelines: &[RenderPipelineState],
|
||||
draws: &[Draw],
|
||||
samples: u64,
|
||||
depth: bool,
|
||||
) -> Vec<f32> {
|
||||
let resolved = texture(device, PixelFormat::R32Float, 1, true);
|
||||
let mut pass = RenderPassDescriptor::new();
|
||||
let color = &mut pass.color_attachments[0];
|
||||
color.load_action = LoadAction::Clear;
|
||||
if samples > 1 {
|
||||
color.texture = Some(texture(device, PixelFormat::R32Float, samples, false));
|
||||
color.store_action = StoreAction::MultisampleResolve;
|
||||
color.resolve_texture = Some(resolved.clone());
|
||||
} else {
|
||||
color.texture = Some(resolved.clone());
|
||||
color.store_action = StoreAction::Store;
|
||||
}
|
||||
if depth {
|
||||
pass.depth_attachment.texture =
|
||||
Some(texture(device, PixelFormat::Depth32Float, samples, false));
|
||||
pass.depth_attachment.load_action = LoadAction::Clear;
|
||||
pass.depth_attachment.clear_depth = 0.5;
|
||||
pass.depth_attachment.store_action = StoreAction::DontCare;
|
||||
}
|
||||
pass.tile_width = 16;
|
||||
pass.tile_height = 16;
|
||||
pass.imageblock_sample_length = 32;
|
||||
let state = |less: bool| {
|
||||
let mut state = DepthStencilDescriptor::default();
|
||||
state.depth_compare_function = match less {
|
||||
true => CompareFunction::Less,
|
||||
false => CompareFunction::Always,
|
||||
};
|
||||
state.depth_write_enabled = false;
|
||||
device.new_depth_stencil_state(&state).unwrap()
|
||||
};
|
||||
let (always, less) = (state(false), state(true));
|
||||
let floats =
|
||||
|values: &[f32]| -> Vec<u8> { values.iter().flat_map(|v| v.to_le_bytes()).collect() };
|
||||
let queue = device.new_command_queue().unwrap();
|
||||
let command_buffer = queue.command_buffer().unwrap();
|
||||
let mut encoder = command_buffer.render_command_encoder(&pass).unwrap();
|
||||
let mut held = Vec::new();
|
||||
for (draw, pipeline) in draws.iter().zip(pipelines) {
|
||||
let corners = buffer_with(device, &floats(&draw.corners)).unwrap();
|
||||
encoder.set_render_pipeline_state(pipeline).unwrap();
|
||||
if depth {
|
||||
let state = if draw.less { &less } else { &always };
|
||||
encoder.set_depth_stencil_state(state).unwrap();
|
||||
}
|
||||
encoder.set_vertex_buffer(Some(&corners), 0, 0).unwrap();
|
||||
encoder.set_vertex_bytes(&draw.z.to_le_bytes(), 1).unwrap();
|
||||
encoder
|
||||
.set_fragment_bytes(&draw.value.to_le_bytes(), 0)
|
||||
.unwrap();
|
||||
encoder
|
||||
.draw_primitives(PrimitiveType::Triangle, 0, 3, 1, 0)
|
||||
.unwrap();
|
||||
held.push(corners);
|
||||
}
|
||||
encoder.end_encoding().unwrap();
|
||||
command_buffer.commit().unwrap();
|
||||
command_buffer.wait_until_completed_for(WAIT).unwrap();
|
||||
assert_eq!(command_buffer.status(), CommandBufferStatus::Completed);
|
||||
drop(held);
|
||||
let mut bytes = vec![0u8; (4 * SIDE * SIDE) as usize];
|
||||
resolved
|
||||
.get_bytes(
|
||||
&mut bytes,
|
||||
4 * SIDE,
|
||||
4 * SIDE * SIDE,
|
||||
Region::new_2d(0, 0, SIDE, SIDE),
|
||||
0,
|
||||
0,
|
||||
)
|
||||
.unwrap();
|
||||
bytes
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|b| f32::from_le_bytes(*b))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Metal's answers of the module docs, at one sample and four, against each pixel's coverage by
|
||||
/// the partial triangle.
|
||||
#[test]
|
||||
fn an_imageblock_is_per_sample_and_tested_as_metal_s() {
|
||||
let cache = ScratchCache::new().unwrap();
|
||||
let messages = Messages::default();
|
||||
{
|
||||
let device = validated_device(TEST_DEVICE, &messages, cache.path()).unwrap();
|
||||
let name = device.name().to_owned();
|
||||
let library = library(&device);
|
||||
let mut answers = Vec::new();
|
||||
for samples in [1u64, 4] {
|
||||
// The share of each pixel's samples the partial triangle covers.
|
||||
let plain = [draw("ibs_plain", 0.0, PART, 0.25, false)];
|
||||
let made = pipeline(&device, &library, "ibs_plain", samples as u32, false).unwrap();
|
||||
let cover = run(&device, &[made], &plain, samples, false);
|
||||
let partial = cover.iter().filter(|&&c| c > 0.0 && c < 1.0).count();
|
||||
assert!(
|
||||
samples == 1 || partial > 0,
|
||||
"no partly covered pixel on {name}"
|
||||
);
|
||||
let per_pixel = |f: &dyn Fn(usize, f32) -> f32| -> Vec<f32> {
|
||||
cover.iter().enumerate().map(|(i, &c)| f(i, c)).collect()
|
||||
};
|
||||
let mut cases: Vec<(&str, bool, Vec<Draw>, Vec<f32>)> = vec![
|
||||
(
|
||||
"a partial add",
|
||||
false,
|
||||
vec![
|
||||
draw("ibs_write", 1.0, WHOLE, 0.25, false),
|
||||
draw("ibs_add", 2.0, PART, 0.25, false),
|
||||
draw("ibs_read", 0.0, WHOLE, 0.25, false),
|
||||
],
|
||||
per_pixel(&|_, c| 1.0 + 2.0 * c),
|
||||
),
|
||||
(
|
||||
"a partial add, then a whole one",
|
||||
false,
|
||||
vec![
|
||||
draw("ibs_write", 1.0, WHOLE, 0.25, false),
|
||||
draw("ibs_add", 2.0, PART, 0.25, false),
|
||||
draw("ibs_add", 10.0, WHOLE, 0.25, false),
|
||||
draw("ibs_read", 0.0, WHOLE, 0.25, false),
|
||||
],
|
||||
per_pixel(&|_, c| 11.0 + 2.0 * c),
|
||||
),
|
||||
(
|
||||
"a write under a failing and a passing depth test",
|
||||
true,
|
||||
vec![
|
||||
draw("ibs_write", 1.0, WHOLE, 0.25, false),
|
||||
draw("ibs_write", 7.0, WHOLE, 0.75, true),
|
||||
draw("ibs_write", 5.0, PART, 0.25, true),
|
||||
draw("ibs_read", 0.0, WHOLE, 0.25, false),
|
||||
],
|
||||
per_pixel(&|_, c| 1.0 + 4.0 * c),
|
||||
),
|
||||
(
|
||||
"a discarding add under a failing and a passing depth test",
|
||||
true,
|
||||
vec![
|
||||
draw("ibs_write", 1.0, WHOLE, 0.25, false),
|
||||
draw("ibs_add_discard", 2.0, WHOLE, 0.75, true),
|
||||
draw("ibs_add_discard", 4.0, WHOLE, 0.25, true),
|
||||
draw("ibs_read", 0.0, WHOLE, 0.25, false),
|
||||
],
|
||||
per_pixel(&|i, _| if i as u64 % SIDE == 7 { 1.0 } else { 5.0 }),
|
||||
),
|
||||
(
|
||||
"an early-tests write under a failing and a passing depth test",
|
||||
true,
|
||||
vec![
|
||||
draw("ibs_write", 1.0, WHOLE, 0.25, false),
|
||||
draw("ibs_write_early", 7.0, PART, 0.75, true),
|
||||
draw("ibs_write_early", 5.0, PART, 0.25, true),
|
||||
draw("ibs_read", 0.0, WHOLE, 0.25, false),
|
||||
],
|
||||
per_pixel(&|_, c| 1.0 + 4.0 * c),
|
||||
),
|
||||
];
|
||||
if samples > 1 {
|
||||
cases.push((
|
||||
"a write returning the mask 0b0101",
|
||||
false,
|
||||
vec![
|
||||
draw("ibs_write", 1.0, WHOLE, 0.25, false),
|
||||
draw("ibs_write_masked", 7.0, WHOLE, 0.25, false),
|
||||
draw("ibs_read", 0.0, WHOLE, 0.25, false),
|
||||
],
|
||||
vec![4.0; (SIDE * SIDE) as usize],
|
||||
));
|
||||
}
|
||||
for (what, depth, draws, want) in cases {
|
||||
let mut pipelines = Vec::new();
|
||||
let mut refused = None;
|
||||
for d in &draws {
|
||||
match pipeline(&device, &library, d.fragment, samples as u32, depth) {
|
||||
Ok(p) => pipelines.push(p),
|
||||
Err(Error::Unsupported(u)) => {
|
||||
refused = Some((d.fragment, u));
|
||||
break;
|
||||
}
|
||||
Err(error) => panic!("{what} at {samples}x on {name}: {error}"),
|
||||
}
|
||||
}
|
||||
if let Some((fragment, u)) = refused {
|
||||
let lacks =
|
||||
u.feature == Feature::Imageblocks && matches!(u.needs, Needs::AnyOf(_));
|
||||
assert!(lacks, "{what} at {samples}x on {name}: {fragment}: {u:?}");
|
||||
answers.push(format!("{what} {samples}x refused, {u:?}"));
|
||||
continue;
|
||||
}
|
||||
let got = run(&device, &pipelines, &draws, samples, depth);
|
||||
assert_eq!(got, want, "{what} at {samples}x on {name}");
|
||||
answers.push(format!("{what} {samples}x Metal's"));
|
||||
}
|
||||
}
|
||||
eprintln!("sample imageblocks on {name}: {}", answers.join("; "));
|
||||
}
|
||||
let reported = messages.take();
|
||||
assert!(
|
||||
reported.is_empty(),
|
||||
"the validation layer reported: {reported:#?}"
|
||||
);
|
||||
}
|
||||
@@ -281,6 +281,115 @@ fn a_32x32_tile_threadgroup_takes_metals_layout() {
|
||||
});
|
||||
}
|
||||
|
||||
/// Metal's quad order of a tile threadgroup of `qw` by `qh` 2x2 quads (measured on an Apple M3 Max
|
||||
/// for every threadgroup of 1 to 32 threads a side): columns 8 quads wide, within a column its rows
|
||||
/// of 2 quads, within a row its blocks 4 quads wide, within a block its quads row-major. Quad `k`
|
||||
/// of the order is lanes `4 (k mod 8)` to `4 (k mod 8) + 3` of simdgroup `k / 8`, its threads in
|
||||
/// rows.
|
||||
fn quad_order(qw: u64, qh: u64) -> Vec<(u64, u64)> {
|
||||
let mut order = Vec::new();
|
||||
for c0 in (0..qw).step_by(8) {
|
||||
let c1 = (c0 + 8).min(qw);
|
||||
for r0 in (0..qh).step_by(2) {
|
||||
let r1 = (r0 + 2).min(qh);
|
||||
for b0 in (c0..c1).step_by(4) {
|
||||
let b1 = (b0 + 4).min(c1);
|
||||
for qy in r0..r1 {
|
||||
for qx in b0..b1 {
|
||||
order.push((qx, qy));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
order
|
||||
}
|
||||
|
||||
/// Threadgroups of even sides other than squares and power-of-two rectangles run each thread at
|
||||
/// Metal's place in a 32x32 tile: `k10ts_tile_order`'s record at each thread index (its position,
|
||||
/// lane and simdgroup, and its simdgroup's first lane's position) and each cell of the
|
||||
/// threadgroup, added 1 once, the cells past it kept. Among them the shapes whose simdgroup is a
|
||||
/// whole row of quads (16x2, 32x2) and whose columns, rows and blocks end partly (6x6, 10x10,
|
||||
/// 30x30, 24x8, 2x18, 14x4).
|
||||
#[test]
|
||||
fn even_tile_threadgroups_take_metals_layout() {
|
||||
on_device(|device| {
|
||||
let state = state(device, "k10ts_tile_order", &[PixelFormat::R32Float]);
|
||||
let area = [SIDE, SIDE];
|
||||
let start: Vec<u8> = (0..SIDE * SIDE)
|
||||
.flat_map(|i| (i as f32).to_le_bytes())
|
||||
.collect();
|
||||
let place = |(x, y): (u64, u64)| (x | (y << 8)) as u32;
|
||||
for [w, h] in [
|
||||
[16, 2],
|
||||
[32, 2],
|
||||
[6, 6],
|
||||
[10, 10],
|
||||
[30, 30],
|
||||
[24, 8],
|
||||
[2, 18],
|
||||
[14, 4],
|
||||
] {
|
||||
let target = texture(
|
||||
device,
|
||||
PixelFormat::R32Float,
|
||||
area,
|
||||
TextureUsage::RENDER_TARGET,
|
||||
&start,
|
||||
SIDE * 4,
|
||||
);
|
||||
let records = SIDE * SIDE * 8;
|
||||
let out = device
|
||||
.new_buffer(records, ResourceOptions::shared())
|
||||
.unwrap();
|
||||
run(device, &[&target], |encoder| {
|
||||
encoder.set_render_pipeline_state(&state).unwrap();
|
||||
encoder.set_tile_buffer(Some(&out), 0, 0).unwrap();
|
||||
encoder
|
||||
.dispatch_threads_per_tile(Size::new(w, h, 1))
|
||||
.unwrap();
|
||||
});
|
||||
let words: Vec<u32> = read_buffer(&out, 0, records)
|
||||
.unwrap()
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|w| u32::from_le_bytes([w[0], w[1], w[2], w[3]]))
|
||||
.collect();
|
||||
let order = quad_order(w / 2, h / 2);
|
||||
let at = |k: usize, within: u64| {
|
||||
let (qx, qy) = order[k];
|
||||
(qx * 2 + within % 2, qy * 2 + within / 2)
|
||||
};
|
||||
for (k, &(qx, qy)) in order.iter().enumerate() {
|
||||
let (simdgroup, first) = (k / 8, at(k / 8 * 8, 0));
|
||||
for within in 0..4 {
|
||||
let (x, y) = at(k, within);
|
||||
let lane = (k % 8) as u64 * 4 + within;
|
||||
let index = (((qy * (w / 2) + qx) * 4) + within) as usize;
|
||||
assert_eq!(
|
||||
words[2 * index],
|
||||
place((x, y)) | ((lane as u32) << 16) | ((simdgroup as u32) << 24),
|
||||
"{w}x{h}: thread ({x}, {y})"
|
||||
);
|
||||
assert_eq!(
|
||||
words[2 * index + 1],
|
||||
place(first),
|
||||
"{w}x{h}: thread ({x}, {y}), its first lane"
|
||||
);
|
||||
}
|
||||
}
|
||||
let cells = texels(&target, area, 4);
|
||||
for (i, cell) in cells.as_chunks::<4>().0.iter().enumerate() {
|
||||
let (x, y) = (i as u64 % SIDE, i as u64 / SIDE);
|
||||
let f = f32::from_le_bytes([cell[0], cell[1], cell[2], cell[3]]);
|
||||
let added = if x < w && y < h { 1.0 } else { 0.0 };
|
||||
assert_eq!(f, i as f32 + added, "{w}x{h}: cell ({x}, {y})");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// The blur's source texel at (`x`, `y`): small integers, so every sum is exact in `half`.
|
||||
fn source_texel(x: u64, y: u64) -> [u64; 4] {
|
||||
[(x + 2 * y) % 8, (3 * x + y) % 8, (x * y) % 8, (x ^ y) % 8]
|
||||
|
||||
@@ -415,29 +415,23 @@ pub(crate) struct Planned {
|
||||
/// The widest tile threadgroup, and the tallest: Metal's largest tile, 32x32.
|
||||
pub(crate) const TILE_THREADGROUP_SIDE: u32 = 32;
|
||||
|
||||
/// Whether Metal's tile-dispatch layout of a `width x height x 1` threadgroup is the one the
|
||||
/// lowering reproduces (`lower::dispatch`'s `tile_pos` and `tile_index`), as measured on Apple
|
||||
/// silicon: both sides powers of two from 2 to 32, or the single thread, where
|
||||
/// each simdgroup is a whole block of its column (`b x 32 / b` positions, `b` the column's width up
|
||||
/// to 8, the column the threadgroup's width up to 16) or the threadgroup is one simdgroup at most 8
|
||||
/// wide. Metal lays out the others another way (a 16x2 threadgroup's one simdgroup, a 1xN
|
||||
/// threadgroup's thread indices), or they are not measured.
|
||||
/// Whether the lowering runs a `width x height x 1` tile threadgroup in Metal's layout
|
||||
/// (`lower::dispatch`'s `tile_pos` and `tile_index`, the order measured on an Apple M3 Max for every
|
||||
/// side from 1 to 32): both sides even from 2 to 32, where every quad is whole so `sg · 32 + lane`
|
||||
/// numbers the threads densely, or the single thread. A threadgroup with an odd side leaves the
|
||||
/// lanes of the threads past it empty in its quads, which no Vulkan workgroup leaves.
|
||||
fn tile_layout_measured(width: u32, height: u32) -> bool {
|
||||
if (width, height) == (1, 1) {
|
||||
return true;
|
||||
}
|
||||
let side = |n: u32| n.is_power_of_two() && (2..=TILE_THREADGROUP_SIDE).contains(&n);
|
||||
if !side(width) || !side(height) {
|
||||
return false;
|
||||
}
|
||||
// A simdgroup's block is `min(width, 8)` wide (its column's width capped at 8).
|
||||
let block = width.min(8);
|
||||
height >= 32 / block || (width * height <= 32 && width <= 8)
|
||||
let side = |n: u32| n % 2 == 0 && (2..=TILE_THREADGROUP_SIDE).contains(&n);
|
||||
side(width) && side(height)
|
||||
}
|
||||
|
||||
/// A tile function's dispatch: one threadgroup per tile, `Dispatch::Threadgroups`, of a threadgroup
|
||||
/// whose layout is measured ([`tile_layout_measured`]); any other is `Unsupported{TileShading,
|
||||
/// NotImplemented}`, its threads' layout not being read.
|
||||
/// the lowering lays out as Metal does ([`tile_layout_measured`]); any other is
|
||||
/// `Unsupported{TileShading, NotImplemented}`: a threadgroup with an odd side, whose empty lanes
|
||||
/// are not built, or one deeper than 1.
|
||||
fn check_tile_dispatch(dispatch: &Dispatch) -> Result<(), BindError> {
|
||||
match *dispatch {
|
||||
Dispatch::Threadgroups {
|
||||
|
||||
@@ -1456,6 +1456,11 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
|
||||
});
|
||||
let tested_attachments =
|
||||
p.graphics.depth_format.is_some() || p.graphics.stencil_format.is_some();
|
||||
// What stores before the tests: the storage form's colors, or else the imageblock.
|
||||
let tested_feature = match p.graphics.fragment_imageblock {
|
||||
Some(_) if p.graphics.storage_attachments.is_empty() => Feature::Imageblocks,
|
||||
_ => Feature::FramebufferFetch,
|
||||
};
|
||||
// Where only the depth test can drop a fragment, the stencil test does nothing and nothing
|
||||
// is counted, the variant whose function runs the depth test itself (`shader_tests`), where
|
||||
// the device ships it at the pipeline's samples; a draw whose tests write nothing keeps the
|
||||
@@ -1471,7 +1476,7 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
|
||||
);
|
||||
if !float {
|
||||
return Err(BindError::Unsupported(
|
||||
Unsupported::not_implemented(Feature::FramebufferFetch)
|
||||
Unsupported::not_implemented(tested_feature.clone())
|
||||
.at_attachment(Attachment::Depth),
|
||||
));
|
||||
}
|
||||
@@ -1508,7 +1513,7 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
|
||||
}
|
||||
(Some(_), FragmentTests::Drop | FragmentTests::Stencil) if stencil => {
|
||||
return Err(BindError::Unsupported(
|
||||
Unsupported::not_implemented(Feature::FramebufferFetch)
|
||||
Unsupported::not_implemented(tested_feature.clone())
|
||||
.at_attachment(Attachment::Stencil),
|
||||
));
|
||||
}
|
||||
@@ -1527,11 +1532,11 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
|
||||
None => Attachment::Stencil,
|
||||
};
|
||||
return Err(BindError::Unsupported(
|
||||
Unsupported::not_implemented(Feature::FramebufferFetch).at_attachment(at),
|
||||
Unsupported::not_implemented(tested_feature.clone()).at_attachment(at),
|
||||
));
|
||||
}
|
||||
(Some(_), FragmentTests::Any | FragmentTests::Stencil) if tested_attachments => {
|
||||
return Err(not_implemented(Feature::FramebufferFetch));
|
||||
return Err(not_implemented(tested_feature.clone()));
|
||||
}
|
||||
_ => (false, false, false, false),
|
||||
};
|
||||
|
||||
@@ -563,8 +563,8 @@ pub(crate) struct LocalRules {
|
||||
/// The emulated simdgroups' scratch (`RuntimeFact::SimdgroupEmulation`).
|
||||
pub scratch: Option<ScratchRule>,
|
||||
/// The pipeline is a tile function (`RuntimeFact::TileFunction`): its threads take Metal's
|
||||
/// tile-dispatch layout, measured only for the threadgroups `dispatch::tile_layout_measured`
|
||||
/// takes, dispatched by threadgroups.
|
||||
/// tile-dispatch layout, built for the threadgroups `dispatch::tile_layout_measured` takes,
|
||||
/// dispatched by threadgroups.
|
||||
pub tile: bool,
|
||||
/// The threadgroup Metal answers a tile function whose threadgroup is the tile
|
||||
/// (`RuntimeFact::TileThreadgroup` with `tile_sized`): the shape's tile, its imageblock size,
|
||||
|
||||
+3
-2
@@ -955,7 +955,7 @@ codec_enum! {
|
||||
KhrShaderQuadControl,
|
||||
ExtAttachmentFeedbackLoopLayout, ExtExtendedDynamicState3,
|
||||
KhrFormatFeatureFlags2,
|
||||
ExtProvokingVertex,
|
||||
ExtProvokingVertex, ExtPostDepthCoverage,
|
||||
}
|
||||
SubgroupOp { Basic, Vote, Arithmetic, Ballot, Shuffle, ShuffleRelative, Clustered, Quad }
|
||||
FloatWidth { F16, F32, F64 }
|
||||
@@ -1041,6 +1041,7 @@ codec_enum! {
|
||||
ExtDescriptorIndexing, ExtShaderAtomicFloat16Add, KhrSubgroupRotate, KhrRayQuery, KhrFma,
|
||||
ExtMeshShader,
|
||||
KhrQuadControl,
|
||||
KhrPostDepthCoverage,
|
||||
}
|
||||
StageCreateFlag { RequireFullSubgroups, AllowVaryingSubgroupSize }
|
||||
Independence { Only32Bit, All, None }
|
||||
@@ -1164,7 +1165,7 @@ codec_enum! {
|
||||
RenderTargetArrayLength { layer_dropped }, StageInRegion,
|
||||
StageInStride { layout },
|
||||
UniformViewRange { slot, choice }, UniformViewAliasing { slot },
|
||||
FragmentImageblock { words, writes, early_tests, master, data_size, alignment },
|
||||
FragmentImageblock { words, writes, master, data_size, alignment },
|
||||
TileFunction, TileAttachmentFormat { color, format },
|
||||
StorageTextureNumericType { slot },
|
||||
OutOfBoundsAlpha { slot },
|
||||
|
||||
-1
@@ -543,7 +543,6 @@ fn the_version_193_fields_round_trip() {
|
||||
let fact = RuntimeFact::FragmentImageblock {
|
||||
words: 3,
|
||||
writes: true,
|
||||
early_tests: false,
|
||||
master: [5; 32],
|
||||
data_size: 11,
|
||||
alignment: 2,
|
||||
|
||||
@@ -355,6 +355,7 @@ fn facts(ext: VkExtension) -> ExtensionFacts {
|
||||
| E::ExtProvokingVertex
|
||||
| E::ExtAttachmentFeedbackLoopLayout
|
||||
| E::ExtExtendedDynamicState3
|
||||
| E::ExtPostDepthCoverage
|
||||
| E::ImgFormatPvrtc
|
||||
| E::KhrPortabilitySubset
|
||||
| E::ExtShaderAtomicFloat => fact(true, None, &[]),
|
||||
|
||||
@@ -1702,6 +1702,7 @@ pub(crate) fn extension_from_name(name: &str) -> Option<VkExtension> {
|
||||
"VK_EXT_extended_dynamic_state2" => E::ExtExtendedDynamicState2,
|
||||
"VK_EXT_extended_dynamic_state3" => E::ExtExtendedDynamicState3,
|
||||
"VK_KHR_format_feature_flags2" => E::KhrFormatFeatureFlags2,
|
||||
"VK_EXT_post_depth_coverage" => E::ExtPostDepthCoverage,
|
||||
"VK_EXT_attachment_feedback_loop_layout" => E::ExtAttachmentFeedbackLoopLayout,
|
||||
"VK_EXT_mutable_descriptor_type" | "VK_VALVE_mutable_descriptor_type" => {
|
||||
E::ExtMutableDescriptorType
|
||||
|
||||
@@ -1229,7 +1229,11 @@ pub enum DriverWorkaround {
|
||||
/// to exactly that attribute, so it has the defect. The per-sample storage form of a
|
||||
/// framebuffer fetch writes the attachment's samples through a storage image under early tests
|
||||
/// where the pipeline has a depth or stencil attachment (or Metal's function declares them), so
|
||||
/// there it is refused (`lower::fragment`'s `storage_form`).
|
||||
/// there it is refused (`lower::fragment`'s `storage_form`). An explicit imageblock's storage
|
||||
/// image, whose writes Metal keeps under early tests at every sample count, declares none
|
||||
/// there: its draws run the tests in the shader before the write, and a function declaring
|
||||
/// them that discards, returns depth, stencil or a mask, or writes other memory, which the
|
||||
/// tests' place would change, is refused (`lower::fragment::imageblock`).
|
||||
EarlyTestsDropMultisampledImageWrites,
|
||||
/// The driver rasterizes a triangle it clips as several triangles, so in a pass of more
|
||||
/// than one sample a fragment shader that runs once per pixel runs once per piece in each
|
||||
|
||||
@@ -448,6 +448,9 @@ pub enum VkExtension {
|
||||
/// `VK_EXT_provoking_vertex` (never promoted): [`VkFeature::ProvokingVertexLast`] and
|
||||
/// [`VkProperty::ProvokingVertexModePerPipeline`].
|
||||
ExtProvokingVertex,
|
||||
/// `VK_EXT_post_depth_coverage` (never promoted, no feature member): a fragment shader's
|
||||
/// `SampleMask` input read after the early depth and stencil tests (`PostDepthCoverage`).
|
||||
ExtPostDepthCoverage,
|
||||
}
|
||||
|
||||
/// One subgroup operation class (`VkSubgroupFeatureFlagBits`).
|
||||
@@ -1120,6 +1123,8 @@ pub enum SpirvExtension {
|
||||
ExtMeshShader,
|
||||
// Appended.
|
||||
KhrQuadControl,
|
||||
// Appended.
|
||||
KhrPostDepthCoverage,
|
||||
}
|
||||
|
||||
/// The SPIR-V capabilities a module's [`Requirements`] list without the feature that enables them,
|
||||
|
||||
@@ -78,7 +78,6 @@ fn every_fact() -> Vec<RuntimeFact> {
|
||||
RuntimeFact::FragmentImageblock {
|
||||
words: 4,
|
||||
writes: true,
|
||||
early_tests: false,
|
||||
master: [7; 32],
|
||||
data_size: 16,
|
||||
alignment: 16,
|
||||
|
||||
@@ -1135,12 +1135,12 @@ pub enum Feature {
|
||||
Tessellation,
|
||||
MeshShading,
|
||||
TileShading,
|
||||
/// An imageblock outside the single-sample forms implemented: a multisample imageblock's
|
||||
/// operation (its sample count, the colors a pixel holds, a color's coverage mask, or a store
|
||||
/// to the samples a coverage mask selects); a fragment imageblock on a multisample, layered or
|
||||
/// amplified pass, or whose write a later test or alpha to coverage may drop; or an explicit
|
||||
/// layout, imageblock data operand or slice write of a shape not modelled. Tile functions and
|
||||
/// fragment imageblocks run on single-sample passes.
|
||||
/// An imageblock outside the forms implemented: a multisample imageblock's operation (its
|
||||
/// sample count, the colors a pixel holds, a color's coverage mask, or a store to the samples
|
||||
/// a coverage mask selects); a fragment imageblock on a layered or amplified pass, written
|
||||
/// under alpha to coverage, or whose write a test may drop where no form runs the test first;
|
||||
/// or an explicit layout, imageblock data operand or slice write of a shape not modelled. Tile
|
||||
/// functions run on single-sample passes; fragment imageblocks hold a block per sample.
|
||||
Imageblocks,
|
||||
RayTracing,
|
||||
Tensors,
|
||||
@@ -1396,6 +1396,9 @@ pub enum Feature {
|
||||
/// buffer's other such fences the translation keeps through an atomic of the command buffer's
|
||||
/// `ExecutionStatus` word: in a vertex or fragment stage without its stores and atomics.
|
||||
SeqCstFence,
|
||||
/// The coverage after the depth and stencil tests (`[[sample_mask, post_depth_coverage]]`),
|
||||
/// read through `VK_EXT_post_depth_coverage`.
|
||||
PostDepthCoverage,
|
||||
}
|
||||
|
||||
/// The part of a blend into an extended-range attachment that [`Feature::ExtendedRangeBlend`]
|
||||
|
||||
@@ -27,17 +27,18 @@
|
||||
//! dispatch, the region push field (below).
|
||||
//!
|
||||
//! **Tile functions**. Metal's tile dispatch lays its threads out as a fragment pass does, measured
|
||||
//! on Apple silicon for squares of 1 to 32 threads a side and power-of-two rectangles: the
|
||||
//! threadgroup is columns `min(width, 16)` wide, each holding its share of the simdgroups in order;
|
||||
//! a column's simdgroup is a `b x 32/b` block of positions with `b = min(width, 8)` (8x4 in a
|
||||
//! threadgroup at least 8 wide, the blocks in row-major order), whose lanes run over its 2x2 quads
|
||||
//! in row-major order, each quad's four threads in row-major order; and
|
||||
//! `thread_index_in_threadgroup` runs over the threadgroup's 2x2 quads in row-major order across
|
||||
//! its whole width, so for a 16-wide threadgroup it is not `sg · 32 + lane`. A tile function
|
||||
//! on an Apple M3 Max for every threadgroup of 1 to 32 threads a side, in 16x16, 32x16 and 32x32
|
||||
//! tiles alike: the threadgroup is `⌈width / 2⌉` by `⌈height / 2⌉` 2x2 quads, which simdgroups
|
||||
//! take eight at a time in Metal's quad order (columns 8 quads wide, within a column its rows of 2
|
||||
//! quads, within a row its blocks 4 quads wide, within a block its quads row-major), each quad's
|
||||
//! four threads its lanes in row-major order, where a thread past an odd side leaves its lane
|
||||
//! empty; and `thread_index_in_threadgroup` runs over the threadgroup's quads in row-major order
|
||||
//! across its whole width, so for a 16-wide threadgroup it is not `sg · 32 + lane`. A tile function
|
||||
//! therefore takes `lin` as Metal's `sg · 32 + lane` (its simd builtins and operations are
|
||||
//! unchanged) and derives its position from it by that layout (`KernelDecl::tile_pos`), and its
|
||||
//! unchanged) and derives its position from it by that order (`KernelDecl::tile_pos`), and its
|
||||
//! thread and quadgroup indices from the position (`KernelDecl::tile_index`). The binder runs a
|
||||
//! tile function only over threadgroups of the measured shapes (`bind::dispatch`).
|
||||
//! tile function only over threadgroups whose lanes it fills, both sides even, or the single
|
||||
//! thread (`bind::dispatch`).
|
||||
//!
|
||||
//! **Regions**. A kernel that reads a grid builtin (`thread_position_in_grid`,
|
||||
//! `threadgroup_position_in_grid`, `threads_per_grid`, `threadgroups_per_grid`, and the
|
||||
@@ -1074,12 +1075,14 @@ impl KernelDecl {
|
||||
}
|
||||
|
||||
/// A tile function's position of the thread whose `sg · 32 + lane` is `lin`, in a threadgroup
|
||||
/// `sx` by `sy`: the threadgroup is columns `c = min(sx, 16)` wide, each holding `max(c · sy /
|
||||
/// 32, 1)` simdgroups in order; with `b = min(c, 8)`, a column's simdgroup `s` is its block `(s
|
||||
/// mod (c / b), s / (c / b))` of `b x 32 / b` positions, and lane `l` of it is thread `l mod 4`
|
||||
/// (row-major) of the block's quad `l / 4` (row-major, `b / 2` quads a row). Every divisor is
|
||||
/// at least 1 for any local size, so the unmeasured shapes the binder refuses never divide by
|
||||
/// zero.
|
||||
/// `sx` by `sy` of `qw = ⌈sx / 2⌉` by `qh = ⌈sy / 2⌉` 2x2 quads: lane `lin mod 4` is thread
|
||||
/// `lin mod 4` (row-major) of the threadgroup's quad `k = lin / 4` in Metal's quad order. That
|
||||
/// order runs over columns 8 quads wide (the last narrower), within a column over its rows of
|
||||
/// 2 quads (the last 1 where `qh` is odd), within such a row over its blocks 4 quads wide (the
|
||||
/// last narrower), and within a block over its quads row-major: so a full column is `8 · qh`
|
||||
/// quads, its row `2 · cw` for a column `cw` wide, and its block `4 · rh` for a row `rh` high.
|
||||
/// Every divisor is at least 1 for any local size, so the shapes the binder refuses never divide
|
||||
/// by zero.
|
||||
fn tile_pos(&self, fb: &mut FunctionBuilder<'_>, lin: SValue) -> BResult<SValue> {
|
||||
let bin = |fb: &mut FunctionBuilder<'_>, op, a, n: u32| -> BResult<SValue> {
|
||||
let n = Self::k(fb, n)?;
|
||||
@@ -1096,46 +1099,59 @@ impl KernelDecl {
|
||||
let none = fb.binary(BinOp::IEqual, a, zero)?;
|
||||
fb.select(none, one, a)
|
||||
};
|
||||
// `n - taken`, at most `most` and at least 1: the extent left of a column, row or block.
|
||||
let left = |fb: &mut FunctionBuilder<'_>, n, taken, most: u32| -> BResult<SValue> {
|
||||
let below = fb.binary(BinOp::ULessThan, taken, n)?;
|
||||
let rest = fb.binary(BinOp::ISub, n, taken)?;
|
||||
let zero = Self::k(fb, 0)?;
|
||||
let rest = fb.select(below, rest, zero)?;
|
||||
let rest = at_most(fb, rest, most)?;
|
||||
at_least_one(fb, rest)
|
||||
};
|
||||
let sx = fb.module().const_value(self.size[0])?;
|
||||
let sy = fb.module().const_value(self.size[1])?;
|
||||
let c = at_most(fb, sx, 16)?;
|
||||
let b = at_most(fb, c, 8)?;
|
||||
let half = bin(fb, BinOp::ShiftRightLogical, b, 1)?;
|
||||
let quads = at_least_one(fb, half)?;
|
||||
let thirty_two = Self::k(fb, 32)?;
|
||||
let height = fb.binary(BinOp::UDiv, thirty_two, b)?;
|
||||
let per_row = fb.binary(BinOp::UDiv, c, b)?;
|
||||
let column_threads = fb.binary(BinOp::IMul, c, sy)?;
|
||||
let per_column = bin(fb, BinOp::ShiftRightLogical, column_threads, 5)?;
|
||||
let per_column = at_least_one(fb, per_column)?;
|
||||
let sg = bin(fb, BinOp::ShiftRightLogical, lin, 5)?;
|
||||
let lane = bin(fb, BinOp::BitwiseAnd, lin, 31)?;
|
||||
let column = fb.binary(BinOp::UDiv, sg, per_column)?;
|
||||
let s = fb.binary(BinOp::UMod, sg, per_column)?;
|
||||
let bx = fb.binary(BinOp::UMod, s, per_row)?;
|
||||
let by = fb.binary(BinOp::UDiv, s, per_row)?;
|
||||
let q = bin(fb, BinOp::ShiftRightLogical, lane, 2)?;
|
||||
let rx = bin(fb, BinOp::BitwiseAnd, lane, 1)?;
|
||||
let ry = bin(fb, BinOp::ShiftRightLogical, lane, 1)?;
|
||||
let wide = bin(fb, BinOp::IAdd, sx, 1)?;
|
||||
let qw = bin(fb, BinOp::ShiftRightLogical, wide, 1)?;
|
||||
let tall = bin(fb, BinOp::IAdd, sy, 1)?;
|
||||
let qh = bin(fb, BinOp::ShiftRightLogical, tall, 1)?;
|
||||
let k = bin(fb, BinOp::ShiftRightLogical, lin, 2)?;
|
||||
let rx = bin(fb, BinOp::BitwiseAnd, lin, 1)?;
|
||||
let ry = bin(fb, BinOp::ShiftRightLogical, lin, 1)?;
|
||||
let ry = bin(fb, BinOp::BitwiseAnd, ry, 1)?;
|
||||
let qx = fb.binary(BinOp::UMod, q, quads)?;
|
||||
let qy = fb.binary(BinOp::UDiv, q, quads)?;
|
||||
let cx = fb.binary(BinOp::IMul, column, c)?;
|
||||
let bx_b = fb.binary(BinOp::IMul, bx, b)?;
|
||||
let x0 = fb.binary(BinOp::IAdd, cx, bx_b)?;
|
||||
let qx2 = bin(fb, BinOp::ShiftLeftLogical, qx, 1)?;
|
||||
let x1 = fb.binary(BinOp::IAdd, x0, qx2)?;
|
||||
let x = fb.binary(BinOp::IAdd, x1, rx)?;
|
||||
let y0 = fb.binary(BinOp::IMul, by, height)?;
|
||||
let qy2 = bin(fb, BinOp::ShiftLeftLogical, qy, 1)?;
|
||||
let y1 = fb.binary(BinOp::IAdd, y0, qy2)?;
|
||||
let y = fb.binary(BinOp::IAdd, y1, ry)?;
|
||||
// The column: `8 · qh` quads each but the last.
|
||||
let column_quads = bin(fb, BinOp::ShiftLeftLogical, qh, 3)?;
|
||||
let column_quads = at_least_one(fb, column_quads)?;
|
||||
let c = fb.binary(BinOp::UDiv, k, column_quads)?;
|
||||
let kc = fb.binary(BinOp::UMod, k, column_quads)?;
|
||||
let c0 = bin(fb, BinOp::ShiftLeftLogical, c, 3)?;
|
||||
let cw = left(fb, qw, c0, 8)?;
|
||||
// The column's row of quads: `2 · cw` quads each but the last.
|
||||
let row_quads = bin(fb, BinOp::ShiftLeftLogical, cw, 1)?;
|
||||
let r = fb.binary(BinOp::UDiv, kc, row_quads)?;
|
||||
let kr = fb.binary(BinOp::UMod, kc, row_quads)?;
|
||||
let r0 = bin(fb, BinOp::ShiftLeftLogical, r, 1)?;
|
||||
let rh = left(fb, qh, r0, 2)?;
|
||||
// The row's block: `4 · rh` quads each but the last.
|
||||
let block_quads = bin(fb, BinOp::ShiftLeftLogical, rh, 2)?;
|
||||
let b = fb.binary(BinOp::UDiv, kr, block_quads)?;
|
||||
let kb = fb.binary(BinOp::UMod, kr, block_quads)?;
|
||||
let b0 = bin(fb, BinOp::ShiftLeftLogical, b, 2)?;
|
||||
let bw = left(fb, cw, b0, 4)?;
|
||||
let in_x = fb.binary(BinOp::UMod, kb, bw)?;
|
||||
let in_y = fb.binary(BinOp::UDiv, kb, bw)?;
|
||||
let qx = fb.binary(BinOp::IAdd, c0, b0)?;
|
||||
let qx = fb.binary(BinOp::IAdd, qx, in_x)?;
|
||||
let qy = fb.binary(BinOp::IAdd, r0, in_y)?;
|
||||
let x = bin(fb, BinOp::ShiftLeftLogical, qx, 1)?;
|
||||
let x = fb.binary(BinOp::IAdd, x, rx)?;
|
||||
let y = bin(fb, BinOp::ShiftLeftLogical, qy, 1)?;
|
||||
let y = fb.binary(BinOp::IAdd, y, ry)?;
|
||||
let z = Self::k(fb, 0)?;
|
||||
fb.composite_construct(self.uvec3, &[x, y, z])
|
||||
}
|
||||
|
||||
/// A tile function's `thread_index_in_threadgroup` of the thread at position `pos`: its 2x2
|
||||
/// quad's index in row-major order over the threadgroup's `sx / 2` quads a row, times four,
|
||||
/// quad's index in row-major order over the threadgroup's `⌈sx / 2⌉` quads a row, times four,
|
||||
/// plus its place in the quad (row-major).
|
||||
fn tile_index(&self, fb: &mut FunctionBuilder<'_>, pos: SValue) -> BResult<SValue> {
|
||||
let bin = |fb: &mut FunctionBuilder<'_>, op, a, n: u32| -> BResult<SValue> {
|
||||
@@ -1145,7 +1161,8 @@ impl KernelDecl {
|
||||
let x = fb.composite_extract(pos, &[0])?;
|
||||
let y = fb.composite_extract(pos, &[1])?;
|
||||
let sx = fb.module().const_value(self.size[0])?;
|
||||
let quads = bin(fb, BinOp::ShiftRightLogical, sx, 1)?;
|
||||
let wide = bin(fb, BinOp::IAdd, sx, 1)?;
|
||||
let quads = bin(fb, BinOp::ShiftRightLogical, wide, 1)?;
|
||||
let qy = bin(fb, BinOp::ShiftRightLogical, y, 1)?;
|
||||
let qx = bin(fb, BinOp::ShiftRightLogical, x, 1)?;
|
||||
let row = fb.binary(BinOp::IMul, qy, quads)?;
|
||||
|
||||
@@ -161,7 +161,12 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> {
|
||||
.iter()
|
||||
.any(|b| role(&b.role) && arg_used(body, b.param))
|
||||
};
|
||||
if !used(&|r| matches!(r, ParamRole::Builtin(Builtin::SampleMaskIn))) {
|
||||
if !used(&|r| {
|
||||
matches!(
|
||||
r,
|
||||
ParamRole::Builtin(Builtin::SampleMaskIn | Builtin::PostDepthCoverage)
|
||||
)
|
||||
}) {
|
||||
return Ok(());
|
||||
}
|
||||
// Off Apple's rasterizer, a multisampled read of the coverage meets no split of a clipped
|
||||
|
||||
@@ -1199,11 +1199,13 @@ pub(crate) fn extended_range_blend(
|
||||
|
||||
/// What the function's body holds that the storage form depends on, from one walk.
|
||||
#[derive(Default)]
|
||||
struct BodyFacts {
|
||||
pub(super) struct BodyFacts {
|
||||
/// The LLVM parameters the body reads.
|
||||
used: BTreeSet<u32>,
|
||||
discards: bool,
|
||||
side_effects: bool,
|
||||
pub(super) used: BTreeSet<u32>,
|
||||
/// The body discards the fragment.
|
||||
pub(super) discards: bool,
|
||||
/// The body writes memory (`discard::side_effect`).
|
||||
pub(super) side_effects: bool,
|
||||
}
|
||||
|
||||
/// How the depth and stencil tests bear on the function's storage writes, which it makes before
|
||||
@@ -1235,7 +1237,7 @@ fn stored_before_tests(
|
||||
}
|
||||
}
|
||||
|
||||
fn body_facts(cx: &SelectCx<'_>) -> BodyFacts {
|
||||
pub(super) fn body_facts(cx: &SelectCx<'_>) -> BodyFacts {
|
||||
let mut out = BodyFacts::default();
|
||||
for (id, inst) in cx.body.insts.iter() {
|
||||
inst.kind.for_each_value(|v| {
|
||||
|
||||
@@ -64,6 +64,7 @@ use crate::air::abi::{ImageblockArg, ImageblockKind, Member, OutputRole, StructI
|
||||
use crate::air::container::Hash256;
|
||||
use crate::air::ir::{ArgIdx, Type, TypeId as AirTypeId, Value};
|
||||
use crate::device::requirements::VkFeature;
|
||||
use crate::device::DriverWorkaround;
|
||||
use crate::error::{Capability, Error, Feature, Unsupported};
|
||||
use crate::lower::emit::EmitCx;
|
||||
use crate::lower::select::SelectCx;
|
||||
@@ -140,8 +141,19 @@ pub struct ImageblockPlan {
|
||||
/// (`fingerprint`; the first planned of equal size).
|
||||
pub master: Option<Hash256>,
|
||||
/// The returned struct's field holding the `[[sample_mask]]` the function returns beside an
|
||||
/// output view: the write is kept only where the mask covers the pixel's sample.
|
||||
/// output view: the write is kept only where the mask covers the invocation's sample.
|
||||
pub mask: Option<u32>,
|
||||
/// The stage interface's `SampleId` object of a function compiled for a multisampled
|
||||
/// pipeline (`LoweringInputs::multisampled`), which runs once per covered sample and reaches
|
||||
/// its own sample's cell: words `sample * words` on.
|
||||
pub sample: Option<usize>,
|
||||
/// The module declares early fragment tests, which the function does not, so that a depth or
|
||||
/// stencil test the fragment fails drops its write as Metal's does ([`plan_tests`]).
|
||||
pub early_tests: bool,
|
||||
/// The module declares no early fragment tests, which the function does: its draws test
|
||||
/// before its write as each one's plan chooses, on a driver that would drop its writes under
|
||||
/// early tests ([`plan_tests`]).
|
||||
pub late_tests: bool,
|
||||
}
|
||||
|
||||
/// An upper estimate of the words one view's members add (each leaf read or written, and a
|
||||
@@ -393,6 +405,20 @@ fn reach(cx: &mut SelectCx<'_>, cell: Reached) -> Result<(), Error> {
|
||||
}
|
||||
let known = cx.families.fragment.imageblock.is_some();
|
||||
let coord = stage_io::frag_coord(cx);
|
||||
// Metal keeps a multisampled pass's imageblock per sample, and runs a function that reaches
|
||||
// it once per covered sample, each run its own sample's cell (measured on the M3 Max).
|
||||
let sample = if cx.inputs.multisampled {
|
||||
if !cx.profile.fields().fragment.sample_rate_shading {
|
||||
return Err(Unsupported::needs(
|
||||
Feature::Imageblocks,
|
||||
Capability::Feature(VkFeature::SampleRateShading),
|
||||
)
|
||||
.into());
|
||||
}
|
||||
Some(stage_io::sample_id(cx))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let ib = cx
|
||||
.families
|
||||
.fragment
|
||||
@@ -402,6 +428,7 @@ fn reach(cx: &mut SelectCx<'_>, cell: Reached) -> Result<(), Error> {
|
||||
ib.master = Some(cell.master);
|
||||
}
|
||||
ib.coord = coord;
|
||||
ib.sample = sample;
|
||||
ib.words = ib.words.max(cell.data_size.div_ceil(4));
|
||||
ib.data_size = ib.data_size.max(cell.data_size);
|
||||
ib.alignment = ib.alignment.max(cell.alignment);
|
||||
@@ -460,9 +487,110 @@ pub fn select_output(
|
||||
return Err(not_implemented());
|
||||
}
|
||||
plan.output = Some((field, view));
|
||||
let early = plan_tests(cx)?;
|
||||
if let Some(plan) = cx.families.fragment.imageblock.as_mut() {
|
||||
plan.early_tests = early;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The entry declares `[[early_fragment_tests]]`.
|
||||
fn declared_early(cx: &SelectCx<'_>) -> bool {
|
||||
matches!(
|
||||
cx.entry.ep.stage,
|
||||
crate::air::abi::Stage::Fragment {
|
||||
early_fragment_tests: true
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/// Plan how the depth and stencil tests bear on the imageblock write of a function that writes
|
||||
/// one, before the stage interface is complete; whether the module declares early fragment tests
|
||||
/// that the function does not.
|
||||
///
|
||||
/// A fragment its depth or stencil test fails drops its imageblock write, as does one alpha to
|
||||
/// coverage drops (measured on the M3 Max, at one sample and at four). Tested early, a fragment
|
||||
/// that fails never writes; tested late, the storage already holds its write. So:
|
||||
///
|
||||
/// - a function whose only effects are its outputs and its imageblock write, which neither
|
||||
/// discards nor returns depth, stencil or a sample mask, leaves the attachments under early
|
||||
/// tests as Metal's late tests leave them: the module declares them;
|
||||
/// - any other writes before Vulkan's tests and states `RuntimeFact::TestedStorageWrites`, as the
|
||||
/// framebuffer fetch's storage form does: a draw whose tests drop no fragment runs it as
|
||||
/// compiled, one whose tests drop some but write and count nothing the variant that declares
|
||||
/// early tests (where only a discard kept them away, `early_variant`), and one whose depth test
|
||||
/// acts the variant that runs the draw's depth test itself, before the write
|
||||
/// (`depth_test`), and its stencil test too where that acts (`bind::graphics`).
|
||||
///
|
||||
/// A driver that drops every image write of an early-tests fragment shader in a pass of more than
|
||||
/// one sample (`DriverWorkaround::EarlyTestsDropMultisampledImageWrites`, MoltenVK on Apple's
|
||||
/// GPU) takes no early tests at more than one sample: the function's draws test in the shader
|
||||
/// there, and one that declares early tests itself is refused as that defect.
|
||||
fn plan_tests(cx: &mut SelectCx<'_>) -> Result<bool, Error> {
|
||||
let defect = DriverWorkaround::EarlyTestsDropMultisampledImageWrites;
|
||||
let drops = cx.inputs.multisampled && cx.profile.fields().workarounds.contains(&defect);
|
||||
let declared = declared_early(cx);
|
||||
if declared && !drops {
|
||||
return Ok(false);
|
||||
}
|
||||
let outputs = &cx.entry.ep.outputs;
|
||||
let field =
|
||||
|role: fn(&OutputRole) -> bool| outputs.iter().find(|o| role(&o.role)).map(|o| o.field);
|
||||
let exports = super::depth_test::Exports {
|
||||
depth: field(|r| matches!(r, OutputRole::Depth(_))),
|
||||
stencil: field(|r| matches!(r, OutputRole::Stencil)),
|
||||
mask: field(|r| matches!(r, OutputRole::SampleMask)),
|
||||
};
|
||||
let exported = exports.depth.is_some() || exports.stencil.is_some() || exports.mask.is_some();
|
||||
let body = super::fetch::body_facts(cx);
|
||||
let only_outputs = !exported && !body.side_effects;
|
||||
if declared {
|
||||
// Metal tests such a function early. One whose only effects are its outputs and its
|
||||
// write, which does not discard, leaves the attachments under late tests as under early
|
||||
// ones, so where the driver's defect would drop its writes the module declares none and
|
||||
// its draws test before the write as below. Another (a discard, an export, or other
|
||||
// memory writes after its early tests) has no form here.
|
||||
if !only_outputs || body.discards {
|
||||
return Err(Unsupported::driver_defect(Feature::Imageblocks, defect).into());
|
||||
}
|
||||
if let Some(plan) = cx.families.fragment.imageblock.as_mut() {
|
||||
plan.late_tests = true;
|
||||
}
|
||||
}
|
||||
let only_outputs = only_outputs && !drops;
|
||||
let fp = &cx.families.fragment;
|
||||
// A framebuffer fetch's storage form that declares early tests holds the function to them,
|
||||
// which keeps the write Metal's: it declares them only where the function would here.
|
||||
if fp.fetch_early_tests {
|
||||
return Ok(false);
|
||||
}
|
||||
if only_outputs && !body.discards {
|
||||
return Ok(true);
|
||||
}
|
||||
let stated = cx.facts.iter().find_map(|f| match *f {
|
||||
RuntimeFact::TestedStorageWrites { early_variant, .. } => Some(early_variant),
|
||||
_ => None,
|
||||
});
|
||||
match stated {
|
||||
// The storage form's early-tests variant (whose function writes no other memory and
|
||||
// exports nothing) would lose this write to the driver's defect.
|
||||
Some(true) if drops => {
|
||||
return Err(Unsupported::driver_defect(Feature::Imageblocks, defect).into());
|
||||
}
|
||||
Some(_) => {}
|
||||
None => {
|
||||
cx.facts.insert(RuntimeFact::TestedStorageWrites {
|
||||
early_tests: only_outputs && cx.inputs.read_only_tests,
|
||||
early_variant: only_outputs,
|
||||
});
|
||||
if cx.inputs.shader_tests && cx.families.fragment.depth_test.is_none() {
|
||||
super::depth_test::plan(cx, exports)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(stated.is_none() && only_outputs && cx.inputs.read_only_tests)
|
||||
}
|
||||
|
||||
fn invariant_error(detail: &str) -> Error {
|
||||
Error::Internal(crate::error::InternalError::new(
|
||||
crate::error::InternalKind::Invariant,
|
||||
@@ -470,19 +598,11 @@ fn invariant_error(detail: &str) -> Error {
|
||||
))
|
||||
}
|
||||
|
||||
/// Complete the imageblock plan once the function is selected: its fact, and the refusals of
|
||||
/// the module docs.
|
||||
/// Complete the imageblock plan once the function is selected: its fact.
|
||||
pub(super) fn finish(cx: &mut SelectCx<'_>) -> Result<(), Error> {
|
||||
let early = matches!(
|
||||
cx.entry.ep.stage,
|
||||
crate::air::abi::Stage::Fragment {
|
||||
early_fragment_tests: true
|
||||
}
|
||||
);
|
||||
// A sample mask the function returns that does not cover the pixel's sample drops its
|
||||
// imageblock write with the fragment (measured on the M3 Max and an M4): the write is guarded
|
||||
// by the mask's bit 0, the one sample of the pass (link refuses a multisampled imageblock
|
||||
// pipeline).
|
||||
// A sample mask the function returns that does not cover the invocation's sample drops its
|
||||
// imageblock write with the fragment (measured on the M3 Max and an M4 at one sample, and on
|
||||
// the M3 Max at four, where each sample's run writes where the mask has its bit).
|
||||
let mask = cx
|
||||
.entry
|
||||
.ep
|
||||
@@ -501,7 +621,6 @@ pub(super) fn finish(cx: &mut SelectCx<'_>) -> Result<(), Error> {
|
||||
let fact = RuntimeFact::FragmentImageblock {
|
||||
words: plan.words,
|
||||
writes,
|
||||
early_tests: early,
|
||||
master,
|
||||
data_size: plan.data_size,
|
||||
alignment: plan.alignment,
|
||||
@@ -540,12 +659,15 @@ pub(super) fn declare(
|
||||
.map(Some)
|
||||
}
|
||||
|
||||
/// The cell of one pixel as a word memory: word `w` is texel `(x, y, w)` of the image, accessed
|
||||
/// with the function's coherence (`sync::memory_model`).
|
||||
/// The cell of one pixel as a word memory: word `w` is texel `(x, y, w)` of the image, and
|
||||
/// in a function that runs once per sample texel `(x, y, sample * words + w)`, accessed with the
|
||||
/// function's coherence (`sync::memory_model`).
|
||||
struct Cell {
|
||||
image: SValue,
|
||||
x: SValue,
|
||||
y: SValue,
|
||||
/// The first layer of the invocation's sample's cell, in a function that runs per sample.
|
||||
base: Option<SValue>,
|
||||
coherence: Coherence,
|
||||
}
|
||||
|
||||
@@ -555,7 +677,7 @@ impl Cell {
|
||||
let Some(plan) = &cx.plan.families.fragment.imageblock else {
|
||||
return Err(cx.fail("an imageblock access without its plan"));
|
||||
};
|
||||
let coord = plan.coord;
|
||||
let (coord, words) = (plan.coord, plan.words);
|
||||
let Some(g) = cx.decl.families.fragment.imageblock else {
|
||||
return Err(cx.fail("the imageblock storage is not declared"));
|
||||
};
|
||||
@@ -574,10 +696,18 @@ impl Cell {
|
||||
let fy = fb.composite_extract(frag, &[1])?;
|
||||
let x = fb.convert(ConvOp::ConvertFToU, fx, u32_)?;
|
||||
let y = fb.convert(ConvOp::ConvertFToU, fy, u32_)?;
|
||||
let base = match sample_of(cx, fb)? {
|
||||
Some(sample) => {
|
||||
let words = k32(fb, words)?;
|
||||
Some(fb.binary(BinOp::IMul, sample, words)?)
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
Ok(Cell {
|
||||
image,
|
||||
x,
|
||||
y,
|
||||
base,
|
||||
coherence: memory_model::coherence(cx.plan),
|
||||
})
|
||||
}
|
||||
@@ -588,10 +718,31 @@ impl Cell {
|
||||
signed: false,
|
||||
})?;
|
||||
let uvec3 = fb.module().ty(SType::Vector { elem: u32_, len: 3 })?;
|
||||
fb.composite_construct(uvec3, &[self.x, self.y, word])
|
||||
let layer = match self.base {
|
||||
Some(base) => fb.binary(BinOp::IAdd, base, word)?,
|
||||
None => word,
|
||||
};
|
||||
fb.composite_construct(uvec3, &[self.x, self.y, layer])
|
||||
}
|
||||
}
|
||||
|
||||
/// The invocation's sample (`SampleId`) in a function that runs once per sample.
|
||||
fn sample_of(cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>) -> BResult<Option<SValue>> {
|
||||
let Some(object) = cx
|
||||
.plan
|
||||
.families
|
||||
.fragment
|
||||
.imageblock
|
||||
.as_ref()
|
||||
.and_then(|p| p.sample)
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
let g = stage_io::object_global(cx, object)?;
|
||||
let p = fb.module().global_value(g)?;
|
||||
fb.load(p, MemAccess::default()).map(Some)
|
||||
}
|
||||
|
||||
impl WordMem for Cell {
|
||||
fn read(&mut self, fb: &mut FunctionBuilder<'_>, word: SValue) -> BResult<SValue> {
|
||||
let at = self.texel(fb, word)?;
|
||||
@@ -699,6 +850,11 @@ pub(super) fn emit_return(
|
||||
let covered = match mask {
|
||||
Some(m) => {
|
||||
let m = fb.composite_extract(whole, &[m])?;
|
||||
// The invocation's own sample's bit; bit 0 at one sample.
|
||||
let m = match sample_of(cx, fb)? {
|
||||
Some(sample) => fb.binary(BinOp::ShiftRightLogical, m, sample)?,
|
||||
None => m,
|
||||
};
|
||||
let one = k32(fb, 1)?;
|
||||
let zero = k32(fb, 0)?;
|
||||
let bit = fb.binary(BinOp::BitwiseAnd, m, one)?;
|
||||
|
||||
@@ -470,10 +470,15 @@ pub fn declare(
|
||||
if let Some(m) = fp.interlock.or(snapshot::mode(&fp.snapshot)) {
|
||||
modes.push(m);
|
||||
}
|
||||
// The storage form's writes are Metal's under early tests.
|
||||
if fp.fetch_early_tests {
|
||||
// The storage form's writes, and the imageblock's, are Metal's under early tests.
|
||||
let imageblock_early = fp.imageblock.as_ref().is_some_and(|p| p.early_tests);
|
||||
if fp.fetch_early_tests || imageblock_early {
|
||||
modes.push(ExecMode::EarlyFragmentTests);
|
||||
}
|
||||
// The function's own early tests, where the imageblock's write tests late instead.
|
||||
if fp.imageblock.as_ref().is_some_and(|p| p.late_tests) {
|
||||
modes.retain(|m| *m != ExecMode::EarlyFragmentTests);
|
||||
}
|
||||
if fp.records_discards() {
|
||||
let bool_ = mb.ty(SType::Bool)?;
|
||||
let no = mb.constant(Constant::Scalar {
|
||||
|
||||
@@ -774,6 +774,23 @@ pub fn param(cx: &mut SelectCx<'_>, b: &ParamBinding) -> Result<(), Error> {
|
||||
refuse_int64_interface(cx.entry, ty)?;
|
||||
let f = form_on(cx.entry, cx.profile, ty)?;
|
||||
let (spirv, shape, place, contract, enabler) = input_builtin(cx, *bi, f, frag)?;
|
||||
// `[[sample_mask, post_depth_coverage]]`: `SampleMask` read after the early depth and
|
||||
// stencil tests, which the entry declares (the AIR decode requires them), through
|
||||
// `VK_EXT_post_depth_coverage`.
|
||||
if *bi == Builtin::PostDepthCoverage {
|
||||
let ext = VkExtension::ExtPostDepthCoverage;
|
||||
if !cx.profile.fields().enabled.extensions.contains(&ext) {
|
||||
return Err(Unsupported::needs(
|
||||
Feature::PostDepthCoverage,
|
||||
Capability::Extension(ext),
|
||||
)
|
||||
.into());
|
||||
}
|
||||
let modes = &mut cx.families.stage_io.modes;
|
||||
if !modes.contains(&ExecMode::PostDepthCoverage) {
|
||||
modes.push(ExecMode::PostDepthCoverage);
|
||||
}
|
||||
}
|
||||
if matches!(
|
||||
contract,
|
||||
StageBuiltin::BaseVertex | StageBuiltin::BaseInstance
|
||||
@@ -1831,7 +1848,9 @@ fn input_builtin(
|
||||
None,
|
||||
)
|
||||
}
|
||||
Bi::SampleMaskIn if !vertex => {
|
||||
// The coverage after the early tests reads the same builtin under `PostDepthCoverage`
|
||||
// (the entry's mode, `ParamRole::Builtin` in `plan`).
|
||||
Bi::SampleMaskIn | Bi::PostDepthCoverage if !vertex => {
|
||||
int_scalar(f)?;
|
||||
(
|
||||
B::SampleMask,
|
||||
|
||||
@@ -124,6 +124,7 @@ fn partition_builtin(b: Builtin) -> bool {
|
||||
| Builtin::PrimitiveId
|
||||
| Builtin::SampleId
|
||||
| Builtin::SampleMaskIn
|
||||
| Builtin::PostDepthCoverage
|
||||
| Builtin::BarycentricCoord(_)
|
||||
| Builtin::RenderTargetArrayIndex
|
||||
| Builtin::ViewportArrayIndex => true,
|
||||
|
||||
@@ -130,15 +130,15 @@ pub enum RuntimeFact {
|
||||
/// consumer binds the pass's imageblock storage (`SyntheticBinding::Imageblock`), which
|
||||
/// `GraphicsState::fragment_imageblock` describes. `writes`: the function writes the
|
||||
/// imageblock, so the storage holds its write before the pipeline's coverage (alpha to
|
||||
/// coverage) could drop the fragment; `early_tests`: it declares `[[early_fragment_tests]]`, so
|
||||
/// the depth and stencil tests run before its body; `master`: the fingerprint of the master
|
||||
/// coverage) could drop the fragment (the depth and stencil tests run before its write: its
|
||||
/// module declares early tests, or it states [`TestedStorageWrites`](Self::TestedStorageWrites));
|
||||
/// `master`: the fingerprint of the master
|
||||
/// layout its views view (`FragmentImageblock::master`); `data_size`: the cell's bytes
|
||||
/// (`air.imageblock_data_size`); `alignment`: the alignment Metal states for its views
|
||||
/// (`air.arg_type_align_size`, `FragmentImageblock::alignment`).
|
||||
FragmentImageblock {
|
||||
words: u32,
|
||||
writes: bool,
|
||||
early_tests: bool,
|
||||
master: Hash256,
|
||||
data_size: u32,
|
||||
alignment: u32,
|
||||
|
||||
@@ -2,18 +2,19 @@
|
||||
//! stage's `RuntimeFact::FragmentImageblock`.
|
||||
//!
|
||||
//! The fragment function reads and writes the pass's imageblock storage, one plane of cells per
|
||||
//! pixel (`ImageblockMechanism::StorageImageInterlock`), and writes it inside its body. Link
|
||||
//! refuses, as not implemented, the pipelines whose Metal imageblock that plane does not model
|
||||
//! exactly:
|
||||
//! pixel, and per sample in a multisampled pass (`ImageblockMechanism::StorageImageInterlock`),
|
||||
//! and writes it inside its body. Its depth and stencil tests run before its write: its module
|
||||
//! declares early tests, or each draw's plan checks them (`RuntimeFact::TestedStorageWrites`,
|
||||
//! `lower::fragment::imageblock`). Link refuses:
|
||||
//!
|
||||
//! - a multisampled pipeline (`rasterSampleCount` above 1): Metal's imageblock is per sample
|
||||
//! there;
|
||||
//! - a pipeline whose fixed function can drop a fragment after the function wrote its imageblock:
|
||||
//! alpha to coverage, or a depth or stencil attachment when the function does not declare
|
||||
//! `[[early_fragment_tests]]`. The storage already holds the write, and whether Metal keeps an
|
||||
//! imageblock write of a fragment its tests or coverage drop is not read yet.
|
||||
//! - a function compiled for another sample count than the pipeline's (`NeedsInput(Multisampled)`):
|
||||
//! one compiled for a multisampled pipeline reaches its own sample's cell, one compiled for one
|
||||
//! sample the pixel's;
|
||||
//! - as not implemented, a pipeline whose alpha to coverage can drop a fragment after the function
|
||||
//! wrote its imageblock: Metal drops the write with the fragment (measured on the M3 Max, at one
|
||||
//! sample and at four), and the storage already holds it.
|
||||
|
||||
use crate::error::{Error, Feature, Unsupported};
|
||||
use crate::error::{Error, Feature, RuntimeInput, Unsupported};
|
||||
use crate::library::FunctionArtifact;
|
||||
use crate::pipeline::facts::RuntimeFact;
|
||||
use crate::pipeline::graphics::{FragmentImageblock, ImageblockMechanism};
|
||||
@@ -25,24 +26,27 @@ pub fn fragment_imageblock(
|
||||
r: &RenderLinkInputs,
|
||||
fragment: Option<&FunctionArtifact>,
|
||||
) -> Result<Option<FragmentImageblock>, Error> {
|
||||
let Some((words, writes, early_tests, master, data_size, alignment)) = fragment.and_then(|f| {
|
||||
f.facts.iter().find_map(|fact| match *fact {
|
||||
let Some(fragment) = fragment else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some((words, writes, master, data_size, alignment)) =
|
||||
fragment.facts.iter().find_map(|fact| match *fact {
|
||||
RuntimeFact::FragmentImageblock {
|
||||
words,
|
||||
writes,
|
||||
early_tests,
|
||||
master,
|
||||
data_size,
|
||||
alignment,
|
||||
} => Some((words, writes, early_tests, master, data_size, alignment)),
|
||||
} => Some((words, writes, master, data_size, alignment)),
|
||||
_ => None,
|
||||
})
|
||||
}) else {
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
let tested = r.depth_format.is_some() || r.stencil_format.is_some();
|
||||
let dropped_after_write = writes && (r.alpha_to_coverage || (tested && !early_tests));
|
||||
if r.raster_sample_count > 1 || dropped_after_write {
|
||||
if fragment.interface.io.multisampled != (r.raster_sample_count > 1) {
|
||||
return Err(Error::NeedsInput(RuntimeInput::Multisampled));
|
||||
}
|
||||
if writes && r.alpha_to_coverage {
|
||||
return Err(Unsupported::not_implemented(Feature::Imageblocks).into());
|
||||
}
|
||||
Ok(Some(FragmentImageblock {
|
||||
|
||||
@@ -1562,6 +1562,7 @@ fn mode_contract(m: ExecMode) -> (u8, Option<u8>, &'static [ExecModel]) {
|
||||
ExecMode::OutputLines | ExecMode::OutputTriangles => (18, None, MESH),
|
||||
ExecMode::OutputLineStrip | ExecMode::OutputTriangleStrip => (18, None, GEOMETRY),
|
||||
ExecMode::RequireFullQuads => (19, None, FRAG),
|
||||
ExecMode::PostDepthCoverage => (21, None, FRAG),
|
||||
ExecMode::Invocations { .. } => (20, None, GEOMETRY),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1311,6 +1311,9 @@ pub enum ExecMode {
|
||||
/// `RequireFullQuadsKHR` (`SPV_KHR_quad_control`, fragment only): every quad starts with its
|
||||
/// four invocations, helpers included, and they take part in every group operation.
|
||||
RequireFullQuads,
|
||||
/// `PostDepthCoverage` (`SPV_KHR_post_depth_coverage`, fragment only): `SampleMask` reads the
|
||||
/// coverage after the early depth and stencil tests.
|
||||
PostDepthCoverage,
|
||||
// ---- Tessellation ----
|
||||
/// The triangle patch domain.
|
||||
Triangles,
|
||||
|
||||
@@ -907,6 +907,11 @@ impl Deriver<'_> {
|
||||
self.ext(SpirvExtension::KhrQuadControl);
|
||||
self.feat(VkFeature::ShaderQuadControl);
|
||||
}
|
||||
ExecMode::PostDepthCoverage => {
|
||||
self.cap(Cap::SampleMaskPostDepthCoverage);
|
||||
self.ext(SpirvExtension::KhrPostDepthCoverage);
|
||||
self.r.extensions.insert(VkExtension::ExtPostDepthCoverage);
|
||||
}
|
||||
// A task or mesh entry's local size is bounded by the mesh shader limits, which no
|
||||
// profile records yet: the stage's feature, which none enables, refuses it first.
|
||||
ExecMode::LocalSize { x, y, z } if self.model == ExecModel::GLCompute => {
|
||||
@@ -1518,6 +1523,7 @@ pub const ALL_SPIRV_EXTENSIONS: &[SpirvExtension] = &[
|
||||
SpirvExtension::KhrFma,
|
||||
SpirvExtension::ExtMeshShader,
|
||||
SpirvExtension::KhrQuadControl,
|
||||
SpirvExtension::KhrPostDepthCoverage,
|
||||
];
|
||||
|
||||
/// The `OpExtension` name of a SPIR-V extension.
|
||||
@@ -1549,5 +1555,6 @@ pub fn spirv_extension_name(e: SpirvExtension) -> &'static str {
|
||||
SpirvExtension::KhrFma => "SPV_KHR_fma",
|
||||
SpirvExtension::ExtMeshShader => "SPV_EXT_mesh_shader",
|
||||
SpirvExtension::KhrQuadControl => "SPV_KHR_quad_control",
|
||||
SpirvExtension::KhrPostDepthCoverage => "SPV_KHR_post_depth_coverage",
|
||||
}
|
||||
}
|
||||
@@ -1423,6 +1423,7 @@ impl Ser<'_> {
|
||||
ExecMode::SubgroupUniformControlFlow => plain(w, M::SubgroupUniformControlFlowKHR, &[]),
|
||||
ExecMode::MaximallyReconverges => plain(w, M::MaximallyReconvergesKHR, &[]),
|
||||
ExecMode::RequireFullQuads => plain(w, M::RequireFullQuadsKHR, &[]),
|
||||
ExecMode::PostDepthCoverage => plain(w, M::PostDepthCoverage, &[]),
|
||||
ExecMode::Triangles => plain(w, M::Triangles, &[]),
|
||||
ExecMode::Quads => plain(w, M::Quads, &[]),
|
||||
ExecMode::SpacingEqual => plain(w, M::SpacingEqual, &[]),
|
||||
|
||||
@@ -5729,6 +5729,7 @@ pub enum ExecutionMode {
|
||||
#[cfg(test)]
|
||||
ContractionOff = 31,
|
||||
SubgroupUniformControlFlowKHR = 4421,
|
||||
PostDepthCoverage = 4446,
|
||||
DenormPreserve = 4459,
|
||||
SignedZeroInfNanPreserve = 4461,
|
||||
RoundingModeRTE = 4462,
|
||||
|
||||
@@ -18,10 +18,17 @@
|
||||
//! layouts of its module name.
|
||||
//! - A discarded fragment writes nothing: a demoted one is a helper, whose stores have no effect,
|
||||
//! and a predicated one skips the stores.
|
||||
//! - A function whose only effects are its outputs and its imageblock write declares early tests
|
||||
//! (a fragment its tests fail drops its write, Metal's answer); one that discards states
|
||||
//! `RuntimeFact::TestedStorageWrites`, whose draws' plans choose its variant.
|
||||
//! - Compiled for a multisampled pipeline, a function runs once per sample (`SampleId`) and reaches
|
||||
//! its sample's cell at layers `sample * words` on; on a driver that drops an early-tests
|
||||
//! shader's image writes at more than one sample, none declares early tests, and one whose Metal
|
||||
//! function does is refused as that defect.
|
||||
//! - A render pipeline's `GraphicsState::fragment_imageblock` records the storage and its master's
|
||||
//! fingerprint (equal for views of one master, different for another); link refuses a
|
||||
//! multisampled pipeline and a write the fixed function can drop after the function made it
|
||||
//! (alpha to coverage; a depth or stencil attachment without the early fragment tests).
|
||||
//! fingerprint (equal for views of one master, different for another); link refuses a write
|
||||
//! alpha to coverage can drop after the function made it, and links beside a depth or stencil
|
||||
//! attachment and at four samples.
|
||||
//! - The binder writes the storage to the fragment's synthetic binding and refuses a layered or
|
||||
//! amplified pass.
|
||||
//!
|
||||
@@ -69,14 +76,45 @@ fn views() -> Option<Vec<u8>> {
|
||||
assemble(&engine_dir().join("fragment_imageblock_views.ll"))
|
||||
}
|
||||
|
||||
/// One fragment function's imageblock: whether it writes it, whether it runs after the early
|
||||
/// fragment tests, its cell's words and bytes, its views' alignment, and the cell words it
|
||||
/// reads and writes (the layers of its image reads and writes; a write of part of a word reads
|
||||
/// that word first).
|
||||
/// How the depth and stencil tests bear on a function's imageblock write.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum Tests {
|
||||
/// It writes none.
|
||||
None,
|
||||
/// The module declares early fragment tests.
|
||||
Early,
|
||||
/// It writes before Vulkan's tests and states `RuntimeFact::TestedStorageWrites`.
|
||||
Tested { early_variant: bool },
|
||||
}
|
||||
|
||||
/// The tests of compiled function `a` whose typed module is `m`.
|
||||
fn tests(a: &crate::library::FunctionArtifact, m: &TypedModule) -> Tests {
|
||||
let tested = a.facts.iter().find_map(|f| match *f {
|
||||
RuntimeFact::TestedStorageWrites {
|
||||
early_tests: false,
|
||||
early_variant,
|
||||
} => Some(early_variant),
|
||||
_ => None,
|
||||
});
|
||||
match (
|
||||
m.entry().modes.contains(&ExecMode::EarlyFragmentTests),
|
||||
tested,
|
||||
) {
|
||||
(true, None) => Tests::Early,
|
||||
(false, Some(early_variant)) => Tests::Tested { early_variant },
|
||||
(false, None) => Tests::None,
|
||||
(true, Some(_)) => panic!("early tests beside a tested write"),
|
||||
}
|
||||
}
|
||||
|
||||
/// One fragment function's imageblock: whether it writes it, how the tests bear on the write at
|
||||
/// one sample, its cell's words and bytes, its views' alignment, and the cell words it reads and
|
||||
/// writes (the layers of its image reads and writes; a write of part of a word reads that word
|
||||
/// first).
|
||||
struct Expect {
|
||||
entry: &'static str,
|
||||
writes: bool,
|
||||
early_tests: bool,
|
||||
tests: Tests,
|
||||
words: u32,
|
||||
data_size: u32,
|
||||
alignment: u32,
|
||||
@@ -93,7 +131,7 @@ const VIEWS: [Expect; 4] = [
|
||||
Expect {
|
||||
entry: "imageblock_transition",
|
||||
writes: true,
|
||||
early_tests: false,
|
||||
tests: Tests::Early,
|
||||
words: 4,
|
||||
data_size: 16,
|
||||
alignment: 4,
|
||||
@@ -103,7 +141,7 @@ const VIEWS: [Expect; 4] = [
|
||||
Expect {
|
||||
entry: "imageblock_accumulate",
|
||||
writes: true,
|
||||
early_tests: true,
|
||||
tests: Tests::Early,
|
||||
words: 4,
|
||||
data_size: 16,
|
||||
alignment: 8,
|
||||
@@ -113,7 +151,9 @@ const VIEWS: [Expect; 4] = [
|
||||
Expect {
|
||||
entry: "imageblock_clear_odd",
|
||||
writes: true,
|
||||
early_tests: false,
|
||||
tests: Tests::Tested {
|
||||
early_variant: true,
|
||||
},
|
||||
words: 4,
|
||||
data_size: 16,
|
||||
alignment: 8,
|
||||
@@ -123,7 +163,7 @@ const VIEWS: [Expect; 4] = [
|
||||
Expect {
|
||||
entry: "imageblock_resolve",
|
||||
writes: false,
|
||||
early_tests: false,
|
||||
tests: Tests::None,
|
||||
words: 4,
|
||||
data_size: 16,
|
||||
alignment: 8,
|
||||
@@ -157,18 +197,16 @@ fn moltenvk_without(features: &[VkFeature]) -> DeviceProfile {
|
||||
}
|
||||
|
||||
/// The `FragmentImageblock` fact of an artifact's facts: its words, whether the function writes
|
||||
/// the imageblock, whether it declares `[[early_fragment_tests]]`, its cell's bytes, and its
|
||||
/// views' alignment.
|
||||
fn fact(facts: &[RuntimeFact]) -> Option<(u32, bool, bool, u32, u32)> {
|
||||
/// the imageblock, its cell's bytes, and its views' alignment.
|
||||
fn fact(facts: &[RuntimeFact]) -> Option<(u32, bool, u32, u32)> {
|
||||
facts.iter().find_map(|f| match *f {
|
||||
RuntimeFact::FragmentImageblock {
|
||||
words,
|
||||
writes,
|
||||
early_tests,
|
||||
data_size,
|
||||
alignment,
|
||||
..
|
||||
} => Some((words, writes, early_tests, data_size, alignment)),
|
||||
} => Some((words, writes, data_size, alignment)),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
@@ -282,9 +320,10 @@ fn each_view_reaches_its_master_words_inside_the_interlock() {
|
||||
let a = compile(&bc, e.entry, &p).unwrap_or_else(|e| panic!("{what}: {e}"));
|
||||
assert_eq!(
|
||||
fact(&a.facts),
|
||||
Some((e.words, e.writes, e.early_tests, e.data_size, e.alignment)),
|
||||
Some((e.words, e.writes, e.data_size, e.alignment)),
|
||||
"{what}"
|
||||
);
|
||||
assert_eq!(tests(&a, &m), e.tests, "{what}");
|
||||
let (_, words) = link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: {e}"));
|
||||
if stem == "moltenvk-m3" {
|
||||
let (reads, writes) = cell_words(&spirv_dis(&words));
|
||||
@@ -354,7 +393,14 @@ fn a_write_beside_a_sample_mask_is_kept_where_the_mask_covers_the_sample() {
|
||||
};
|
||||
assert!(writing.iter().all(guarded), "{writing:?}");
|
||||
let a = compile(&bc, entry, &p).expect("compile");
|
||||
assert_eq!(fact(&a.facts), Some((4, true, false, 16, 8)));
|
||||
assert_eq!(fact(&a.facts), Some((4, true, 16, 8)));
|
||||
// A returned mask keeps the write from early tests.
|
||||
assert_eq!(
|
||||
tests(&a, &m),
|
||||
Tests::Tested {
|
||||
early_variant: false
|
||||
}
|
||||
);
|
||||
link_and_validate(&a, &p).expect("L3");
|
||||
let dev = device("moltenvk-m3");
|
||||
dev.compile_render_pipeline(&render(&bc, entry), &Budget::standard())
|
||||
@@ -403,7 +449,7 @@ fn views_of_two_masters_reach_each_masters_bytes() {
|
||||
let output: Vec<u32> = output.members.iter().map(|m| m.offset).collect();
|
||||
assert_eq!((input, output), (vec![0], vec![2]));
|
||||
let a = compile(&bc, entry, &p).expect("compile");
|
||||
assert_eq!(fact(&a.facts), Some((4, true, false, 16, 4)));
|
||||
assert_eq!(fact(&a.facts), Some((4, true, 16, 4)));
|
||||
let (_, words) = link_and_validate(&a, &p).expect("L3");
|
||||
let (reads, writes) = cell_words(&spirv_dis(&words));
|
||||
assert_eq!((reads, writes), ([0].into(), [0].into()));
|
||||
@@ -654,10 +700,9 @@ fn refused_not_implemented(r: Result<RenderPipeline, Error>, what: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Link records the pass's imageblock storage in the graphics state and refuses what the one plane
|
||||
/// does not model: a multisampled pipeline, and a write the fixed function can drop after the
|
||||
/// function made it (alpha to coverage; a depth or stencil attachment without the early tests). A
|
||||
/// function after the early tests, or one that only reads, links beside the attachment.
|
||||
/// Link records the pass's imageblock storage in the graphics state, links beside a depth or
|
||||
/// stencil attachment (the tests run before each write: early, or as each draw's plan chooses),
|
||||
/// and refuses a write alpha to coverage can drop after the function made it.
|
||||
#[test]
|
||||
fn link_records_the_imageblock_and_refuses_what_it_does_not_model() {
|
||||
let Some(bc) = views() else {
|
||||
@@ -684,12 +729,8 @@ fn link_records_the_imageblock_and_refuses_what_it_does_not_model() {
|
||||
] {
|
||||
let mut d = render(&bc, e.entry);
|
||||
(d.depth_format, d.stencil_format) = depth;
|
||||
let r = dev.compile_render_pipeline(&d, &budget);
|
||||
if e.writes && !e.early_tests {
|
||||
refused_not_implemented(r, &format!("{} with {depth:?}", e.entry));
|
||||
} else {
|
||||
r.unwrap_or_else(|err| panic!("{} with {depth:?}: {err}", e.entry));
|
||||
}
|
||||
dev.compile_render_pipeline(&d, &budget)
|
||||
.unwrap_or_else(|err| panic!("{} with {depth:?}: {err}", e.entry));
|
||||
}
|
||||
let mut d = render(&bc, e.entry);
|
||||
d.alpha_to_coverage = true;
|
||||
@@ -699,12 +740,6 @@ fn link_records_the_imageblock_and_refuses_what_it_does_not_model() {
|
||||
} else {
|
||||
r.unwrap_or_else(|err| panic!("{} alpha to coverage: {err}", e.entry));
|
||||
}
|
||||
let mut d = render(&bc, e.entry);
|
||||
d.raster_sample_count = 4;
|
||||
refused_not_implemented(
|
||||
dev.compile_render_pipeline(&d, &budget),
|
||||
&format!("{} multisampled", e.entry),
|
||||
);
|
||||
}
|
||||
// The `Cell` functions view one layout (no master); `imageblock_transition` views `Master`.
|
||||
let cell = masters["imageblock_accumulate"];
|
||||
@@ -778,3 +813,90 @@ fn the_binder_writes_the_storage_and_refuses_layered_passes() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// At four samples each function runs once per sample (`SampleId`) and reaches its sample's cell,
|
||||
/// layers `sample * words + w`; the pipeline links, and the graphics state records the storage. On
|
||||
/// a device without the early-tests defect a function whose only effects are its outputs and its
|
||||
/// write declares early tests as at one sample. On the M3 Max's MoltenVK, which drops every image
|
||||
/// write of an early-tests shader at more than one sample, none declares them, a function whose
|
||||
/// Metal form declares them (`imageblock_accumulate`) included: such a function states
|
||||
/// `TestedStorageWrites` without the early-tests variant, so a draw whose depth test acts runs the
|
||||
/// variant that tests depth in the shader, before the write.
|
||||
#[test]
|
||||
fn a_multisampled_pipeline_reaches_each_sample_s_cell() {
|
||||
use crate::bind::FragmentTests;
|
||||
use crate::device::DriverWorkaround;
|
||||
let Some(bc) = views() else {
|
||||
return;
|
||||
};
|
||||
let budget = Budget::standard();
|
||||
let defect = DriverWorkaround::EarlyTestsDropMultisampledImageWrites;
|
||||
for stem in ["moltenvk-m3", "amd-780m-radv"] {
|
||||
let dev = device(stem);
|
||||
let drops = dev.profile().fields().workarounds.contains(&defect);
|
||||
assert_eq!(drops, stem == "moltenvk-m3", "{stem}");
|
||||
for e in &VIEWS {
|
||||
let what = format!("{} on {stem}", e.entry);
|
||||
let mut d = render(&bc, e.entry);
|
||||
d.raster_sample_count = 4;
|
||||
d.depth_format = Some(PixelFormat::Depth32Float);
|
||||
let p = dev
|
||||
.compile_render_pipeline(&d, &budget)
|
||||
.unwrap_or_else(|err| panic!("{what}: {err}"));
|
||||
let fi = p.graphics.fragment_imageblock.expect("imageblock");
|
||||
assert_eq!(fi.words, e.words, "{what}");
|
||||
let fragment = (p.stages.iter())
|
||||
.find(|s| s.stage == vk::ShaderStage::FRAGMENT)
|
||||
.expect("a fragment stage");
|
||||
let dis = spirv_dis(&fragment.spirv);
|
||||
assert!(dis.contains("BuiltIn SampleId"), "{what}");
|
||||
assert!(dis.contains("OpIMul"), "{what}");
|
||||
let early = dis.contains("EarlyFragmentTests");
|
||||
let tested = p.dependencies.iter().find_map(|x| match x.fact {
|
||||
RuntimeFact::TestedStorageWrites {
|
||||
early_tests: false,
|
||||
early_variant,
|
||||
} => Some(early_variant),
|
||||
_ => None,
|
||||
});
|
||||
let want = match (e.tests, drops) {
|
||||
(Tests::Early, true) => Tests::Tested {
|
||||
early_variant: false,
|
||||
},
|
||||
(Tests::Tested { .. }, true) => Tests::Tested {
|
||||
early_variant: false,
|
||||
},
|
||||
(t, _) => t,
|
||||
};
|
||||
let got = match (early, tested) {
|
||||
(true, None) => Tests::Early,
|
||||
(false, Some(early_variant)) => Tests::Tested { early_variant },
|
||||
(false, None) => Tests::None,
|
||||
(true, Some(_)) => panic!("{what}: early tests beside a tested write"),
|
||||
};
|
||||
assert_eq!(got, want, "{what}");
|
||||
// A draw whose depth test acts runs the in-shader test before the write.
|
||||
if let Tests::Tested { .. } = got {
|
||||
let shape = BindState {
|
||||
fragment_tests: FragmentTests::Depth { writes: true },
|
||||
..Default::default()
|
||||
}
|
||||
.shape();
|
||||
let plan = p
|
||||
.plan(&dev, &shape)
|
||||
.unwrap_or_else(|err| panic!("{what}: {err}"));
|
||||
assert!(plan.variant.shader_tests, "{what}");
|
||||
let variant = dev
|
||||
.compile_render_variant(&d, &plan.variant, &budget)
|
||||
.unwrap_or_else(|err| panic!("{what}: the variant: {err}"));
|
||||
assert!(
|
||||
variant
|
||||
.dependencies
|
||||
.iter()
|
||||
.any(|x| matches!(x.fact, RuntimeFact::ShaderTests { .. })),
|
||||
"{what}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1010,6 +1010,12 @@ fn a_tile_pipeline_binds_its_attachments() {
|
||||
[32, 4],
|
||||
[16, 32],
|
||||
[32, 16],
|
||||
[16, 2],
|
||||
[32, 2],
|
||||
[6, 6],
|
||||
[24, 24],
|
||||
[30, 2],
|
||||
[2, 14],
|
||||
] {
|
||||
match plan.dispatch_variant(&tiles([w, h, 1])) {
|
||||
Ok(_) => {}
|
||||
@@ -1022,16 +1028,15 @@ fn a_tile_pipeline_binds_its_attachments() {
|
||||
Err(e) => panic!("{stem} {w}x{h}: {e}"),
|
||||
}
|
||||
}
|
||||
// Metal lays out these another way (a 16x2 threadgroup's one simdgroup, 1xN's thread
|
||||
// indices), or their layout is not measured.
|
||||
// A threadgroup with an odd side leaves the lanes of its missing threads empty, which
|
||||
// is not built, and a tile threadgroup is one deep.
|
||||
for refused in [
|
||||
tiles([16, 2, 1]),
|
||||
tiles([32, 2, 1]),
|
||||
tiles([16, 1, 1]),
|
||||
tiles([8, 1, 1]),
|
||||
tiles([1, 8, 1]),
|
||||
tiles([6, 6, 1]),
|
||||
tiles([24, 24, 1]),
|
||||
tiles([3, 3, 1]),
|
||||
tiles([5, 2, 1]),
|
||||
tiles([2, 31, 1]),
|
||||
tiles([8, 8, 2]),
|
||||
tiles([64, 16, 1]),
|
||||
Dispatch::Threads {
|
||||
@@ -1270,37 +1275,56 @@ fn the_authored_tile_fixtures_compile() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Metal's tile-dispatch layout of a `w x h` threadgroup (measured on Apple silicon by
|
||||
/// `k10ts_tile_order`'s cases for squares to 16; on an M4 for every shape below):
|
||||
/// the position of `thread_index_in_threadgroup` `index` (the threadgroup's 2x2 quads in rows of `w
|
||||
/// / 2`, each quad's threads in rows), and the simdgroup and lane of the thread at a position. The
|
||||
/// threadgroup is columns `min(w, 16)` wide, each holding its share of the simdgroups in order, and
|
||||
/// a column's simdgroups are `b x 32 / b` blocks of it in rows, `b = min(w, 8)`, each lane a thread
|
||||
/// of the block's quads in rows.
|
||||
/// Metal's quad order of a tile threadgroup of `qw` by `qh` 2x2 quads (measured on an Apple M3 Max
|
||||
/// for every threadgroup of 1 to 32 threads a side): columns 8 quads wide, within a column its rows
|
||||
/// of 2 quads, within a row its blocks 4 quads wide, within a block its quads row-major.
|
||||
fn metal_quad_order(qw: u32, qh: u32) -> Vec<[u32; 2]> {
|
||||
let mut order = Vec::new();
|
||||
for c0 in (0..qw).step_by(8) {
|
||||
let c1 = (c0 + 8).min(qw);
|
||||
for r0 in (0..qh).step_by(2) {
|
||||
let r1 = (r0 + 2).min(qh);
|
||||
for b0 in (c0..c1).step_by(4) {
|
||||
let b1 = (b0 + 4).min(c1);
|
||||
for qy in r0..r1 {
|
||||
for qx in b0..b1 {
|
||||
order.push([qx, qy]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
order
|
||||
}
|
||||
|
||||
/// Metal's tile-dispatch layout of a `w x h` threadgroup of even sides (or the single thread):
|
||||
/// the position of `thread_index_in_threadgroup` `index` (the threadgroup's 2x2 quads in rows of
|
||||
/// `w / 2`, each quad's threads in rows).
|
||||
fn metal_tile_position(index: u32, [w, _]: [u32; 2]) -> [u32; 2] {
|
||||
let (quad, within) = (index / 4, index % 4);
|
||||
let quads = (w / 2).max(1);
|
||||
let quads = w.div_ceil(2);
|
||||
[
|
||||
(quad % quads) * 2 + within % 2,
|
||||
(quad / quads) * 2 + within / 2,
|
||||
]
|
||||
}
|
||||
|
||||
/// The simdgroup and lane Metal gives the thread at `pos` of a `w x h` threadgroup: its quad's
|
||||
/// place `k` in [`metal_quad_order`] is lanes `4 (k mod 8)` to `4 (k mod 8) + 3` of simdgroup
|
||||
/// `k / 8`, its place in the quad (row-major) the lane among them.
|
||||
fn metal_tile_simd(pos: [u32; 2], [w, h]: [u32; 2]) -> (u32, u32) {
|
||||
let column = w.min(16);
|
||||
let b = w.min(8);
|
||||
let height = 32 / b;
|
||||
let per_column = (column * h / 32).max(1);
|
||||
let x = pos[0] % column;
|
||||
let sg = (pos[0] / column) * per_column + (pos[1] / height) * (column / b) + x / b;
|
||||
let (lx, ly) = (x % b, pos[1] % height);
|
||||
let lane = ((ly / 2) * (b / 2).max(1) + lx / 2) * 4 + (ly % 2) * 2 + lx % 2;
|
||||
(sg, lane)
|
||||
let quad = [pos[0] / 2, pos[1] / 2];
|
||||
let k = metal_quad_order(w.div_ceil(2), h.div_ceil(2))
|
||||
.iter()
|
||||
.position(|&q| q == quad)
|
||||
.expect("a quad of the threadgroup") as u32;
|
||||
(k / 8, (k % 8) * 4 + (pos[1] % 2) * 2 + pos[0] % 2)
|
||||
}
|
||||
|
||||
/// A tile function's threads take Metal's tile-dispatch layout for every measured threadgroup the
|
||||
/// binder runs (squares of 1 to 32 threads a side, in a 16x16 or 32x32 tile, and rectangles to
|
||||
/// 32x32): each thread records, at its `thread_index_in_threadgroup`, the position, lane, and
|
||||
/// A tile function's threads take Metal's tile-dispatch layout for the threadgroups the binder runs
|
||||
/// (squares of 1 to 32 threads a side, in a 16x16 or 32x32 tile, and rectangles of even sides to
|
||||
/// 32x32, among them the shapes whose simdgroups span a whole row of quads or a column's partial
|
||||
/// rows and blocks): each thread records, at its `thread_index_in_threadgroup`, the position, lane, and
|
||||
/// simdgroup Metal gives that index and the position of its simdgroup's first lane
|
||||
/// (`simd_broadcast_first`), and adds one to its own cell. Runs on the `Direct` tier at 32 lanes
|
||||
/// and on every committed profile whose simdgroups are emulated.
|
||||
@@ -1337,6 +1361,14 @@ fn every_tile_thread_takes_its_measured_place() {
|
||||
(16, [8, 2]),
|
||||
(16, [4, 2]),
|
||||
(16, [16, 4]),
|
||||
(32, [16, 2]),
|
||||
(32, [32, 2]),
|
||||
(16, [6, 6]),
|
||||
(16, [10, 10]),
|
||||
(32, [24, 8]),
|
||||
(32, [2, 18]),
|
||||
(32, [32, 6]),
|
||||
(16, [14, 4]),
|
||||
] {
|
||||
let n = w * h;
|
||||
let f0: Vec<u32> = (0..tile * tile).map(|i| (i as f32).to_bits()).collect();
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
source_filename = "-"
|
||||
; datalayout DataLayout { endian: Little, pointers: {0: PointerSpec { size_bits: 64, abi_bits: 64, pref_bits: 64, index_bits: 64 }}, ints: {1: AlignSpec { abi_bits: 8, pref_bits: 8 }, 8: AlignSpec { abi_bits: 8, pref_bits: 8 }, 16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }}, floats: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }}, vectors: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 24: AlignSpec { abi_bits: 32, pref_bits: 32 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 48: AlignSpec { abi_bits: 64, pref_bits: 64 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 96: AlignSpec { abi_bits: 128, pref_bits: 128 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }, 192: AlignSpec { abi_bits: 256, pref_bits: 256 }, 256: AlignSpec { abi_bits: 256, pref_bits: 256 }, 512: AlignSpec { abi_bits: 512, pref_bits: 512 }, 1024: AlignSpec { abi_bits: 1024, pref_bits: 1024 }}, aggregate: AlignSpec { abi_bits: 0, pref_bits: 64 }, native_ints: [8, 16, 32], stack_align_bits: None, alloca_space: 0, program_space: 0, globals_space: 0, mangling: None, fn_ptr_align: None, non_integral: [] }
|
||||
%t3 = type <{ <4 x float> }>
|
||||
%t6 = type %t3 (i32, ptr addrspace(2), ptr addrspace(2))
|
||||
%t7 = type { float } ; "struct.IbsCell"
|
||||
%t8 = type <{ %t7 }>
|
||||
%t9 = type %t8 (ptr addrspace(2))
|
||||
%t10 = type %t8 (%t7, ptr addrspace(2))
|
||||
%t11 = type %t8 (%t7, ptr addrspace(2), <4 x float>)
|
||||
%t12 = type i32 (float)
|
||||
%t13 = type <{ %t7, i32 }>
|
||||
%t14 = type %t13 (ptr addrspace(2))
|
||||
%t15 = type <4 x float> (%t7)
|
||||
%t16 = type <4 x float> ()
|
||||
%t18 = type void ()
|
||||
%t20 = type [2 x i32]
|
||||
c13 = %t20 [27, 0]
|
||||
c24 = <4 x i32> [0, 1, poison, poison]
|
||||
c35 = <4 x float> [poison, 0x0, 0x0, 0x3F800000]
|
||||
c36 = <4 x float> [0x3F800000, 0x0, 0x0, 0x3F800000]
|
||||
|
||||
define %t6 @f0 "ibs_vertex" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a1( Ref nocapture "air-buffer-no-alias"="" ) %a2( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = zext %a0 to i64
|
||||
%i1 = getelementptr inbounds <2 x float>, %a1, %i0
|
||||
%i2 = load <2 x float>, %i1, align 8
|
||||
%i3 = shufflevector <4 x float> %i2, <2 x float> poison, <0, 1, poison, poison>
|
||||
%i4 = load float, %a2, align 4
|
||||
%i5 = insertelement %i3, float 0x3F800000, i64 3
|
||||
%i6 = insertelement %i5, %i4, i64 2
|
||||
%i7 = insertvalue %t3 undef %i6, 0
|
||||
ret %i7
|
||||
}
|
||||
|
||||
define %t9 @f1 "ibs_write" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a0( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = load float, %a0, align 4
|
||||
%i1 = insertvalue %t7 poison %i0, 0
|
||||
%i2 = insertvalue %t8 undef %i1, 0
|
||||
ret %i2
|
||||
}
|
||||
|
||||
define %t9 @f2 "ibs_write_early" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a0( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = load float, %a0, align 4
|
||||
%i1 = insertvalue %t7 poison %i0, 0
|
||||
%i2 = insertvalue %t8 undef %i1, 0
|
||||
ret %i2
|
||||
}
|
||||
|
||||
define %t10 @f3 "ibs_add" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a1( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = extractvalue float %a0, 0
|
||||
%i1 = load float, %a1, align 4
|
||||
%i2 = fadd reassoc nnan ninf nsz arcp contract afn float %i1, %i0
|
||||
%i3 = insertvalue %t7 poison %i2, 0
|
||||
%i4 = insertvalue %t8 undef %i3, 0
|
||||
ret %i4
|
||||
}
|
||||
|
||||
define %t11 @f4 "ibs_add_discard" "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a1( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = extractelement %a2, i64 0
|
||||
%i1 = tail call i32 @f5 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None })](%i0)
|
||||
%i2 = icmp eq %i1, i32 7
|
||||
br %i2, bb1, bb2
|
||||
bb1:
|
||||
tail call void @f9 [air Fragment(Discard)]()
|
||||
br bb2
|
||||
bb2:
|
||||
%i6 = extractvalue float %a0, 0
|
||||
%i7 = load float, %a1, align 4
|
||||
%i8 = fadd reassoc nnan ninf nsz arcp contract afn float %i7, %i6
|
||||
%i9 = insertvalue %t7 poison %i8, 0
|
||||
%i10 = insertvalue %t8 undef %i9, 0
|
||||
ret %i10
|
||||
}
|
||||
|
||||
declare %t12 @f5 "air.convert.u.i32.f.f32" memory(NoModRef, NoModRef, NoModRef)
|
||||
|
||||
define %t14 @f6 "ibs_write_masked" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a0( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = load float, %a0, align 4
|
||||
%i1 = insertvalue %t7 poison %i0, 0
|
||||
%i2 = insertvalue %t13 undef %i1, 0
|
||||
%i3 = insertvalue %i2 i32 5, 1
|
||||
ret %i3
|
||||
}
|
||||
|
||||
define %t15 @f7 "ibs_read" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" {
|
||||
bb0:
|
||||
%i0 = extractvalue float %a0, 0
|
||||
%i1 = insertelement <4 x float> c35, %i0, i64 0
|
||||
ret %i1
|
||||
}
|
||||
|
||||
define %t16 @f8 "ibs_plain" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" {
|
||||
bb0:
|
||||
ret <4 x float> c36
|
||||
}
|
||||
|
||||
declare %t18 @f9 "air.discard_fragment"
|
||||
!md0 = !"SDK Version"
|
||||
!md1 = !"wchar_size"
|
||||
!md2 = !"frame-pointer"
|
||||
!md3 = !"air.max_device_buffers"
|
||||
!md4 = !"air.max_constant_buffers"
|
||||
!md5 = !"air.max_threadgroup_buffers"
|
||||
!md6 = !"air.max_textures"
|
||||
!md7 = !"air.max_read_write_textures"
|
||||
!md8 = !"air.max_samplers"
|
||||
!md9 = !"air.position"
|
||||
!md10 = !"air.arg_type_name"
|
||||
!md11 = !"float4"
|
||||
!md12 = !"air.arg_name"
|
||||
!md13 = !"position"
|
||||
!md14 = !"air.vertex_id"
|
||||
!md15 = !"uint"
|
||||
!md16 = !"id"
|
||||
!md17 = !"air.buffer"
|
||||
!md18 = !"air.location_index"
|
||||
!md19 = !"air.read"
|
||||
!md20 = !"air.address_space"
|
||||
!md21 = !"air.arg_type_size"
|
||||
!md22 = !"air.arg_type_align_size"
|
||||
!md23 = !"float2"
|
||||
!md24 = !"corners"
|
||||
!md25 = !"air.buffer_size"
|
||||
!md26 = !"float"
|
||||
!md27 = !"depth"
|
||||
!md28 = !"air.imageblock_data"
|
||||
!md29 = !"air.imageblock_data_size"
|
||||
!md30 = !"air.struct_type_info"
|
||||
!md31 = !"v"
|
||||
!md32 = !"air.raster_order_group"
|
||||
!md33 = !"IbsCell"
|
||||
!md34 = !"cell"
|
||||
!md35 = !"value"
|
||||
!md36 = !"early_fragment_tests"
|
||||
!md37 = !"in"
|
||||
!md38 = !"air.center"
|
||||
!md39 = !"air.no_perspective"
|
||||
!md40 = !"air.sample_mask"
|
||||
!md41 = !"mask"
|
||||
!md42 = !"air.render_target"
|
||||
!md43 = !"air.compile.denorms_disable"
|
||||
!md44 = !"air.compile.fast_math_enable"
|
||||
!md45 = !"air.compile.framebuffer_fetch_enable"
|
||||
!md46 = !"Apple metal version 32023.921 (metalfe-32023.921.6)"
|
||||
!md47 = !"Metal"
|
||||
!md48 = !"omnipotent char"
|
||||
!md49 = !"Simple C++ TBAA"
|
||||
!md50 = !"air-alias-scope-arg(1)"
|
||||
!md51 = !"air-alias-scope-arg(0)"
|
||||
!md52 = i32 2
|
||||
!md53 = %t20 c13
|
||||
!md54 = i32 1
|
||||
!md55 = i32 4
|
||||
!md56 = i32 7
|
||||
!md57 = i32 31
|
||||
!md58 = i32 128
|
||||
!md59 = i32 8
|
||||
!md60 = i32 16
|
||||
!md61 = ptr addrspace(0) @f0
|
||||
!md62 = i32 0
|
||||
!md63 = ptr addrspace(0) @f1
|
||||
!md64 = ptr addrspace(0) @f2
|
||||
!md65 = ptr addrspace(0) @f3
|
||||
!md66 = ptr addrspace(0) @f4
|
||||
!md67 = ptr addrspace(0) @f6
|
||||
!md68 = ptr addrspace(0) @f7
|
||||
!md69 = ptr addrspace(0) @f8
|
||||
!md70 = i64 0
|
||||
!md71 = !{!md52, !md0, !md53}
|
||||
!md72 = !{!md54, !md1, !md55}
|
||||
!md73 = !{!md56, !md2, !md52}
|
||||
!md74 = !{!md56, !md3, !md57}
|
||||
!md75 = !{!md56, !md4, !md57}
|
||||
!md76 = !{!md56, !md5, !md57}
|
||||
!md77 = !{!md56, !md6, !md58}
|
||||
!md78 = !{!md56, !md7, !md59}
|
||||
!md79 = !{!md56, !md8, !md60}
|
||||
!md80 = !{!md9, !md10, !md11, !md12, !md13}
|
||||
!md81 = !{!md80}
|
||||
!md82 = !{!md62, !md14, !md10, !md15, !md12, !md16}
|
||||
!md83 = !{!md54, !md17, !md18, !md62, !md54, !md19, !md20, !md52, !md21, !md59, !md22, !md59, !md10, !md23, !md12, !md24}
|
||||
!md84 = !{!md52, !md17, !md25, !md55, !md18, !md54, !md54, !md19, !md20, !md52, !md21, !md55, !md22, !md55, !md10, !md26, !md12, !md27}
|
||||
!md85 = !{!md82, !md83, !md84}
|
||||
!md86 = !{!md61, !md81, !md85}
|
||||
!md87 = !{!md62, !md55, !md62, !md26, !md31, !md32, !md62}
|
||||
!md88 = !{!md28, !md29, !md55, !md30, !md87, !md22, !md55, !md10, !md33, !md12, !md34}
|
||||
!md89 = !{!md88}
|
||||
!md90 = !{!md62, !md17, !md25, !md55, !md18, !md62, !md54, !md19, !md20, !md52, !md21, !md55, !md22, !md55, !md10, !md26, !md12, !md35}
|
||||
!md91 = !{!md90}
|
||||
!md92 = !{!md63, !md89, !md91}
|
||||
!md93 = !{!md64, !md89, !md91, !md36}
|
||||
!md94 = !{!md62, !md28, !md29, !md55, !md30, !md87, !md22, !md55, !md10, !md33, !md12, !md37}
|
||||
!md95 = !{!md54, !md17, !md25, !md55, !md18, !md62, !md54, !md19, !md20, !md52, !md21, !md55, !md22, !md55, !md10, !md26, !md12, !md35}
|
||||
!md96 = !{!md94, !md95}
|
||||
!md97 = !{!md65, !md89, !md96}
|
||||
!md98 = !{!md52, !md9, !md38, !md39, !md10, !md11, !md12, !md13}
|
||||
!md99 = !{!md94, !md95, !md98}
|
||||
!md100 = !{!md66, !md89, !md99}
|
||||
!md101 = !{!md40, !md10, !md15, !md12, !md41}
|
||||
!md102 = !{!md88, !md101}
|
||||
!md103 = !{!md67, !md102, !md91}
|
||||
!md104 = !{!md42, !md62, !md62, !md10, !md11}
|
||||
!md105 = !{!md104}
|
||||
!md106 = !{!md94}
|
||||
!md107 = !{!md68, !md105, !md106}
|
||||
!md108 = !{}
|
||||
!md109 = !{!md69, !md105, !md108}
|
||||
!md110 = !{!md43}
|
||||
!md111 = !{!md44}
|
||||
!md112 = !{!md45}
|
||||
!md113 = !{!md46}
|
||||
!md114 = !{!md52, !md59, !md62}
|
||||
!md115 = !{!md47, !md55, !md62, !md62}
|
||||
!md116 = !{!md49}
|
||||
!md117 = !{!md48, !md116, !md70}
|
||||
!md118 = !{!md26, !md117, !md70}
|
||||
!md119 = !{!md118, !md118, !md70}
|
||||
!"llvm.module.flags" = !{!md71, !md72, !md73, !md74, !md75, !md76, !md77, !md78, !md79}
|
||||
!"air.vertex" = !{!md86}
|
||||
!"air.fragment" = !{!md92, !md93, !md97, !md100, !md103, !md107, !md109}
|
||||
!"air.compile_options" = !{!md110, !md111, !md112}
|
||||
!"llvm.ident" = !{!md113}
|
||||
!"air.version" = !{!md114}
|
||||
!"air.language_version" = !{!md115}
|
||||
@@ -0,0 +1,132 @@
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
source_filename = "-"
|
||||
; datalayout DataLayout { endian: Little, pointers: {0: PointerSpec { size_bits: 64, abi_bits: 64, pref_bits: 64, index_bits: 64 }}, ints: {1: AlignSpec { abi_bits: 8, pref_bits: 8 }, 8: AlignSpec { abi_bits: 8, pref_bits: 8 }, 16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }}, floats: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }}, vectors: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 24: AlignSpec { abi_bits: 32, pref_bits: 32 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 48: AlignSpec { abi_bits: 64, pref_bits: 64 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 96: AlignSpec { abi_bits: 128, pref_bits: 128 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }, 192: AlignSpec { abi_bits: 256, pref_bits: 256 }, 256: AlignSpec { abi_bits: 256, pref_bits: 256 }, 512: AlignSpec { abi_bits: 512, pref_bits: 512 }, 1024: AlignSpec { abi_bits: 1024, pref_bits: 1024 }}, aggregate: AlignSpec { abi_bits: 0, pref_bits: 64 }, native_ints: [8, 16, 32], stack_align_bits: None, alloca_space: 0, program_space: 0, globals_space: 0, mangling: None, fn_ptr_align: None, non_integral: [] }
|
||||
%t3 = type <{ <4 x float> }>
|
||||
%t6 = type %t3 (i32, ptr addrspace(2), ptr addrspace(2))
|
||||
%t7 = type <4 x float> (i32)
|
||||
%t8 = type float (i32)
|
||||
%t9 = type <4 x float> ()
|
||||
%t10 = type i32 (i32)
|
||||
%t12 = type [2 x i32]
|
||||
c8 = %t12 [27, 0]
|
||||
c19 = <4 x i32> [0, 1, poison, poison]
|
||||
c27 = <4 x float> [poison, 0x0, 0x0, 0x3F800000]
|
||||
c28 = <4 x float> [0x3F800000, 0x0, 0x0, 0x3F800000]
|
||||
|
||||
define %t6 @f0 "pdc_vertex" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a1( Ref nocapture "air-buffer-no-alias"="" ) %a2( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = zext %a0 to i64
|
||||
%i1 = getelementptr inbounds <2 x float>, %a1, %i0
|
||||
%i2 = load <2 x float>, %i1, align 8
|
||||
%i3 = shufflevector <4 x float> %i2, <2 x float> poison, <0, 1, poison, poison>
|
||||
%i4 = load float, %a2, align 4
|
||||
%i5 = insertelement %i3, float 0x3F800000, i64 3
|
||||
%i6 = insertelement %i5, %i4, i64 2
|
||||
%i7 = insertvalue %t3 undef %i6, 0
|
||||
ret %i7
|
||||
}
|
||||
|
||||
define %t7 @f1 "pdc_after" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" {
|
||||
bb0:
|
||||
%i0 = tail call i32 @f4 [air Math(Math { f: Popcount, precision: Precise, ty: NumTy { elem: I32, lanes: 1 } })](%a0)
|
||||
%i1 = tail call reassoc nnan ninf nsz arcp contract afn float @f2 [air Convert(Convert { dst: NumTy { elem: F32, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I32, lanes: 1 }, src_kind: Unsigned, src_fp8: None })](%i0)
|
||||
%i2 = fmul reassoc nnan ninf nsz arcp contract afn float %i1, float 0x3E800000
|
||||
%i3 = insertelement <4 x float> c27, %i2, i64 0
|
||||
ret %i3
|
||||
}
|
||||
|
||||
declare %t8 @f2 "air.convert.f.f32.u.i32" memory(NoModRef, NoModRef, NoModRef)
|
||||
|
||||
define %t9 @f3 "pdc_plain" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" {
|
||||
bb0:
|
||||
ret <4 x float> c28
|
||||
}
|
||||
|
||||
declare %t10 @f4 "air.popcount.i32" memory(NoModRef, NoModRef, NoModRef)
|
||||
!md0 = !"SDK Version"
|
||||
!md1 = !"wchar_size"
|
||||
!md2 = !"frame-pointer"
|
||||
!md3 = !"air.max_device_buffers"
|
||||
!md4 = !"air.max_constant_buffers"
|
||||
!md5 = !"air.max_threadgroup_buffers"
|
||||
!md6 = !"air.max_textures"
|
||||
!md7 = !"air.max_read_write_textures"
|
||||
!md8 = !"air.max_samplers"
|
||||
!md9 = !"air.position"
|
||||
!md10 = !"air.arg_type_name"
|
||||
!md11 = !"float4"
|
||||
!md12 = !"air.arg_name"
|
||||
!md13 = !"position"
|
||||
!md14 = !"air.vertex_id"
|
||||
!md15 = !"uint"
|
||||
!md16 = !"id"
|
||||
!md17 = !"air.buffer"
|
||||
!md18 = !"air.location_index"
|
||||
!md19 = !"air.read"
|
||||
!md20 = !"air.address_space"
|
||||
!md21 = !"air.arg_type_size"
|
||||
!md22 = !"air.arg_type_align_size"
|
||||
!md23 = !"float2"
|
||||
!md24 = !"corners"
|
||||
!md25 = !"air.buffer_size"
|
||||
!md26 = !"float"
|
||||
!md27 = !"depth"
|
||||
!md28 = !"air.render_target"
|
||||
!md29 = !"air.sample_mask_in"
|
||||
!md30 = !"air.post_depth_coverage"
|
||||
!md31 = !"mask"
|
||||
!md32 = !"early_fragment_tests"
|
||||
!md33 = !"air.compile.denorms_disable"
|
||||
!md34 = !"air.compile.fast_math_enable"
|
||||
!md35 = !"air.compile.framebuffer_fetch_enable"
|
||||
!md36 = !"Apple metal version 32023.921 (metalfe-32023.921.6)"
|
||||
!md37 = !"Metal"
|
||||
!md38 = i32 2
|
||||
!md39 = %t12 c8
|
||||
!md40 = i32 1
|
||||
!md41 = i32 4
|
||||
!md42 = i32 7
|
||||
!md43 = i32 31
|
||||
!md44 = i32 128
|
||||
!md45 = i32 8
|
||||
!md46 = i32 16
|
||||
!md47 = ptr addrspace(0) @f0
|
||||
!md48 = i32 0
|
||||
!md49 = ptr addrspace(0) @f1
|
||||
!md50 = ptr addrspace(0) @f3
|
||||
!md51 = !{!md38, !md0, !md39}
|
||||
!md52 = !{!md40, !md1, !md41}
|
||||
!md53 = !{!md42, !md2, !md38}
|
||||
!md54 = !{!md42, !md3, !md43}
|
||||
!md55 = !{!md42, !md4, !md43}
|
||||
!md56 = !{!md42, !md5, !md43}
|
||||
!md57 = !{!md42, !md6, !md44}
|
||||
!md58 = !{!md42, !md7, !md45}
|
||||
!md59 = !{!md42, !md8, !md46}
|
||||
!md60 = !{!md9, !md10, !md11, !md12, !md13}
|
||||
!md61 = !{!md60}
|
||||
!md62 = !{!md48, !md14, !md10, !md15, !md12, !md16}
|
||||
!md63 = !{!md40, !md17, !md18, !md48, !md40, !md19, !md20, !md38, !md21, !md45, !md22, !md45, !md10, !md23, !md12, !md24}
|
||||
!md64 = !{!md38, !md17, !md25, !md41, !md18, !md40, !md40, !md19, !md20, !md38, !md21, !md41, !md22, !md41, !md10, !md26, !md12, !md27}
|
||||
!md65 = !{!md62, !md63, !md64}
|
||||
!md66 = !{!md47, !md61, !md65}
|
||||
!md67 = !{!md28, !md48, !md48, !md10, !md11}
|
||||
!md68 = !{!md67}
|
||||
!md69 = !{!md48, !md29, !md30, !md10, !md15, !md12, !md31}
|
||||
!md70 = !{!md69}
|
||||
!md71 = !{!md49, !md68, !md70, !md32}
|
||||
!md72 = !{}
|
||||
!md73 = !{!md50, !md68, !md72, !md32}
|
||||
!md74 = !{!md33}
|
||||
!md75 = !{!md34}
|
||||
!md76 = !{!md35}
|
||||
!md77 = !{!md36}
|
||||
!md78 = !{!md38, !md45, !md48}
|
||||
!md79 = !{!md37, !md41, !md48, !md48}
|
||||
!"llvm.module.flags" = !{!md51, !md52, !md53, !md54, !md55, !md56, !md57, !md58, !md59}
|
||||
!"air.vertex" = !{!md66}
|
||||
!"air.fragment" = !{!md71, !md73}
|
||||
!"air.compile_options" = !{!md74, !md75, !md76}
|
||||
!"llvm.ident" = !{!md77}
|
||||
!"air.version" = !{!md78}
|
||||
!"air.language_version" = !{!md79}
|
||||
@@ -1185,6 +1185,22 @@ engine/hsw_storage_writes.ll hsw_buffer ok ok ok ok ok ok ok ok ok ok ok ok ok o
|
||||
engine/hsw_storage_writes.ll hsw_held ok ok ok ok ok ok ok ok ok ok ok Unsupported{ArgumentBufferTextures; AnyOf[[Feature(ShaderStorageImageArrayNonUniformIndexing)]]} ok ok ok ok ok Unsupported{ArgumentBufferTextures; AnyOf[[Feature(ShaderStorageImageWriteWithoutFormat)]]} ok Unsupported{ArgumentBufferTextures; AnyOf[[Feature(RuntimeDescriptorArray), Feature(DescriptorBindingPartiallyBound), Feature(ShaderStorageImageArrayNonUniformIndexing), Feature(DescriptorBindingStorageImageUpdateAfterBind), Feature(ShaderStorageImageWriteWithoutFormat)]]}
|
||||
engine/hwd_half_reads.air.ll hwd_half_reads ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorStorageBuffers, required: 5, available: 4 }]]}
|
||||
engine/hwd_half_reads.ll hwd_half_reads ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorStorageBuffers, required: 5, available: 4 }]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_vertex ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_write ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_write_early ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_add ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_add_discard ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_write_masked ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_read ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]}
|
||||
engine/ibs_sample_imageblocks.air.ll ibs_plain ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/ibs_sample_imageblocks.ll ibs_vertex ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/ibs_sample_imageblocks.ll ibs_write ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.ll ibs_write_early ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.ll ibs_add ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.ll ibs_add_discard ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.ll ibs_write_masked ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock), Feature(FragmentStoresAndAtomics)]]}
|
||||
engine/ibs_sample_imageblocks.ll ibs_read ok ok ok ok ok ok ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} ok ok ok ok ok Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]} Unsupported{Imageblocks; AnyOf[[Feature(FragmentShaderPixelInterlock)]]}
|
||||
engine/ibs_sample_imageblocks.ll ibs_plain ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/icb_copy_encode.air.ll icb_copy_encode ok ok ok ok ok ok ok ok ok ok ok Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(BufferDeviceAddress), Feature(ShaderInt64)]]} ok ok ok ok ok Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(ShaderInt64)]]} Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(ShaderInt64)]]} Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(BufferDeviceAddress), Feature(ShaderInt64)]]}
|
||||
engine/icb_copy_encode.ll icb_copy_encode ok ok ok ok ok ok ok ok ok ok ok Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(BufferDeviceAddress), Feature(ShaderInt64)]]} ok ok ok ok ok Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(ShaderInt64)]]} Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(ShaderInt64)]]} Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(BufferDeviceAddress), Feature(ShaderInt64)]]}
|
||||
engine/icb_imageblock_encode.air.ll icb_imageblock_encode ok ok ok ok ok ok ok ok ok ok ok Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(BufferDeviceAddress), Feature(ShaderInt64)]]} ok ok ok ok ok Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(ShaderInt64)]]} Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(ShaderInt64)]]} Unsupported{GpuEncodedIndirectCommands; AnyOf[[Feature(BufferDeviceAddress), Feature(ShaderInt64)]]}
|
||||
@@ -1577,6 +1593,12 @@ engine/ob3_texture_array.air.ll ob3_texture_array ok ok ok ok ok ok ok ok ok ok
|
||||
engine/ob3_texture_array.ll ob3_texture_array ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/ob3_vertex_input.air.ll ob3_vertex_input ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(VertexPipelineStoresAndAtomics)]]} ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(VertexPipelineStoresAndAtomics)]]}
|
||||
engine/ob3_vertex_input.ll ob3_vertex_input ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(VertexPipelineStoresAndAtomics)]]} ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(VertexPipelineStoresAndAtomics)]]}
|
||||
engine/pdc_post_depth_coverage.air.ll pdc_vertex ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/pdc_post_depth_coverage.air.ll pdc_after ok ok ok ok ok ok ok ok ok ok ok Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]} ok ok ok ok ok Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]} Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]} Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]}
|
||||
engine/pdc_post_depth_coverage.air.ll pdc_plain ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/pdc_post_depth_coverage.ll pdc_vertex ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/pdc_post_depth_coverage.ll pdc_after ok ok ok ok ok ok ok ok ok ok ok Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]} ok ok ok ok ok Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]} Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]} Unsupported{PostDepthCoverage; AnyOf[[Extension(ExtPostDepthCoverage)]]}
|
||||
engine/pdc_post_depth_coverage.ll pdc_plain ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/primitive_ids.air.ll pi_place ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/primitive_ids.air.ll pi_points ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/primitive_ids.air.ll pi_attrib ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
|
||||
|
Can't render this file because it is too large.
|
+6
-4
@@ -565,8 +565,9 @@ render pass's color attachment formats) into a `ComputePipeline` that stands in
|
||||
`dispatchThreadsPerTile:`. Dispatch it as `Dispatch::Threadgroups` over the render area, one
|
||||
threadgroup per tile, with `BindState::imageblock_size` and `BindState::render_area` set, and bind
|
||||
each attachment it reaches as a storage image where the plan writes `WriteSource::TileAttachment`.
|
||||
Its threads are numbered as Metal's tile dispatch numbers them, for the threadgroup layouts that
|
||||
were measured; others are refused. A tile function runs on a single-sample pass: a multisample
|
||||
Its threads are numbered as Metal's tile dispatch numbers them, for every threadgroup of even sides
|
||||
up to 32x32 and the single thread; a threadgroup with an odd side, whose quads Metal leaves partly
|
||||
empty, is refused. A tile function runs on a single-sample pass: a multisample
|
||||
imageblock's operations (its sample count, the colors a pixel holds and their coverage masks, a
|
||||
store to the samples a coverage mask selects) are refused as not implemented
|
||||
(`Feature::Imageblocks`, naming the intrinsic).
|
||||
@@ -1384,8 +1385,9 @@ fast forms record, and each `PrecisionNote`'s rustdoc states its bound.
|
||||
- `metal2vulkan-degrade-fragment-imageblock-storage` (performance). `FragmentImageblockStorage`: A
|
||||
render pass's draws' fragment functions declare an explicit imageblock, which they read and write
|
||||
in a storage image of the render area. Cost: an R32Uint array image per pass over the render area,
|
||||
a layer per 4 bytes of a pixel's imageblock, cleared before the pass, which the draws read and
|
||||
write in the pixel interlock: memory and bandwidth that Metal's tile memory does not spend.
|
||||
a layer per 4 bytes of a pixel's imageblock and per sample, cleared before the pass, which the
|
||||
draws read and write in the pixel interlock: memory and bandwidth that Metal's tile memory does
|
||||
not spend.
|
||||
- `metal2vulkan-degrade-wrapped-image-layout-transitions` (performance).
|
||||
`WrappedImageLayoutTransitions`: A command buffer uses a texture over the caller's image whose
|
||||
home layout is not `GENERAL`: every image the runtime uses rests in `GENERAL`. Cost: two
|
||||
|
||||
@@ -425,6 +425,16 @@ driver's. Each is open work.
|
||||
Xe, the UHD 770 and the RTX 5080 Laptop GPU, 128 KiB on the RTX 3090, 192 KiB on the M3 Max and
|
||||
M4 under MoltenVK, 48 KiB on lavapipe; 16 KiB elsewhere. An exact form for compute, private memory
|
||||
in a runtime buffer with a slot per resident threadgroup, is not built.
|
||||
- **A fragment function's imageblock write that its draw's tests may drop after it, where no
|
||||
form tests first.** Such a draw runs the tests before the write, early or in the shader against a
|
||||
depth stand-in. Refused as not implemented: a writing function under alpha to coverage; where
|
||||
the tests act, a draw under a visibility result mode, a depth format other than `Depth32Float`,
|
||||
a stencil attachment alone, and at more than one sample a stencil test on a device without
|
||||
multisampled storage images (MoltenVK) or a depth test where `FragCoord.z` is unmeasured (ANV);
|
||||
and on MoltenVK at more than one sample, whose early tests drop image writes
|
||||
(`DriverWorkaround::EarlyTestsDropMultisampledImageWrites`), a function declaring early tests
|
||||
that discards, returns depth, stencil or a sample mask, or writes other memory. A form testing
|
||||
at the function's entry against the stand-in is not built.
|
||||
- **A vertex function that selects its slice, on a device without `shaderOutputLayer` and
|
||||
`geometryShader`.** Metal renders each primitive into the slice its first vertex selects. Vulkan
|
||||
stores `Layer` from a vertex function only with `shaderOutputLayer`, and the generated geometry
|
||||
|
||||
+148
-144
@@ -14,15 +14,15 @@ Columns:
|
||||
- `none`: no public API path: malformed or non-Metal input, Apple-private calls, or a cap no valid program of ordinary size meets;
|
||||
- `?`: not assessed yet.
|
||||
|
||||
Generated at `871440aca`.
|
||||
Generated at `e11bd200b`.
|
||||
|
||||
## Totals
|
||||
|
||||
| Kind | Variants | With a site | Reach system | Reach app | Reach rare | Reach none | Unassessed |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| Translator and front-end refusals | 125 | 125 | 6 | 33 | 68 | 18 | 0 |
|
||||
| Runtime gaps | 69 | 69 | 1 | 8 | 42 | 18 | 0 |
|
||||
| Apple-only calls | 7 | 7 | 1 | 0 | 0 | 6 | 0 |
|
||||
| Translator and front-end refusals | 126 | 126 | 6 | 33 | 69 | 18 | 0 |
|
||||
| Runtime gaps | 68 | 68 | 1 | 8 | 41 | 18 | 0 |
|
||||
| Apple-only calls | 9 | 9 | 1 | 0 | 0 | 8 | 0 |
|
||||
| Binder refusals at a device limit | 9 | 9 | 0 | 1 | 7 | 1 | 0 |
|
||||
| Translation caps | 14 | 14 | 0 | 0 | 7 | 7 | 0 |
|
||||
| Rate maps the compile layer does not compile | 5 | 5 | 0 | 0 | 4 | 1 | 0 |
|
||||
@@ -46,14 +46,14 @@ Generated at `871440aca`.
|
||||
| `DynamicCall` | Indirect calls, function pointers, visible/intersection function tables (one variant) | every device (no Vulkan mechanism); every device (not implemented) | 9: `crates/metal2vulkan-air/src/canon/devirt.rs:1851`, `crates/metal2vulkan-air/src/canon/devirt.rs:447` (+7) | `rare`: function pointers and function tables |
|
||||
| `Linking` | Linkage signatures / stitching / dynamic libraries | every device (not implemented) | 3: `crates/metal2vulkan-air/src/canon/link.rs:249`, `crates/metal2vulkan-air/src/canon/mod.rs:1289` (+1) | `rare`: dynamic libraries and linked functions |
|
||||
| `SimdWidth` | Simdgroup width 32 is not achievable for this usage, stage, and device | devices without VkProperty::MetalFragmentSimdgroups; devices without a capability the site computes (`width_needs(stage, st)`) | 2: `crates/metal2vulkan/src/device/subgroup.rs:377`, `crates/metal2vulkan/src/lower/simd/mod.rs:382` | `app`: simdgroup functions on a device whose subgroups cannot run 32 wide for the use |
|
||||
| `LocalSize` | A local size beyond a device limit on this axis (`None` | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/bind/dispatch.rs:481` | `app`: a threadgroup size past a smaller device's limit |
|
||||
| `LocalSize` | A local size beyond a device limit on this axis (`None` | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/bind/dispatch.rs:475` | `app`: a threadgroup size past a smaller device's limit |
|
||||
| `IrreducibleConvergent` | An irreducible region containing a convergent instruction | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/structurize/irreducible.rs:108` | `rare`: irreducible loops around barriers or simd operations |
|
||||
| `ComputeDerivativesWithSimd` | Compute derivatives in a flattened simd tier | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/dispatch.rs:471` | `rare`: derivatives in a kernel |
|
||||
| `ComputeDerivativesWithSimd` | Compute derivatives in a flattened simd tier | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/dispatch.rs:472` | `rare`: derivatives in a kernel |
|
||||
| `ComputeDerivatives` | Derivatives outside fragment without compute-derivative support | devices without VkFeature::ComputeDerivativeGroupLinear; every device (no Vulkan mechanism); every device (not implemented) | 4: `crates/metal2vulkan/src/bind/dispatch.rs:320`, `crates/metal2vulkan/src/lower/sync/barrier.rs:486` (+2) | `rare`: derivatives in a kernel |
|
||||
| `QuadOperations` | Quad operations in a stage without quad support | devices without VkLimit::MinSubgroupSize; devices without VkProperty::SubgroupQuadOperationsInAllStages | 2: `crates/metal2vulkan/src/device/subgroup.rs:371`, `crates/metal2vulkan/src/device/subgroup.rs:405` | `app`: quad shuffles in kernels on devices without quad operations there |
|
||||
| `SimdgroupMatrix` | Simdgroup matrix operations | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/simd/matrix.rs:83` | `rare`: simdgroup matrix kernels |
|
||||
| `ArgumentBufferPointers` | Argument buffers holding buffer pointers (dynamic roots) | devices without buffer device addresses (`addressed_needs`) | 1: `crates/metal2vulkan/src/device/metal.rs:236` | `app`: argument buffers holding buffer pointers |
|
||||
| `ArgumentBufferTextures` | Argument buffers holding textures or samplers (handle domain) | devices short of a device limit the site names; devices without a capability the site computes (`gaps`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`needs`); every device (not implemented) | 17: `crates/metal2vulkan-runtime/src/families/features.rs:1621`, `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036` (+15) | `app`: argument buffers holding textures and samplers (bindless) |
|
||||
| `ArgumentBufferTextures` | Argument buffers holding textures or samplers (handle domain) | devices short of a device limit the site names; devices without a capability the site computes (`gaps`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`needs`); every device (not implemented) | 17: `crates/metal2vulkan-runtime/src/families/features.rs:1647`, `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036` (+15) | `app`: argument buffers holding textures and samplers (bindless) |
|
||||
| `ArgumentBufferObjects` | Argument-buffer members that are pipeline states, ICBs, function tables, or acceleration structures | every device (not implemented) | 5: `crates/metal2vulkan/src/lower/access/encode.rs:445`, `crates/metal2vulkan/src/lower/access/encode.rs:495` (+3) | `rare`: pipeline states and ICBs in argument buffers |
|
||||
| `DereferenceLoadedPointer` | Dereferencing a pointer loaded from memory or made from an integer | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 4: `crates/metal2vulkan/src/lower/access/dynamic.rs:407`, `crates/metal2vulkan/src/lower/access/local.rs:774` (+2) | `app`: pointers loaded from argument buffers |
|
||||
| `PointerToInteger` | Storing a pointer or converting it to an integer | - | via a helper: 1: `crates/metal2vulkan/src/lower/access/dynamic.rs:347` | `rare`: pointer to integer casts |
|
||||
@@ -65,7 +65,7 @@ Generated at `871440aca`.
|
||||
| `Int64Atomics` | 64-bit atomics | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`) | 2: `crates/metal2vulkan/src/lower/access/atomic.rs:624`, `crates/metal2vulkan/src/lower/access/atomic.rs:633` | `rare`: 64-bit atomics |
|
||||
| `ImageAtomics` | Image atomics beyond 32-bit integers | devices without a capability the site computes (`gaps`); every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/families/formats.rs:464`, `crates/metal2vulkan-runtime/src/families/formats.rs:468` (+1) | `rare`: texture atomics beyond 32-bit integers |
|
||||
| `DescriptorCount` | Too many descriptors of one kind in a stage or pipeline | devices short of a device limit the site names; devices without VkLimit::MaxUniformBufferRange | 3: `crates/metal2vulkan/src/lower/access/mod.rs:1684`, `crates/metal2vulkan/src/lower/select.rs:1641` (+1) | `app`: many textures or buffers in one stage on a smaller device |
|
||||
| `BufferRange` | A buffer window beyond the descriptor range limits | devices without a capability the site computes (`needs`); devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 7: `crates/metal2vulkan-runtime/src/function_table.rs:569`, `crates/metal2vulkan/src/bind/graphics.rs:3571` (+5) | `app`: a buffer window past a device's descriptor range |
|
||||
| `BufferRange` | A buffer window beyond the descriptor range limits | devices without a capability the site computes (`needs`); devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 7: `crates/metal2vulkan-runtime/src/function_table.rs:569`, `crates/metal2vulkan/src/bind/graphics.rs:3561` (+5) | `app`: a buffer window past a device's descriptor range |
|
||||
| `Int64Arithmetic` | 64-bit integer arithmetic | devices without VkFeature::ShaderInt64 | 2: `crates/metal2vulkan/src/lower/arith/legal.rs:582`, `crates/metal2vulkan/src/lower/select.rs:1133` | `rare`: 64-bit integers on a device without shaderInt64 |
|
||||
| `Float64Arithmetic` | 64-bit float arithmetic | devices without VkFeature::ShaderFloat64 | 2: `crates/metal2vulkan/src/device/metal.rs:230`, `crates/metal2vulkan/src/lower/arith/legal.rs:587` | `rare`: doubles (MSL has none outside Apple's own code) |
|
||||
| `Format` | A pixel format not supported for the required use | devices without VkFeature::ShaderStorageImageExtendedFormats; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`routes`); devices without a format's usage; every device (no Vulkan mechanism); every device (not implemented) | 121: `crates/metal2vulkan-runtime/src/binding_view.rs:146`, `crates/metal2vulkan-runtime/src/blit_plan.rs:462` (+119) | `system`: pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) |
|
||||
@@ -84,33 +84,33 @@ Generated at `871440aca`.
|
||||
| `PixelSamplerCompare` | A constexpr sampler with pixel coordinates and a compare function, which Apple's compiler rejects ("invalid values combination in sampler... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115` | `none`: Apple's compiler rejects it |
|
||||
| `TexelBuffer` | Texture buffers beyond the device's texel-buffer limits | devices without a format's usage; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/bind/instantiate.rs:879`, `crates/metal2vulkan/src/bind/instantiate.rs:885` (+1) | `app`: texture buffers past a device's texel-buffer limits |
|
||||
| `RasterOrderGroups` | Raster order groups without fragment shader interlock | devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::FragmentShaderSampleInterlock; devices without a capability the site computes (`alternatives`); every device (not implemented) | 4: `crates/metal2vulkan/src/device/metal.rs:242`, `crates/metal2vulkan/src/lower/fragment/rog.rs:151` (+2) | `rare`: raster order groups |
|
||||
| `FramebufferFetch` | Framebuffer fetch without an ordered form on the device (rasterization-order attachment access, or the pixel interlock's storage form where the... | devices short of a Vulkan property the site names; devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::RasterizationOrderColorAttachmentAccess; devices without VkFeature::SampleRateShading; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`capability`); devices without a capability the site computes (`missing`); devices without a format's usage; drivers with a defect; every device (not implemented) | 26: `crates/metal2vulkan-runtime/src/families/features.rs:1007`, `crates/metal2vulkan-runtime/src/render.rs:5727` (+24) | `system`: programmable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots) |
|
||||
| `PrimitiveId` | `[[primitive_id]]` in a fragment function | devices without a capability the site computes; every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/families/features.rs:1115`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:3131` (+1) | `rare`: primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function |
|
||||
| `VertexAmplification` | Vertex amplification | devices without VkFeature::Multiview; devices without VkFeature::MultiviewTessellationShader; devices without VkLimit::MaxMultiviewInstanceIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 5: `crates/metal2vulkan/src/bind/graphics.rs:3912`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1281` (+3) | `rare`: vertex amplification |
|
||||
| `LayeredRendering` | Layered rendering (`render_target_array_index`, `viewport_array_index`) | devices without VkFeature::ImageView2DOn3DImage; devices without VkFeature::MultiViewport; devices without VkFeature::ShaderOutputLayer; devices without VkFeature::ShaderOutputViewportIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/render_pass.rs:1669`, `crates/metal2vulkan-runtime/src/render_state.rs:1092` (+5) | `rare`: layered rendering on a device without its features |
|
||||
| `FramebufferFetch` | Framebuffer fetch without an ordered form on the device (rasterization-order attachment access, or the pixel interlock's storage form where the... | devices short of a Vulkan property the site names; devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::RasterizationOrderColorAttachmentAccess; devices without VkFeature::SampleRateShading; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`capability`); devices without a capability the site computes (`missing`); devices without a format's usage; drivers with a defect; every device (not implemented) | 23: `crates/metal2vulkan-runtime/src/families/features.rs:1008`, `crates/metal2vulkan-runtime/src/render.rs:5709` (+21) | `system`: programmable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots) |
|
||||
| `PrimitiveId` | `[[primitive_id]]` in a fragment function | devices without a capability the site computes; every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/families/features.rs:1116`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:3131` (+1) | `rare`: primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function |
|
||||
| `VertexAmplification` | Vertex amplification | devices without VkFeature::Multiview; devices without VkFeature::MultiviewTessellationShader; devices without VkLimit::MaxMultiviewInstanceIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 5: `crates/metal2vulkan/src/bind/graphics.rs:3902`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1298` (+3) | `rare`: vertex amplification |
|
||||
| `LayeredRendering` | Layered rendering (`render_target_array_index`, `viewport_array_index`) | devices without VkFeature::ImageView2DOn3DImage; devices without VkFeature::MultiViewport; devices without VkFeature::ShaderOutputLayer; devices without VkFeature::ShaderOutputViewportIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/render_pass.rs:1658`, `crates/metal2vulkan-runtime/src/render_state.rs:1078` (+5) | `rare`: layered rendering on a device without its features |
|
||||
| `ClipDistance` | Clip or cull distances | devices without VkFeature::ShaderClipDistance; devices without VkLimit::MaxClipDistances | 2: `crates/metal2vulkan/src/lower/mesh/mod.rs:934`, `crates/metal2vulkan/src/lower/mesh/mod.rs:942` | `rare`: clip distances on a device without them |
|
||||
| `DualSourceBlending` | Dual-source blending | devices without VkFeature::DualSrcBlend; devices without VkLimit::MaxFragmentDualSrcAttachments | 5: `crates/metal2vulkan-runtime/src/families/formats.rs:386`, `crates/metal2vulkan/src/metal/state.rs:37` (+3) | `rare`: dual-source blending on a device without it |
|
||||
| `Barycentrics` | Barycentric coordinates | devices without VkFeature::FragmentShaderBarycentric; devices without VkFeature::GeometryShader; devices without a capability the site computes (`needs`); drivers with a defect; every device (not implemented) | 5: `crates/metal2vulkan/src/device/metal.rs:263`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1876` (+3) | `rare`: barycentric coordinates |
|
||||
| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1102`, `crates/metal2vulkan/src/bind/graphics.rs:2608` (+4) | `rare`: stencil from the shader |
|
||||
| `SampleRateShading` | Per-sample shading | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`needs`); every device (not implemented) | 3: `crates/metal2vulkan/src/pipeline/link/graphics.rs:835`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:837` (+1) | `rare`: per-sample shading |
|
||||
| `PixelCoverageAtSampleRate` | The pixel's coverage (`[[sample_mask]]` read) in a fragment function that runs once per sample | drivers with a defect; every device (no Vulkan mechanism); every device (not implemented) | 3: `crates/metal2vulkan/src/lower/fragment/coverage.rs:291`, `crates/metal2vulkan/src/lower/simd/mod.rs:754` (+1) | `rare`: coverage read at sample rate |
|
||||
| `Barycentrics` | Barycentric coordinates | devices without VkFeature::FragmentShaderBarycentric; devices without VkFeature::GeometryShader; devices without a capability the site computes (`needs`); drivers with a defect; every device (not implemented) | 5: `crates/metal2vulkan/src/device/metal.rs:263`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1895` (+3) | `rare`: barycentric coordinates |
|
||||
| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1103`, `crates/metal2vulkan/src/bind/graphics.rs:2611` (+4) | `rare`: stencil from the shader |
|
||||
| `SampleRateShading` | Per-sample shading | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`needs`); every device (not implemented) | 3: `crates/metal2vulkan/src/pipeline/link/graphics.rs:832`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:834` (+1) | `rare`: per-sample shading |
|
||||
| `PixelCoverageAtSampleRate` | The pixel's coverage (`[[sample_mask]]` read) in a fragment function that runs once per sample | drivers with a defect; every device (no Vulkan mechanism); every device (not implemented) | 3: `crates/metal2vulkan/src/lower/fragment/coverage.rs:296`, `crates/metal2vulkan/src/lower/simd/mod.rs:754` (+1) | `rare`: coverage read at sample rate |
|
||||
| `InterfaceComponents` | Too many interface components or locations | devices short of a device limit the site names; devices without VkLimit::MaxColorAttachments; devices without VkLimit::MaxVertexInputAttributes | 4: `crates/metal2vulkan/src/pipeline/compile/color_group.rs:202`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:301` (+2) | `rare`: too many varyings or attachments for a device |
|
||||
| `UnmatchedVarying` | A fragment input without a vertex producer (a Metal link error) | every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/pipeline/link/varyings.rs:318`, `crates/metal2vulkan/src/pipeline/link/varyings.rs:537` (+1) | `none`: a Metal link error |
|
||||
| `KernelStageIn` | Kernel `[[stage_in]]` | every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/indirect_execute.rs:350`, `crates/metal2vulkan/src/bind/dispatch.rs:877` (+1) | `rare`: kernel stage-in combinations Metal leaves unestablished |
|
||||
| `KernelStageIn` | Kernel `[[stage_in]]` | every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/indirect_execute.rs:350`, `crates/metal2vulkan/src/bind/dispatch.rs:871` (+1) | `rare`: kernel stage-in combinations Metal leaves unestablished |
|
||||
| `Tessellation` | Tessellation | devices without VkLimit::MaxPushConstantsSize; devices without VkLimit::MaxStorageBufferRange; devices without VkLimit::MaxTessellationGenerationLevel; every device (not implemented) | 13: `crates/metal2vulkan-air/src/canon/mod.rs:1256`, `crates/metal2vulkan-air/src/canon/mod.rs:1347` (+11) | `rare`: tessellation |
|
||||
| `MeshShading` | | devices short of a device limit the site names; devices without VkLimit::MaxMeshOutputLayers; devices without VkLimit::MaxTaskPayloadSize; devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/bind/graphics.rs:1536`, `crates/metal2vulkan/src/bind/graphics.rs:2981` (+5) | `rare`: mesh pipelines |
|
||||
| `MeshShading` | | devices short of a device limit the site names; devices without VkLimit::MaxMeshOutputLayers; devices without VkLimit::MaxTaskPayloadSize; devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/bind/graphics.rs:1541`, `crates/metal2vulkan/src/bind/graphics.rs:2971` (+5) | `rare`: mesh pipelines |
|
||||
| `TileShading` | | devices without VkLimit::MaxStorageBufferRange; devices without a format's usage; every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:521`, `crates/metal2vulkan/src/bind/plan/compute.rs:237` (+3) | `rare`: tile shaders (Apple GPU families) |
|
||||
| `Imageblocks` | An imageblock outside the single-sample forms implemented | devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/lower/access/imageblock.rs:98`, `crates/metal2vulkan/src/lower/access/mod.rs:908` (+5) | `rare`: imageblocks (Apple GPU families) |
|
||||
| `Imageblocks` | An imageblock outside the forms implemented | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`missing`); drivers with a defect; every device (not implemented) | 10: `crates/metal2vulkan/src/lower/access/imageblock.rs:98`, `crates/metal2vulkan/src/lower/access/mod.rs:908` (+8) | `rare`: imageblocks (Apple GPU families) |
|
||||
| `RayTracing` | | devices without a capability the site computes (`missing`); every device (no Vulkan mechanism); every device (not implemented) | 12: `crates/metal2vulkan/src/bind/acceleration.rs:202`, `crates/metal2vulkan/src/bind/acceleration.rs:216` (+10) | `rare`: ray tracing (out of scope by ruling) |
|
||||
| `Tensors` | | every device (not implemented) | 2: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32`, `crates/metal2vulkan/src/lower/select.rs:903` | `rare`: shader tensors |
|
||||
| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:925` | `rare`: rasterization rate maps |
|
||||
| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:930` | `rare`: rasterization rate maps |
|
||||
| `GpuEncodedIndirectCommands` | | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism); every device (not implemented) | 17: `crates/metal2vulkan/src/bind/replay.rs:556`, `crates/metal2vulkan/src/bind/replay.rs:796` (+15) | `rare`: indirect command buffers encoded by a kernel |
|
||||
| `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:916`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 |
|
||||
| `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:915`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 |
|
||||
| `Constant` | A bitcode constant record outside the typed model (block address, inline asm, `select` and other constant expressions the IR has no form for) | - | via a helper: 3: `crates/metal2vulkan-air/src/bitcode/constants.rs:210`, `crates/metal2vulkan-air/src/bitcode/constants.rs:268` (+1) | `none`: LLVM constant forms AIR does not emit |
|
||||
| `Attribute` | An LLVM attribute kind that changes the calling ABI and that AIR does not use (`inalloca`, `preallocated`, `byref`, `nest`, the `swift*` kinds) | - | via a helper: 2: `crates/metal2vulkan-air/src/bitcode/attrs.rs:493`, `crates/metal2vulkan/src/error/mod.rs:256` | `none`: LLVM ABI attributes AIR does not use |
|
||||
| `BitcodeRecord` | A bitcode record LLVM defines in `block` that the typed model does not cover and that has no more specific variant (legacy spellings predating... | - | via a helper: 7: `crates/metal2vulkan-air/src/bitcode/attrs.rs:337`, `crates/metal2vulkan-air/src/bitcode/function.rs:572` (+5) | `none`: bitcode records AIR does not emit |
|
||||
| `SyncScope` | An atomic access or fence in a synchronization scope other than LLVM's built-in `singlethread` and system scopes | - | via a helper: 2: `crates/metal2vulkan-air/src/bitcode/function.rs:1255`, `crates/metal2vulkan/src/error/mod.rs:258` | `none`: synchronization scopes AIR does not use |
|
||||
| `SubgroupOperations` | Simdgroup operations of a class the stage's subgroups do not support (the stage is not in `subgroupSupportedStages`, or an operation class is... | devices without VkFeature::ShaderQuadControl; devices without VkFeature::ShaderSubgroupExtendedTypes; devices without VkProperty::SubgroupStage | 4: `crates/metal2vulkan-runtime/src/families/features.rs:1686`, `crates/metal2vulkan/src/lower/simd/mod.rs:407` (+2) | `app`: simdgroup functions in a stage a device's subgroups do not support |
|
||||
| `SubgroupOperations` | Simdgroup operations of a class the stage's subgroups do not support (the stage is not in `subgroupSupportedStages`, or an operation class is... | devices without VkFeature::ShaderQuadControl; devices without VkFeature::ShaderSubgroupExtendedTypes; devices without VkProperty::SubgroupStage | 4: `crates/metal2vulkan-runtime/src/families/features.rs:1712`, `crates/metal2vulkan/src/lower/simd/mod.rs:407` (+2) | `app`: simdgroup functions in a stage a device's subgroups do not support |
|
||||
| `DirectCall` | A call to a defined function the inliner cannot take | every device (not implemented) | 1: `crates/metal2vulkan-air/src/canon/mod.rs:1319` | `rare`: variadic or byval calls the inliner cannot take |
|
||||
| `WideSwitchLiteral` | A switch case literal wider than 32 bits | every device (not implemented) | 1: `crates/metal2vulkan/src/structurize/emit.rs:207` | `rare`: 64-bit switch literals |
|
||||
| `Lowering` | An instruction, intrinsic, or interface element of a lowering family whose lowering has not landed yet (each family narrows its refusals as it lands) | devices short of a device limit the site names; devices without VkFeature::ShaderDemoteToHelperInvocation; every device (not implemented) | 35: `crates/metal2vulkan/src/bind/plan/resources.rs:762`, `crates/metal2vulkan/src/lower/access/handle.rs:1062` (+33) | `system`: the catch-all of lowering families not landed: any shader can meet one |
|
||||
@@ -119,10 +119,10 @@ Generated at `871440aca`.
|
||||
| `StageStoresAndAtomics` | Buffer or image stores or atomics in a vertex or fragment function without the stage's store feature (`vertexPipelineStoresAndAtomics`,... | devices without VkFeature::FragmentStoresAndAtomics | 1: `crates/metal2vulkan/src/lower/access/tile_memory.rs:72` | `app`: stores or atomics in vertex or fragment functions on a device without the feature |
|
||||
| `FunctionConstantArgument` | An observed read of a pointer entry argument that a function-constant predicate removes, other than an absent buffer (which reads as null) or an... | devices short of a Vulkan feature the site names; every device (not implemented) | 2: `crates/metal2vulkan-air/src/canon/interface.rs:899`, `crates/metal2vulkan/src/lower/access/absent.rs:100` | `rare`: a function-constant-removed argument read |
|
||||
| `SamplerBicubicFilter` | A use of Metal's bicubic filter that no Metal reading establishes | every device (not implemented) | 5: `crates/metal2vulkan/src/bind/heap.rs:997`, `crates/metal2vulkan/src/bind/plan/resources.rs:1876` (+3) | `system`: bicubic filtering forms Metal does not establish; macOS 26.6.2 makes a runtime sampler with MTLSamplerMinMagFilterCubic (the consumer's boots), whose mip-filtered form is refused |
|
||||
| `GroupCount` | A dispatch whose threadgroup count on `axis` exceeds `maxComputeWorkGroupCount` by more than the binder splits into regions (`None` | every device (no Vulkan mechanism) | 5: `crates/metal2vulkan/src/bind/dispatch.rs:379`, `crates/metal2vulkan/src/bind/dispatch.rs:461` (+3) | `rare`: more threadgroups than a device dispatches, past the binder's split |
|
||||
| `GroupCount` | A dispatch whose threadgroup count on `axis` exceeds `maxComputeWorkGroupCount` by more than the binder splits into regions (`None` | every device (no Vulkan mechanism) | 5: `crates/metal2vulkan/src/bind/dispatch.rs:379`, `crates/metal2vulkan/src/bind/dispatch.rs:455` (+3) | `rare`: more threadgroups than a device dispatches, past the binder's split |
|
||||
| `IntersectionFunctionTable` | A ray intersection through intersection functions | every device (no Vulkan mechanism); every device (not implemented) | 9: `crates/metal2vulkan/src/bind/acceleration.rs:177`, `crates/metal2vulkan/src/bind/acceleration.rs:183` (+7) | `rare`: ray tracing (out of scope by ruling) |
|
||||
| `IndependentBlending` | Color attachments whose write masks or blend states differ, as Metal sets them per attachment, on a device without `independentBlend`, where no... | devices without VkFeature::IndependentBlend | 2: `crates/metal2vulkan-runtime/src/render.rs:2036`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1008` | `rare`: per-attachment blending on a device without independentBlend |
|
||||
| `RasterSampleCount` | A `rasterSampleCount` outside the device's framebuffer sample counts for the pipeline's attachments (`framebuffer*SampleCounts`), and, for a color... | devices short of a Vulkan property the site names; devices without a capability the site computes | 2: `crates/metal2vulkan-runtime/src/families/limits.rs:1059`, `crates/metal2vulkan/src/pipeline/graphics.rs:555` | `app`: a sample count a device lacks for the attachments |
|
||||
| `IndependentBlending` | Color attachments whose write masks or blend states differ, as Metal sets them per attachment, on a device without `independentBlend`, where no... | devices without VkFeature::IndependentBlend | 2: `crates/metal2vulkan-runtime/src/render.rs:2036`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1005` | `rare`: per-attachment blending on a device without independentBlend |
|
||||
| `RasterSampleCount` | A `rasterSampleCount` outside the device's framebuffer sample counts for the pipeline's attachments (`framebuffer*SampleCounts`), and, for a color... | devices short of a Vulkan property the site names; devices without a capability the site computes | 2: `crates/metal2vulkan-runtime/src/families/limits.rs:1059`, `crates/metal2vulkan/src/pipeline/graphics.rs:545` | `app`: a sample count a device lacks for the attachments |
|
||||
| `TriangleFillLines` | The render encoder's `MTLTriangleFillModeLines` (`polygonMode` `LINE`) on a device without `fillModeNonSolid` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:347` | `app`: wireframe on a device without fillModeNonSolid |
|
||||
| `DepthClipClamp` | The render encoder's `MTLDepthClipModeClamp` (`depthClampEnable`) on a device without `depthClamp` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:363` | `app`: depth clamp on a device without depthClamp |
|
||||
| `DepthBiasClamp` | The render encoder's depth bias clamp, nonzero with a nonzero bias, on a device without `depthBiasClamp` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:463` | `app`: depth bias clamp on a device without depthBiasClamp |
|
||||
@@ -130,33 +130,34 @@ Generated at `871440aca`.
|
||||
| `SparseTexture` | A sparse texture (`MTLTexture.isSparse`) bound at `slot`, where a function observes the residency of its accesses (`sparse_color::resident()`) and... | - | via a helper: 2: `crates/metal2vulkan/src/bind/plan/slots.rs:583`, `crates/metal2vulkan/src/bind/plan/slots.rs:607` | `rare`: sparse residency reads |
|
||||
| `TextureSize` | A texture whose extent, array layers, or level count is past what the device takes for its format, type, and usage (`Capability::Limit` names the... | devices short of a device limit the site names | 1: `crates/metal2vulkan-runtime/src/image_plan.rs:1196` | `app`: a texture past a device's image limits |
|
||||
| `TextureSampleCount` | A texture sample count the device does not take for its format, type, and usage | devices short of a Vulkan property the site names; devices without VkFeature::MultisampleArrayImage; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/image_plan.rs:1244`, `crates/metal2vulkan-runtime/src/image_plan.rs:598` (+1) | `app`: a sample count a device lacks for the texture |
|
||||
| `TextureView` | A texture view Vulkan cannot make exactly on this image | every device (no Vulkan mechanism); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:156`, `crates/metal2vulkan-runtime/src/texture.rs:5032` (+5) | `app`: a texture view Vulkan cannot make exactly |
|
||||
| `TextureSwizzle` | A texture swizzle whose Metal behavior is not measured | devices short of a Vulkan feature the site names; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:167`, `crates/metal2vulkan-runtime/src/texture.rs:980` (+5) | `app`: texture swizzles whose Metal behaviour is unmeasured |
|
||||
| `TextureView` | A texture view Vulkan cannot make exactly on this image | every device (no Vulkan mechanism); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:156`, `crates/metal2vulkan-runtime/src/texture.rs:5031` (+5) | `app`: a texture view Vulkan cannot make exactly |
|
||||
| `TextureSwizzle` | A texture swizzle whose Metal behavior is not measured | devices short of a Vulkan feature the site names; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:167`, `crates/metal2vulkan-runtime/src/texture.rs:979` (+5) | `app`: texture swizzles whose Metal behaviour is unmeasured |
|
||||
| `MipmapGeneration` | `generateMipmapsForTexture:` where the device's filter is not shown to give Metal's answer | devices without VkFeature::ShaderInt64; devices without a format's usage; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/blit_texture.rs:1787`, `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37` (+5) | `app`: generateMipmapsForTexture: where the device's filter is not Metal's |
|
||||
| `HostMemory` | A buffer over the caller's host memory without a copy (`newBufferWithBytesNoCopy:`) | devices without VkExtension::ExtExternalMemoryHost; every device (no Vulkan mechanism); every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/host_memory.rs:393`, `crates/metal2vulkan-runtime/src/host_memory.rs:433` (+3) | `system`: newBufferWithBytesNoCopy: where the device cannot import the memory |
|
||||
| `GpuTimes` | A command buffer's GPU times (`GPUStartTime`, `GPUEndTime`) on a device whose queue family writes no timestamps (`timestampValidBits` 0) | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2542` | `rare`: GPU times on a queue without timestamps |
|
||||
| `CountingVisibility` | A `Counting` visibility result (`MTLVisibilityResultModeCounting`) on a device without `occlusionQueryPrecise` | devices without VkFeature::OcclusionQueryPrecise | 1: `crates/metal2vulkan-runtime/src/visibility.rs:452` | `rare`: counting occlusion queries on a device without precise queries |
|
||||
| `ViewFormatReinterpretation` | A texture view whose format has other components, or components of other widths, than its texture's (`RGBA8Unorm` as `R32Uint`), on a device whose... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/view_plan.rs:568` | `app`: a view of another component layout on a portability subset (MoltenVK) |
|
||||
| `SeparateMultisampledDepthStencil` | A render pass whose depth and stencil attachments are separate multisampled textures that it loads or may store, on a device without maintenance8,... | - | via a helper: 7: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188`, `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294` (+5) | `rare`: separate multisampled depth and stencil textures |
|
||||
| `PixelCoverage` | The fragment's coverage (`[[sample_mask]]` read) in a fragment function of a pipeline of more than one sample that runs once per pixel | drivers with a defect | 1: `crates/metal2vulkan/src/pipeline/link/graphics.rs:774` | `rare`: coverage reads at pixel rate in a multisampled pipeline |
|
||||
| `CentroidVarying` | A centroid varying (`[[centroid_perspective]]`, `[[centroid_no_perspective]]`) in a fragment function of a pipeline of more than one sample | drivers with a defect | 1: `crates/metal2vulkan/src/pipeline/link/graphics.rs:792` | `rare`: centroid varyings in a multisampled pipeline |
|
||||
| `PixelCoverage` | The fragment's coverage (`[[sample_mask]]` read) in a fragment function of a pipeline of more than one sample that runs once per pixel | drivers with a defect | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1214`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:771` | `rare`: coverage reads at pixel rate in a multisampled pipeline |
|
||||
| `CentroidVarying` | A centroid varying (`[[centroid_perspective]]`, `[[centroid_no_perspective]]`) in a fragment function of a pipeline of more than one sample | drivers with a defect | 1: `crates/metal2vulkan/src/pipeline/link/graphics.rs:789` | `rare`: centroid varyings in a multisampled pipeline |
|
||||
| `PrivateMemory` | A stage whose private memory (its `thread` variables and arrays, and the constants it holds per thread) takes more Function storage a thread than... | - | via a helper: 1: `crates/metal2vulkan/src/lower/select.rs:1171` | `rare`: very large per-thread arrays |
|
||||
| `SparseTextures` | A sparse heap (`MTLHeapTypeSparse`), or a texture made from one, on a device without what a sparse resident image of it needs, which `missing` names | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/sparse/texture.rs:32` | `rare`: sparse heaps on a device without sparse images |
|
||||
| `SparseMapping` | A sparse texture's mapping update (`updateTextureMapping:` and its array form, or a move of mappings) that covers part of one of the device's... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:466` | `rare`: sparse mappings off the device's blocks |
|
||||
| `TimelineSemaphores` | Command buffers and events, which the runtime completes and signals through timeline semaphores (core in Vulkan 1.2), on a device whose... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/device/create.rs:1053` | `none`: a device below the runtime's floor |
|
||||
| `Reflection` | Reflection of an argument whose answer Metal's has not been measured for (`reflection`) | every device (not implemented) | 9: `crates/metal2vulkan/src/bind/argument_buffer.rs:626`, `crates/metal2vulkan/src/reflection/derive.rs:178` (+7) | `rare`: reflection of argument kinds Metal's answer is unmeasured for |
|
||||
| `HeapTextureTiling` | A texture of a heap whose memory the device's optimal images do not take (a `Shared` heap on a device whose optimal images take no host-visible... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:565` | `app`: textures in Shared heaps on a device whose optimal images take no host memory |
|
||||
| `ViewportDepthRange` | A viewport depth range past `[0, 1]` (`setViewport:`), which Metal takes and the runtime draws natively (`VK_EXT_depth_range_unrestricted`) or... | drivers with a defect | 1: `crates/metal2vulkan-runtime/src/render_state.rs:1200` | `rare`: viewport depth outside [0, 1] |
|
||||
| `ViewportDepthRange` | A viewport depth range past `[0, 1]` (`setViewport:`), which Metal takes and the runtime draws natively (`VK_EXT_depth_range_unrestricted`) or... | drivers with a defect | 1: `crates/metal2vulkan-runtime/src/render_state.rs:1186` | `rare`: viewport depth outside [0, 1] |
|
||||
| `UndeclaredTextureUsage` | A shader write to a texture made without `ShaderWrite` (or `ShaderAtomic`), or a read of one made without `ShaderRead`, which plain Metal runs,... | every device (not implemented) | 2: `crates/metal2vulkan-runtime/src/binding_view.rs:141`, `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:72` | `app`: a shader write to a texture made without ShaderWrite, which plain Metal runs |
|
||||
| `RenderTargetSize` | A render pass whose render area or layers are past the device's framebuffer limits (`Capability::Limit` names `MaxFramebufferWidth`,... | devices short of a device limit the site names | 1: `crates/metal2vulkan-runtime/src/render_pass.rs:1271` | `rare`: a render area past a device's framebuffer limits |
|
||||
| `RenderTargetSize` | A render pass whose render area or layers are past the device's framebuffer limits (`Capability::Limit` names `MaxFramebufferWidth`,... | devices short of a device limit the site names | 1: `crates/metal2vulkan-runtime/src/render_pass.rs:1264` | `rare`: a render area past a device's framebuffer limits |
|
||||
| `IndirectRenderState` | A render state a function sets on an indirect render command (`render_command::set_cull_mode`, `set_front_facing_winding`,... | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/access/encode.rs:567` | `rare`: render state set by a kernel on an indirect command |
|
||||
| `GlobalBuiltinInFragment` | A fragment function's read of a Metal 3.1 program-scope built-in variable that Metal does not lower there | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/select.rs:912` | `rare`: Metal 3.1 global built-ins in fragment functions |
|
||||
| `PrivateRenderState` | A private fixed-function property of Metal's pipeline descriptor (Apple SPI, OpenGL on Metal's) set to a value whose effect the translation has... | devices without VkFeature::LogicOp; every device (not implemented) | 7: `crates/metal2vulkan/src/bind/heap.rs:1300`, `crates/metal2vulkan/src/bind/plan/resources.rs:887` (+5) | `none`: Apple-private pipeline fields of OpenGL on Metal (no public header) |
|
||||
| `ExtendedRangeBlend` | Metal's blend into an extended-range attachment (`BGRA10_XR`, `BGR10_XR`, `RGB10A8_2P_XR10` and their `_sRGB` twins), which the function computes... | every device (not implemented) | 4: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305`, `crates/metal2vulkan/src/lower/fragment/fetch.rs:1553` (+2) | `system`: the parts of a blend into an extended-range (XR10) attachment the measured model does not hold (second-source factors, the color blend color difference, a one-color-channel mask, float4 and sRGB outside the measured forms); the consumer's guests blend RGB10A8_2P_XR10 attachments |
|
||||
| `PrivateRenderState` | A private fixed-function property of Metal's pipeline descriptor (Apple SPI, OpenGL on Metal's) set to a value whose effect the translation has... | every device (not implemented) | 4: `crates/metal2vulkan/src/bind/heap.rs:1300`, `crates/metal2vulkan/src/bind/plan/resources.rs:887` (+2) | `none`: Apple-private pipeline fields of OpenGL on Metal (no public header) |
|
||||
| `ExtendedRangeBlend` | Metal's blend into an extended-range attachment (`BGRA10_XR`, `BGR10_XR`, `RGB10A8_2P_XR10` and their `_sRGB` twins), which the function computes... | every device (not implemented) | 4: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305`, `crates/metal2vulkan/src/lower/fragment/fetch.rs:1555` (+2) | `system`: the parts of a blend into an extended-range (XR10) attachment the measured model does not hold (second-source factors, the color blend color difference, a one-color-channel mask, float4 and sRGB outside the measured forms); the consumer's guests blend RGB10A8_2P_XR10 attachments |
|
||||
| `TileReach` | The tiles a render pass's primitives reach, binned on the device ([`tile_reach_module`](crate::bind::tile_reach_module)), on a device without what... | devices short of a Vulkan feature the site names; devices without a capability the site computes (`vec![int64]`); every device (not implemented) | 3: `crates/metal2vulkan/src/bind/tile_reach.rs:270`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:2469` (+1) | `app`: the tiles a pass's draws reach, binned on a device without shaderInt64 |
|
||||
| `CommandPredication` | Metal's private command predication (`encodeStartIf:offset:comparison:referenceValue:` and the rest), whose step module... | devices without buffer device addresses (`addressed_needs`) | 1: `crates/metal2vulkan/src/bind/replay/predication.rs:414` | `none`: Apple-private command predication on a device without buffer device addresses |
|
||||
| `ProgramScopeBinding` | A program-scope buffer binding of MSL 3.2 (macOS 15 and later), `constant T* constant p [[buffer(n)]];` in Apple's `!air.global_bindings` list,... | - | via a helper: 2: `crates/metal2vulkan-air/src/abi/module.rs:77`, `crates/metal2vulkan/src/error/mod.rs:267` | `app`: MSL 3.2 program-scope buffer bindings (macOS 15 and later) |
|
||||
| `SeqCstFence` | A sequentially consistent fence (`seq_cst` `atomic_thread_fence`, an LLVM `fence seq_cst`, or a `seq_cst` barrier ordering device memory), whose... | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/lower/sync/barrier.rs:443` | `rare`: a seq_cst fence in a vertex or fragment stage without its stores and atomics |
|
||||
| `PostDepthCoverage` | The coverage after the depth and stencil tests (`[[sample_mask, post_depth_coverage]]`), read through `VK_EXT_post_depth_coverage` | devices short of a Vulkan extension the site names; devices without VkExtension::ExtPostDepthCoverage | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1208`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:779` | `rare`: the coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage |
|
||||
|
||||
## 2. Runtime gaps (`Error::NotImplemented(RuntimeGap)`)
|
||||
|
||||
@@ -164,7 +165,7 @@ Generated at `871440aca`.
|
||||
|---|---|---|---|---|
|
||||
| `Textures` | Textures and texture buffers | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:163`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:1554` (+7) | `rare`: texture forms the runtime has not built (texture buffers of some forms, X24Stencil8 views) |
|
||||
| `ResourceHeap` | The resource-ID heap, descriptor set 1 | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:2016` | `rare`: the resource-ID heap's remaining forms |
|
||||
| `SparseHeaps` | Sparse heaps and their textures | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:458`, `crates/metal2vulkan-runtime/src/texture.rs:1629` (+1) | `rare`: sparse heaps |
|
||||
| `SparseHeaps` | Sparse heaps and their textures | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:458`, `crates/metal2vulkan-runtime/src/texture.rs:1628` (+1) | `rare`: sparse heaps |
|
||||
| `SparseTileMaps` | What the runtime's emulation of sparse textures does not build yet | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/binding.rs:553`, `crates/metal2vulkan-runtime/src/sparse/texture.rs:30` (+1) | `rare`: sparse texture emulation's unbuilt pieces |
|
||||
| `HeapPastMaxBufferSize` | A heap larger than the device's `maxBufferSize`, which the device can allocate | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/heap.rs:694` | `rare`: a heap past maxBufferSize |
|
||||
| `HeapTextureAlignment` | A heap texture whose image needs an alignment past the heap memory's base alignment (256 KiB) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:980` | `rare`: a heap texture needing more than 256 KiB alignment |
|
||||
@@ -181,48 +182,47 @@ Generated at `871440aca`.
|
||||
| `Render` | Render pipelines, passes and draws | every device (runtime piece not built) | 23: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404`, `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460` (+21) | `system`: render pass, resolve and attachment forms not built (20 sites: see the appendix) |
|
||||
| `TexelsPastBufferLength` | A 2D array over a buffer whose texels run past the buffer's length, which Metal makes over bytes its buffer's allocation has past the length | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105` | `rare`: a 2D array over a buffer past its length |
|
||||
| `OverlappingSurfaceRows` | A texture of an IOSurface plane (`Buffer::new_texture_with_iosurface_plane`, the stand-in for `newTextureWithDescriptor:iosurface:plane:`) whose... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263` | `rare`: an IOSurface plane whose rows overlap |
|
||||
| `SamplePositionsAtBegin` | A render pass whose custom sample positions Vulkan takes only through what the runtime does not build | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145`, `crates/metal2vulkan-runtime/src/render_pass.rs:1861` (+1) | `rare`: custom sample positions Vulkan takes only at begin |
|
||||
| `SamplePositionsAtBegin` | A render pass whose custom sample positions Vulkan takes only through what the runtime does not build | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145`, `crates/metal2vulkan-runtime/src/render_pass.rs:1850` (+1) | `rare`: custom sample positions Vulkan takes only at begin |
|
||||
| `SharedEventAcrossDevices` | A shared event handle opened on a device other than its event's | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/event.rs:376` | `rare`: a shared event opened on another device |
|
||||
| `ViewportDepthRange` | A viewport depth range past `[0, 1]`, which Metal takes, on a device without the features to take it natively or by the vertex stage's... | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:330`, `crates/metal2vulkan-runtime/src/render_state.rs:1024` (+5) | `rare`: viewport depth outside [0, 1] without the device features |
|
||||
| `NonFiniteDepthBias` | NaN or infinite depth bias factors whose effect differs between flat and sloped triangles, or a draw whose bias adds a clamp that moves a... | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/render_state.rs:1587`, `crates/metal2vulkan-runtime/src/render_state.rs:1590` (+3) | `rare`: NaN or infinite depth bias |
|
||||
| `ViewportDepthRange` | A viewport depth range past `[0, 1]`, which Metal takes, on a device without the features to take it natively or by the vertex stage's... | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:330`, `crates/metal2vulkan-runtime/src/render_state.rs:1010` (+5) | `rare`: viewport depth outside [0, 1] without the device features |
|
||||
| `NonFiniteDepthBias` | NaN or infinite depth bias factors whose effect differs between flat and sloped triangles, or a draw whose bias adds a clamp that moves a... | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/render_state.rs:1573`, `crates/metal2vulkan-runtime/src/render_state.rs:1576` (+3) | `rare`: NaN or infinite depth bias |
|
||||
| `DepthNeverWithoutAttachment` | A draw under a depth compare of `Never` in a pass without a depth attachment, which fails every fragment, whose fragment function writes color... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147` | `rare`: depth compare Never with no depth attachment |
|
||||
| `HiddenDepthStencil` | A draw whose depth/stencil state uses depth or the stencil that the pass lacks, which plain Metal tests against a hidden `float` depth of 1.0 and... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563`, `crates/metal2vulkan-runtime/src/render.rs:6450` | `app`: a depth-stencil state using depth or stencil the pass lacks |
|
||||
| `IndirectDrawArguments` | An indirect draw whose arguments the binding plan asks to read on the CPU (`DrawCommands::indirect_needs_arguments`) | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/index_bounds.rs:91`, `crates/metal2vulkan-runtime/src/render.rs:3153` (+3) | `rare`: indirect draws whose arguments the CPU must read |
|
||||
| `DepthStencilResolve` | A depth/stencil resolve no Vulkan resolve mode of the device states | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441`, `crates/metal2vulkan-runtime/src/resolve.rs:1388` (+5) | `rare`: depth/stencil resolve modes a device lacks |
|
||||
| `TileAtSampleCount` | The tile memory of a render pass of a sample count Apple's GPUs lack (theirs are 1, 2 and 4), which a Vulkan device may have | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render_pass.rs:1611`, `crates/metal2vulkan-runtime/src/render_pass.rs:937` | `none`: tile memory at a sample count Apple's GPUs lack |
|
||||
| `ImageblockMasters` | A draw or tile dispatch whose imageblock is of another size than the pass's, or a draw whose fragment function's layouts are of another alignment... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:7133`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:930` | `rare`: imageblocks of mixed sizes in one pass |
|
||||
| `TileAndFragmentImageblocks` | A render pass that reaches its imageblock storage, from a draw whose fragment function declares an explicit imageblock or a tile dispatch whose... | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/render.rs:7125`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:797` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions |
|
||||
| `Metal4Api` | Metal 4's API (`MTL4CommandQueue`, `MTL4CommandBuffer`, `MTL4ArgumentTable`, `MTL4Compiler` and the rest), with the features only its programming... (not scheduled) | every device (runtime piece not built) | family audit only: 3: `crates/metal2vulkan-runtime/src/families/features.rs:1460`, `crates/metal2vulkan-runtime/src/families/limits.rs:1022` (+1) | `app`: Metal 4 (the API is missing: METAL-COVERAGE.md) |
|
||||
| `HiddenDepthStencil` | A draw whose depth/stencil state uses depth or the stencil that the pass lacks, which plain Metal tests against a hidden `float` depth of 1.0 and... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563`, `crates/metal2vulkan-runtime/src/render.rs:6432` | `app`: a depth-stencil state using depth or stencil the pass lacks |
|
||||
| `IndirectDrawArguments` | An indirect draw whose arguments the binding plan asks to read on the CPU (`DrawCommands::indirect_needs_arguments`) | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/index_bounds.rs:91`, `crates/metal2vulkan-runtime/src/render.rs:3138` (+3) | `rare`: indirect draws whose arguments the CPU must read |
|
||||
| `DepthStencilResolve` | A depth/stencil resolve no Vulkan resolve mode of the device states | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441`, `crates/metal2vulkan-runtime/src/resolve.rs:1247` (+5) | `rare`: depth/stencil resolve modes a device lacks |
|
||||
| `TileAtSampleCount` | The tile memory of a render pass of a sample count Apple's GPUs lack (theirs are 1, 2 and 4), which a Vulkan device may have | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render_pass.rs:1600`, `crates/metal2vulkan-runtime/src/render_pass.rs:930` | `none`: tile memory at a sample count Apple's GPUs lack |
|
||||
| `ImageblockMasters` | A draw or tile dispatch whose imageblock is of another size than the pass's, or a draw whose fragment function's layouts are of another alignment... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:7115`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:930` | `rare`: imageblocks of mixed sizes in one pass |
|
||||
| `TileAndFragmentImageblocks` | A render pass that reaches its imageblock storage, from a draw whose fragment function declares an explicit imageblock or a tile dispatch whose... | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/render.rs:7107`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:797` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions |
|
||||
| `Metal4Api` | Metal 4's API (`MTL4CommandQueue`, `MTL4CommandBuffer`, `MTL4ArgumentTable`, `MTL4Compiler` and the rest), with the features only its programming... (not scheduled) | every device (runtime piece not built) | family audit only: 3: `crates/metal2vulkan-runtime/src/families/features.rs:1486`, `crates/metal2vulkan-runtime/src/families/limits.rs:1022` (+1) | `app`: Metal 4 (the API is missing: METAL-COVERAGE.md) |
|
||||
| `CounterSampleBuffers` | Counter sample buffers (`MTLCounterSampleBuffer`) and the commands that sample into them (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/limits.rs:1013` | `app`: GPU counters and timestamps by sample buffer (missing API) |
|
||||
| `ResidencySets` | Residency sets (`MTLResidencySet`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1442`, `crates/metal2vulkan-runtime/src/families/limits.rs:1015` | `app`: residency sets (missing API) |
|
||||
| `TextureAccessCounters` | A sparse texture's access counters (`getTextureAccessCounters:...` and `resetTextureAccessCounters:...` of a blit encoder) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1429`, `crates/metal2vulkan-runtime/src/families/features.rs:1434` | `rare`: sparse texture access counters |
|
||||
| `IoCommandQueues` | Fast resource loading (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1439`, `crates/metal2vulkan-runtime/src/families/limits.rs:1020` | `rare`: fast resource loading (missing API) |
|
||||
| `TextureViewPools` | Texture view pools (`MTLTextureViewPool`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1443`, `crates/metal2vulkan-runtime/src/families/limits.rs:1021` | `rare`: texture view pools (missing API) |
|
||||
| `ColorAttachmentMapping` | Color attachment mapping (`MTLLogicalToPhysicalColorAttachmentMap`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1444` | `rare`: color attachment mapping (missing API) |
|
||||
| `LossyTextureCompression` | Lossy texture compression (`MTLTextureCompressionTypeLossy`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1438` | `rare`: lossy texture compression |
|
||||
| `ShaderValidation` | Per-pipeline shader validation (`MTLShaderValidation`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1440` | `rare`: per-pipeline shader validation |
|
||||
| `ShaderLogging` | Shader logging (`MTLLogState`, a shader's `os_log`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1441` | `rare`: shader os_log |
|
||||
| `DeviceNotifications` | Device notifications (`MTLCopyAllDevicesWithObserver`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1445` | `rare`: device hotplug notifications (deprecated) |
|
||||
| `ResidencySets` | Residency sets (`MTLResidencySet`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1468`, `crates/metal2vulkan-runtime/src/families/limits.rs:1015` | `app`: residency sets (missing API) |
|
||||
| `TextureAccessCounters` | A sparse texture's access counters (`getTextureAccessCounters:...` and `resetTextureAccessCounters:...` of a blit encoder) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1455`, `crates/metal2vulkan-runtime/src/families/features.rs:1460` | `rare`: sparse texture access counters |
|
||||
| `IoCommandQueues` | Fast resource loading (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1465`, `crates/metal2vulkan-runtime/src/families/limits.rs:1020` | `rare`: fast resource loading (missing API) |
|
||||
| `TextureViewPools` | Texture view pools (`MTLTextureViewPool`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1469`, `crates/metal2vulkan-runtime/src/families/limits.rs:1021` | `rare`: texture view pools (missing API) |
|
||||
| `ColorAttachmentMapping` | Color attachment mapping (`MTLLogicalToPhysicalColorAttachmentMap`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1470` | `rare`: color attachment mapping (missing API) |
|
||||
| `LossyTextureCompression` | Lossy texture compression (`MTLTextureCompressionTypeLossy`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1464` | `rare`: lossy texture compression |
|
||||
| `ShaderValidation` | Per-pipeline shader validation (`MTLShaderValidation`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1466` | `rare`: per-pipeline shader validation |
|
||||
| `ShaderLogging` | Shader logging (`MTLLogState`, a shader's `os_log`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1467` | `rare`: shader os_log |
|
||||
| `DeviceNotifications` | Device notifications (`MTLCopyAllDevicesWithObserver`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1471` | `rare`: device hotplug notifications (deprecated) |
|
||||
| `RateMapRegions` | A draw in a rate-mapped pass that the region path does not draw, for the compile layer's reason (`rate_mapped_pass.rs`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:349` | `rare`: draws in rate-mapped passes the region path does not draw |
|
||||
| `LayeredPass` | A layered render pass (`renderTargetArrayLength` 2 or more) that needs a step of one layer | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/color_resolve.rs:890` | `rare`: layered passes needing a per-layer color resolve |
|
||||
| `FunctionOptions` | A function descriptor's options beyond `CompileToBinary` and `StoreFunctionInMetalPipelinesScript` (`Library::new_function_with_descriptor`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:215` | `rare`: function descriptor options beyond CompileToBinary |
|
||||
| `OverlappingTextureCopies` | A blit copy between overlapping regions of one texture's texels (`copyFromTexture:...` with the source's region meeting the destination's, through... (not scheduled) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/blit_texture.rs:1242` | `rare`: overlapping texture copies (Metal races) |
|
||||
| `RebindTextures` | `Buffer::rebind_bytes_no_copy` of a no-copy buffer with a live texture over its bytes, given memory at another offset in its page than the old | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:600`, `crates/metal2vulkan-runtime/src/texture/heap.rs:2431` (+3) | `none`: a runtime extension's rebind with a live texture |
|
||||
| `PvrtcBlockOrder` | A PVRTC texture's blocks in a Metal block order the runtime does not lay out | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:5575` | `rare`: PVRTC regions off whole levels |
|
||||
| `DecodedHeapTexture` | A heap's or a sparse heap's texture of an ASTC format on a device without that ASTC format (`astc.rs`), or a sparse heap's texture of an ETC2 or... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/texture.rs:1637`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1281` | `app`: an ASTC texture in a heap on a device without ASTC |
|
||||
| `PvrtcBlockOrder` | A PVRTC texture's blocks in a Metal block order the runtime does not lay out | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:5584` | `rare`: PVRTC regions off whole levels |
|
||||
| `DecodedHeapTexture` | A heap's or a sparse heap's texture of an ASTC format on a device without that ASTC format (`astc.rs`), or a sparse heap's texture of an ETC2 or... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/texture.rs:1636`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1281` | `app`: an ASTC texture in a heap on a device without ASTC |
|
||||
| `VertexFetchPast4GiB` | A draw (`drawPrimitives:` and its forms, or an indirect command buffer's command) that may read a vertex attribute the pipeline fetches in its... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/vertex_reach.rs:72` | `rare`: vertex fetch past 4 GiB of a bind offset |
|
||||
| `StageInFetchPast4GiB` | A dispatch (`dispatchThreads:threadsPerThreadgroup:` and its forms, or an indirect command buffer's command) whose kernel may read a... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/fetch_reach.rs:126` | `rare`: stage-in fetch past 4 GiB of a bind offset |
|
||||
| `MappedTextureSampling` | A command that would sample a texture of an address-mode map (`TextureDescriptor::address_mode_map`) where the runtime cannot map it at bind... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/address_map.rs:158` | `none`: a runtime extension's texture (address_mode_map) sampled where the runtime cannot map it; no Metal API path |
|
||||
| `LibrarySource` | A library compiled from Metal Shading Language source | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:107` | `app`: a library compiled from Metal source (newLibraryWithSource:); the runtime takes metallibs and AIR |
|
||||
| `RestartedStrip` | An indexed strip after `set_primitive_restart_enabled` with an index Vulkan does not restart at, which the runtime draws as a list an index... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/index_rewrite.rs:110`, `crates/metal2vulkan-runtime/src/render.rs:7237` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws |
|
||||
| `PrimitiveIdIndices` | An indexed draw (`drawIndexedPrimitives:`) of a pipeline whose fragment function reads `[[primitive_id]]` on a device whose fragment stage cannot... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render.rs:7614` | `rare`: an indexed draw of a primitive_id pipeline, on a device without geometry or tessellation shaders, whose indices the encoder wrote since its last barrier |
|
||||
| `RestartedStrip` | An indexed strip after `set_primitive_restart_enabled` with an index Vulkan does not restart at, which the runtime draws as a list an index... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/index_rewrite.rs:110`, `crates/metal2vulkan-runtime/src/render.rs:7219` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws |
|
||||
| `PrimitiveIdIndices` | An indexed draw (`drawIndexedPrimitives:`) of a pipeline whose fragment function reads `[[primitive_id]]` on a device whose fragment stage cannot... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render.rs:7596` | `rare`: an indexed draw of a primitive_id pipeline, on a device without geometry or tessellation shaders, whose indices the encoder wrote since its last barrier |
|
||||
| `RotatedTexture` | A rotated texture (`TextureDescriptor::rotation`) where the runtime does not build what Metal does | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:1571`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:715` (+7) | `rare`: a rotated drawable's views, blits with images over overlapping rows, rows past its buffer |
|
||||
| `DetachTextures` | A texture over a no-copy buffer's or heap's bytes (a heap's texture, or a texture over the buffer or over one of the heap's buffers) that no... | every device (runtime piece not built) | 8: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:604`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:622` (+6) | `none`: a runtime extension's detach with a texture no stand-in presents exactly |
|
||||
| `TextureBufferLevels` | A texture buffer of more than one level (`TextureDescriptor::mipmap_level_count`, up to its width's full chain) from the device's, a heap's or the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:540` | `rare`: a texture buffer of more than one level (public, unusual) |
|
||||
| `WriteSwizzle` | A texture of `TextureDescriptor::write_swizzle_enabled` whose swizzle is not the default, with `ShaderWrite` or `RenderTarget` usage, from the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:547` | `none`: Apple-private writeSwizzleEnabled with a swizzle that writes |
|
||||
| `DetachedTexelAccess` | `Texture::replace_region` or `get_bytes` of a texture whose bytes (a no-copy buffer's or heap's) are detached (`detach_backing`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:4820` | `none`: CPU texel access while a runtime extension detached the bytes |
|
||||
| `DetachedTexelAccess` | `Texture::replace_region` or `get_bytes` of a texture whose bytes (a no-copy buffer's or heap's) are detached (`detach_backing`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:4819` | `none`: CPU texel access while a runtime extension detached the bytes |
|
||||
| `SurfaceDepthStencil` | A use of a texture of a depth or stencil format (`Depth16Unorm`, `Depth32Float`, `Depth32Float_Stencil8`, `Stencil8`, `X32_Stencil8`) over a plane... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs:236`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57` | `rare`: a blit of the stencil of a Depth32Float_Stencil8 texture over a plane of an IOSurface with planes, or a pass on an X32_Stencil8 one's view as Depth32Float_Stencil8 |
|
||||
| `ExtendedRangeResolve` | The multisample resolve (`MultisampleResolve`, `StoreAndMultisampleResolve`) of a color attachment of an extended-range format (`BGRA10_XR`,... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/resolve.rs:604` | `rare`: a multisample resolve of a BGRA10_XR, BGR10_XR or sRGB twin attachment (EDR content drawn multisampled) |
|
||||
| `HostHeapUncompressedMultisample` | A multisample texture in a heap over host pages (`Device::new_heap_with_bytes_no_copy`) that Metal keeps uncompressed | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:1924` | `none`: a multisample texture Metal keeps uncompressed in a runtime extension's heap over host pages |
|
||||
| `PredicationUnbalanced` | An unbalanced command-predication record (`ComputeCommandEncoder::encode_end_if` and the other ends, or `encode_start_else`, with no block open;... | every device (runtime piece not built) | 4: `crates/metal2vulkan-runtime/src/predication.rs:371`, `crates/metal2vulkan-runtime/src/predication.rs:403` (+2) | `none`: an unbalanced Apple-private command-predication record, whose dropped work Metal decides by no rule measured |
|
||||
| `PredicationOpenAtUnitEnd` | A command buffer one of whose units of predication ended with an If still open that no misused record killed, refused at `CommandBuffer::commit` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/predication.rs:280`, `crates/metal2vulkan-runtime/src/predication.rs:296` | `none`: an Apple-private predication If left open, live, where its unit ends |
|
||||
@@ -236,11 +236,13 @@ Generated at `871440aca`.
|
||||
|
||||
| Variant | What it blocks | Where | Sites | Reach |
|
||||
|---|---|---|---|---|
|
||||
| `ProtectedContent` | Protected content | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:208` | `none`: Apple-private (no public header) |
|
||||
| `LineWidth` | A line width other than 1 (`setLineWidth:`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:210` | `none`: Apple-private (no public header) |
|
||||
| `ProvokingVertexMode` | `setProvokingVertexMode:` other than 0 | every device (Apple-private, not built) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:215` | `none`: Apple-private (no public header) |
|
||||
| `ViewportTransformDisabled` | The viewport transform turned off (`setViewportTransformEnabled:NO`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:212` | `none`: Apple-private (no public header) |
|
||||
| `VertexAmplificationMode` | `setVertexAmplificationMode:value:` of a count (the value's set bits in mode 1, else the value) of 0, whose copies change from run to run on... | every device (Apple-private, Metal's answer not measured) | 2: `crates/metal2vulkan-runtime/src/apple_only.rs:219`, `crates/metal2vulkan-runtime/src/apple_only.rs:344` | `none`: Apple-private (no public header) |
|
||||
| `ProtectedContent` | Protected content | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:200` | `none`: Apple-private (no public header) |
|
||||
| `LineWidth` | A line width other than 1 (`setLineWidth:`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:202` | `none`: Apple-private (no public header) |
|
||||
| `ProvokingVertexMode` | `setProvokingVertexMode:` other than 0 | every device (Apple-private, not built) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:207` | `none`: Apple-private (no public header) |
|
||||
| `ViewportTransformDisabled` | The viewport transform turned off (`setViewportTransformEnabled:NO`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:204` | `none`: Apple-private (no public header) |
|
||||
| `VertexAmplificationMode` | `setVertexAmplificationMode:value:` | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:210` | `none`: Apple-private (no public header) |
|
||||
| `DepthCleared` | `setDepthCleared` | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:212` | `none`: Apple-private (no public header) |
|
||||
| `StencilCleared` | `setStencilCleared` | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:213` | `none`: Apple-private (no public header) |
|
||||
| `SurfaceClientDirection` | A texture over an IOSurface made with `kIOSurfaceClientDirection` (`newTextureWithDescriptor:iosurface:plane:` of such a surface) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417` | `none`: an IOSurface key in no public header |
|
||||
| `FillUnmeasured` | A texture fill (`fillTexture:level:slice:region:bytes:length:` or a color form) whose answer on Apple's GPU is unmeasured | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/blit_fill.rs:149` | `system`: Apple-private texture fills, which macOS system software encodes |
|
||||
|
||||
@@ -251,10 +253,10 @@ Generated at `871440aca`.
|
||||
| `DescriptorRangeExceeded` | A descriptor-form slot's window exceeds the descriptor range limit (Profile F) | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:652` | `app`: a buffer window past a device's descriptor range |
|
||||
| `TexelBufferTooLarge` | A texel buffer exceeds `maxTexelBufferElements` | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:891` | `rare`: a texture buffer past maxTexelBufferElements |
|
||||
| `HeapTooLarge` | The set-1 heap's elements (one per resident texture a handle can name, plus the null element) exceed the pipeline's heap capacity | at the device's limit | 7: `crates/metal2vulkan/src/bind/heap.rs:1014`, `crates/metal2vulkan/src/bind/heap.rs:1748` (+5) | `rare`: more resident textures than the pipeline's heap holds (bindless at scale) |
|
||||
| `TessellationFactorRange` | The tessellation factors a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`),... | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3566` | `rare`: tessellation factors past one storage descriptor |
|
||||
| `PatchIndexRange` | The patch indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3610` | `rare`: patch indices past one storage descriptor |
|
||||
| `ControlPointIndexRange` | The control-point indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3648` | `rare`: control-point indices past one storage descriptor |
|
||||
| `MissingStageInRegion` | The kernel reads the compute encoder's stage-in region (a `[[stage_in]]` attribute stepping by thread position, or `[[grid_origin]]` or... | at the device's limit | 1: `crates/metal2vulkan/src/bind/dispatch.rs:802` | `none`: a stage-in region never set, which Metal leaves undefined |
|
||||
| `TessellationFactorRange` | The tessellation factors a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`),... | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3556` | `rare`: tessellation factors past one storage descriptor |
|
||||
| `PatchIndexRange` | The patch indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3600` | `rare`: patch indices past one storage descriptor |
|
||||
| `ControlPointIndexRange` | The control-point indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3638` | `rare`: control-point indices past one storage descriptor |
|
||||
| `MissingStageInRegion` | The kernel reads the compute encoder's stage-in region (a `[[stage_in]]` attribute stepping by thread position, or `[[grid_origin]]` or... | at the device's limit | 1: `crates/metal2vulkan/src/bind/dispatch.rs:796` | `none`: a stage-in region never set, which Metal leaves undefined |
|
||||
| `UniformViewAliased` | A `device` buffer slot the pipeline reads through a uniform view (Profile F's per-stage storage-buffer fallback,... | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:606` | `rare`: Profile F's uniform-view fallback aliased by a write |
|
||||
| `MissingDeviceAddress` | A device-address slot received a buffer without a device address | at the device's limit | 1: `crates/metal2vulkan/src/bind/plan/slots.rs:133` | `rare`: a slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses |
|
||||
|
||||
@@ -311,14 +313,14 @@ Each refusal's sites, with the function that builds it.
|
||||
- `feature::DynamicCall`: `crates/metal2vulkan-air/src/canon/devirt.rs:1851 (site)`; `crates/metal2vulkan-air/src/canon/devirt.rs:447 (record)`; `crates/metal2vulkan-air/src/canon/devirt.rs:569 (unfolded_decl)`; `crates/metal2vulkan-air/src/canon/mod.rs:1332 (post_check)`; `crates/metal2vulkan-air/src/canon/prune.rs:128 (prune_in)`; `crates/metal2vulkan/src/bind/heap.rs:1731 (directory_bytes)`; `crates/metal2vulkan/src/bind/heap.rs:1761 (directory_bytes)`; `crates/metal2vulkan/src/bind/heap.rs:1774 (directory_bytes)`; `crates/metal2vulkan/src/lower/select.rs:892 (route_air)`
|
||||
- `feature::Linking`: `crates/metal2vulkan-air/src/canon/link.rs:249 (not_implemented)`; `crates/metal2vulkan-air/src/canon/mod.rs:1289 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:426 (specialize_dynamic)`
|
||||
- `feature::SimdWidth`: `crates/metal2vulkan/src/device/subgroup.rs:377 (subgroup_tier)`; `crates/metal2vulkan/src/lower/simd/mod.rs:382 (finish)`
|
||||
- `feature::LocalSize`: `crates/metal2vulkan/src/bind/dispatch.rs:481 (regions)`
|
||||
- `feature::LocalSize`: `crates/metal2vulkan/src/bind/dispatch.rs:475 (regions)`
|
||||
- `feature::IrreducibleConvergent`: `crates/metal2vulkan/src/structurize/irreducible.rs:108 (refuse_tangled)`
|
||||
- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:471 (plan_kernel)`
|
||||
- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:472 (plan_kernel)`
|
||||
- `feature::ComputeDerivatives`: `crates/metal2vulkan/src/bind/dispatch.rs:320 (check_local)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:486 (select_derivative)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:495 (select_derivative)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:499 (select_derivative)`
|
||||
- `feature::QuadOperations`: `crates/metal2vulkan/src/device/subgroup.rs:371 (subgroup_tier)`; `crates/metal2vulkan/src/device/subgroup.rs:405 (subgroup_tier)`
|
||||
- `feature::SimdgroupMatrix`: `crates/metal2vulkan/src/lower/simd/matrix.rs:83 (not_implemented)`
|
||||
- `feature::ArgumentBufferPointers`: `crates/metal2vulkan/src/device/metal.rs:236 (unsupported_features)`
|
||||
- `feature::ArgumentBufferTextures`: `crates/metal2vulkan-runtime/src/families/features.rs:1621 (tier2)`; `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036 (create_set_layout)`; `crates/metal2vulkan-runtime/src/resource_ids.rs:1097 (check_capacity)`; `crates/metal2vulkan/src/bind/heap.rs:1325 (array)`; `crates/metal2vulkan/src/bind/heap.rs:415 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:423 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:467 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:472 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:485 (member_view)`; `crates/metal2vulkan/src/lower/access/handle.rs:708 (select)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2362 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:308 (select_sampling)`; `crates/metal2vulkan/src/lower/sampler/select.rs:469 (select_heap_sampling)`; `crates/metal2vulkan/src/lower/texture/atomic.rs:140 (select)`; `crates/metal2vulkan/src/lower/texture/slot.rs:465 (declare_heap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:534 (declare_heap)`; `crates/metal2vulkan/src/pipeline/link.rs:977 (heap_set)`
|
||||
- `feature::ArgumentBufferTextures`: `crates/metal2vulkan-runtime/src/families/features.rs:1647 (tier2)`; `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036 (create_set_layout)`; `crates/metal2vulkan-runtime/src/resource_ids.rs:1097 (check_capacity)`; `crates/metal2vulkan/src/bind/heap.rs:1325 (array)`; `crates/metal2vulkan/src/bind/heap.rs:415 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:423 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:467 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:472 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:485 (member_view)`; `crates/metal2vulkan/src/lower/access/handle.rs:708 (select)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2362 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:308 (select_sampling)`; `crates/metal2vulkan/src/lower/sampler/select.rs:469 (select_heap_sampling)`; `crates/metal2vulkan/src/lower/texture/atomic.rs:140 (select)`; `crates/metal2vulkan/src/lower/texture/slot.rs:465 (declare_heap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:534 (declare_heap)`; `crates/metal2vulkan/src/pipeline/link.rs:977 (heap_set)`
|
||||
- `feature::ArgumentBufferObjects`: `crates/metal2vulkan/src/lower/access/encode.rs:445 (select_command)`; `crates/metal2vulkan/src/lower/access/encode.rs:495 (select_command)`; `crates/metal2vulkan/src/lower/access/encode.rs:623 (select_command)`; `crates/metal2vulkan/src/memory/provenance.rs:2185 (classify)`; `crates/metal2vulkan/src/memory/provenance.rs:2547 (access)`
|
||||
- `feature::DereferenceLoadedPointer`: `crates/metal2vulkan/src/lower/access/dynamic.rs:407 (plan_misses)`; `crates/metal2vulkan/src/lower/access/local.rs:774 (access_ptr)`; `crates/metal2vulkan/src/lower/access/local.rs:796 (threadgroup_constant_refusal)`; `crates/metal2vulkan/src/memory/plan.rs:593 (analyze)`
|
||||
- `feature::PointerToInteger`: `crates/metal2vulkan/src/lower/access/dynamic.rs:347 (require_addresses)`
|
||||
@@ -330,10 +332,10 @@ Each refusal's sites, with the function that builds it.
|
||||
- `feature::Int64Atomics`: `crates/metal2vulkan/src/lower/access/atomic.rs:624 (select)`; `crates/metal2vulkan/src/lower/access/atomic.rs:633 (select)`
|
||||
- `feature::ImageAtomics`: `crates/metal2vulkan-runtime/src/families/formats.rs:464 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:468 (atomic_gap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:900 (atomic_format)`
|
||||
- `feature::DescriptorCount`: `crates/metal2vulkan/src/lower/access/mod.rs:1684 (accept_placement)`; `crates/metal2vulkan/src/lower/select.rs:1641 (finish)`; `crates/metal2vulkan/src/pipeline/link.rs:1135 (limit_error)`
|
||||
- `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3571 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3615 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3653 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:658 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)`
|
||||
- `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3561 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3605 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3643 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:658 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)`
|
||||
- `feature::Int64Arithmetic`: `crates/metal2vulkan/src/lower/arith/legal.rs:582 (check_scalar)`; `crates/metal2vulkan/src/lower/select.rs:1133 (selector_form)`
|
||||
- `feature::Float64Arithmetic`: `crates/metal2vulkan/src/device/metal.rs:230 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/legal.rs:587 (check_scalar)`
|
||||
- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:462 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:469 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:484 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:541 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:633 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2087 (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:519 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:582 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:614 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:851 (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:269 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:297 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:343 (copy_unit)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:346 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:526 (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs:1598 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1628 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:227 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:271 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:291 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:306 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:353 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:392 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:474 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:508 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:522 (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs:544 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:670 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:787 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:907 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:2155 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1031 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1369 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1709 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1802 (attachment_format)`; `crates/metal2vulkan-runtime/src/resolve.rs:409 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:616 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:177 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:205 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:296 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:644 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:651 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2000 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3540 (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:498 (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:534 (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1810 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:115 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:278 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:384 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:114 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:380 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:393 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:400 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:410 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:420 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:285 (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:184 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1134 (plain_texture)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1814 (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs:193 (require_filter_features)`; `crates/metal2vulkan/src/bind/plan/resources.rs:959 (plain_texture)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:304 (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:328 (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs:259 (shadow_copy_in_module)`; `crates/metal2vulkan/src/bind/unused_bits.rs:657 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs:160 (select_param)`; `crates/metal2vulkan/src/lower/fraLine truncated
|
||||
- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:462 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:469 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:484 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:541 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:633 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2087 (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:519 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:582 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:614 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:851 (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:269 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:297 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:343 (copy_unit)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:346 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:526 (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs:1624 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1628 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:227 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:271 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:291 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:306 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:353 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:392 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:474 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:508 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:522 (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs:544 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:670 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:787 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:907 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:2155 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1024 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1362 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1698 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1791 (attachment_format)`; `crates/metal2vulkan-runtime/src/resolve.rs:392 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:482 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:177 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:205 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:296 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:644 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:651 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:1999 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3539 (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:498 (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:534 (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1810 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:115 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:278 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:384 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:114 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:380 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:393 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:400 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:410 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:420 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:285 (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:184 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1134 (plain_texture)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1814 (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs:193 (require_filter_features)`; `crates/metal2vulkan/src/bind/plan/resources.rs:959 (plain_texture)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:304 (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:328 (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs:259 (shadow_copy_in_module)`; `crates/metal2vulkan/src/bind/unused_bits.rs:657 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs:160 (select_param)`; `crates/metal2vulkan/src/lower/fraLine truncated
|
||||
- `feature::DivergentImplicitLod`: `crates/metal2vulkan/src/lower/sampler/select.rs:352 (select_sampling)`
|
||||
- `feature::ImplicitLodOutsideFragment`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:136 (query_min_level)`; `crates/metal2vulkan/src/lower/sampler/select.rs:229 (query_level_measured)`; `crates/metal2vulkan/src/lower/sampler/select.rs:255 (query_min_level)`
|
||||
- `feature::MinLodClamp`: `crates/metal2vulkan/src/lower/sampler/select.rs:1572 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:973 (min_lod)`
|
||||
@@ -349,45 +351,45 @@ Each refusal's sites, with the function that builds it.
|
||||
- `feature::PixelSamplerCompare`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115 (lowered)`
|
||||
- `feature::TexelBuffer`: `crates/metal2vulkan/src/bind/instantiate.rs:879 (texel_ranges)`; `crates/metal2vulkan/src/bind/instantiate.rs:885 (texel_ranges)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1147 (plain_texture)`
|
||||
- `feature::RasterOrderGroups`: `crates/metal2vulkan/src/device/metal.rs:242 (unsupported_features)`; `crates/metal2vulkan/src/lower/fragment/rog.rs:151 (mode)`; `crates/metal2vulkan/src/lower/fragment/rog.rs:172 (mode)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:158 (finish)`
|
||||
- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1007 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5727 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:116 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:143 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:514 (planes_merge)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:190 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/graphics.rs:1453 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:1490 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:1509 (plan)`; `crates/metal2vulkan/src/bind/sample_planes.rs:477 (finish)`; `crates/metal2vulkan/src/device/metal.rs:252 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1198 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1216 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1230 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1273 (packed16)`; `crates/metal2vulkan/src/lower/fragment/color.rs:215 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:279 (unordered)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:195 (not_implemented)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:272 (depth_test_form)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:318 (stencil_test_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1024 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1114 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1151 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1716 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:749 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)`
|
||||
- `feature::PrimitiveId`: `crates/metal2vulkan-runtime/src/families/features.rs:1115 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3131 (finish)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:240 (check_primitive_id)`
|
||||
- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:3912 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1281 (own_index_store)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:718 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:258 (vertex_amplification)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:228 (control_plan)`
|
||||
- `feature::LayeredRendering`: `crates/metal2vulkan-runtime/src/render_pass.rs:1669 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1092 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:778 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:797 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1282 (own_index_store)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:150 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:172 (refused)`
|
||||
- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1008 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5709 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:116 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:143 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:514 (planes_merge)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:190 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/sample_planes.rs:477 (finish)`; `crates/metal2vulkan/src/device/metal.rs:252 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1198 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1216 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1230 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1273 (packed16)`; `crates/metal2vulkan/src/lower/fragment/color.rs:215 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:279 (unordered)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:195 (not_implemented)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:272 (depth_test_form)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:318 (stencil_test_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1024 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1114 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1151 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1718 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:749 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)`
|
||||
- `feature::PrimitiveId`: `crates/metal2vulkan-runtime/src/families/features.rs:1116 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3131 (finish)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:240 (check_primitive_id)`
|
||||
- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:3902 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1298 (own_index_store)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:718 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:258 (vertex_amplification)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:228 (control_plan)`
|
||||
- `feature::LayeredRendering`: `crates/metal2vulkan-runtime/src/render_pass.rs:1658 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1078 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:778 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:797 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1299 (own_index_store)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:150 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:172 (refused)`
|
||||
- `feature::ClipDistance`: `crates/metal2vulkan/src/lower/mesh/mod.rs:934 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:942 (select)`
|
||||
- `feature::DualSourceBlending`: `crates/metal2vulkan-runtime/src/families/formats.rs:386 (answers)`; `crates/metal2vulkan/src/metal/state.rs:37 (blend_factor)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1147 (check_outputs)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:463 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:538 (rotated_blend)`
|
||||
- `feature::Barycentrics`: `crates/metal2vulkan/src/device/metal.rs:263 (unsupported_features)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1876 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:742 (param)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:148 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:170 (refused)`
|
||||
- `feature::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1102 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2608 (shadow_stencil_words)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:157 (device_form)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:168 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:55 (shadow_stencil)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:73 (shadow_stencil)`
|
||||
- `feature::SampleRateShading`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:835 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:837 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:919 (sample_invocations)`
|
||||
- `feature::PixelCoverageAtSampleRate`: `crates/metal2vulkan/src/lower/fragment/coverage.rs:291 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:754 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:870 (sample_invocations)`
|
||||
- `feature::DualSourceBlending`: `crates/metal2vulkan-runtime/src/families/formats.rs:386 (answers)`; `crates/metal2vulkan/src/metal/state.rs:37 (blend_factor)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1144 (check_outputs)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:463 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:538 (rotated_blend)`
|
||||
- `feature::Barycentrics`: `crates/metal2vulkan/src/device/metal.rs:263 (unsupported_features)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1895 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:742 (param)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:148 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:170 (refused)`
|
||||
- `feature::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1103 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2611 (shadow_stencil_words)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:157 (device_form)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:168 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:55 (shadow_stencil)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:73 (shadow_stencil)`
|
||||
- `feature::SampleRateShading`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:832 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:834 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:916 (sample_invocations)`
|
||||
- `feature::PixelCoverageAtSampleRate`: `crates/metal2vulkan/src/lower/fragment/coverage.rs:296 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:754 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:867 (sample_invocations)`
|
||||
- `feature::InterfaceComponents`: `crates/metal2vulkan/src/pipeline/compile/color_group.rs:202 (refusal)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:301 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:409 (assign)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:90 (limit_error)`
|
||||
- `feature::UnmatchedVarying`: `crates/metal2vulkan/src/pipeline/link/varyings.rs:318 (mesh_fragment)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:537 (varyings)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:548 (varyings)`
|
||||
- `feature::KernelStageIn`: `crates/metal2vulkan-runtime/src/indirect_execute.rs:350 (record)`; `crates/metal2vulkan/src/bind/dispatch.rs:877 (instantiate)`; `crates/metal2vulkan/src/lower/stage_io/stage_in.rs:133 (select)`
|
||||
- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1256 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1347 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:3769 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1457 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1750 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:799 (param)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:150 (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:489 (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs:219 (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:212 (control_plan)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:292 (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:316 (push_offset)`
|
||||
- `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs:1536 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:2981 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:499 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:538 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:572 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:95 (records)`
|
||||
- `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:521 (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs:237 (tile_memory)`; `crates/metal2vulkan/src/lower/access/tile.rs:151 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:275 (tile_shading)`; `crates/metal2vulkan/src/pipeline/compile/api.rs:690 (tile_pipeline)`
|
||||
- `feature::Imageblocks`: `crates/metal2vulkan/src/lower/access/imageblock.rs:98 (imageblocks)`; `crates/metal2vulkan/src/lower/access/mod.rs:908 (select_param)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:103 (require)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:85 (not_implemented)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2357 (select)`; `crates/metal2vulkan/src/lower/texture/slice.rs:139 (imageblocks)`; `crates/metal2vulkan/src/pipeline/link/imageblock.rs:46 (fragment_imageblock)`
|
||||
- `feature::KernelStageIn`: `crates/metal2vulkan-runtime/src/indirect_execute.rs:350 (record)`; `crates/metal2vulkan/src/bind/dispatch.rs:871 (instantiate)`; `crates/metal2vulkan/src/lower/stage_io/stage_in.rs:133 (select)`
|
||||
- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1256 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1347 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:3759 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1474 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1767 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:816 (param)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:150 (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:489 (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs:219 (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:212 (control_plan)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:292 (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:316 (push_offset)`
|
||||
- `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs:1541 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:2971 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:499 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:538 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:572 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:95 (records)`
|
||||
- `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:521 (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs:237 (tile_memory)`; `crates/metal2vulkan/src/lower/access/tile.rs:151 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:275 (tile_shading)`; `crates/metal2vulkan/src/pipeline/compile/api.rs:687 (tile_pipeline)`
|
||||
- `feature::Imageblocks`: `crates/metal2vulkan/src/lower/access/imageblock.rs:98 (imageblocks)`; `crates/metal2vulkan/src/lower/access/mod.rs:908 (select_param)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:104 (require)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:412 (reach)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:554 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:578 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:86 (not_implemented)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2352 (select)`; `crates/metal2vulkan/src/lower/texture/slice.rs:139 (imageblocks)`; `crates/metal2vulkan/src/pipeline/link/imageblock.rs:50 (fragment_imageblock)`
|
||||
- `feature::RayTracing`: `crates/metal2vulkan/src/bind/acceleration.rs:202 (instance_record)`; `crates/metal2vulkan/src/bind/acceleration.rs:216 (instance_record)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1087 (primitive_data_read)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1202 (instance_count)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1245 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1257 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1282 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1297 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1312 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:344 (slot_of)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:385 (select_param)`; `crates/metal2vulkan/src/lower/select.rs:899 (route_air)`
|
||||
- `feature::Tensors`: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:903 (route_air)`
|
||||
- `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:925 (select)`
|
||||
- `feature::GpuEncodedIndirectCommands`: `crates/metal2vulkan/src/bind/replay.rs:556 (preprocess)`; `crates/metal2vulkan/src/bind/replay.rs:796 (replay_preprocess_module)`; `crates/metal2vulkan/src/bind/replay/draws.rs:280 (draw_replay_preprocess)`; `crates/metal2vulkan/src/bind/replay/draws.rs:482 (draw_replay_module)`; `crates/metal2vulkan/src/bind/replay/flat.rs:247 (flat_dispatch_module)`; `crates/metal2vulkan/src/bind/replay/merged.rs:242 (draw_merge_module)`; `crates/metal2vulkan/src/lower/access/encode.rs:393 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:409 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:526 (select_command)`; `crates/metal2vulkan/src/lower/access/mod.rs:1539 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1562 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1565 (plan_replay)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2632 (merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2688 (finish_merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:455 (param)`; `crates/metal2vulkan/src/pipeline/compile.rs:2124 (plan_one)`; `crates/metal2vulkan/src/pipeline/compile.rs:2129 (plan_one)`
|
||||
- `feature::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:916 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)`
|
||||
- `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:930 (select)`
|
||||
- `feature::GpuEncodedIndirectCommands`: `crates/metal2vulkan/src/bind/replay.rs:556 (preprocess)`; `crates/metal2vulkan/src/bind/replay.rs:796 (replay_preprocess_module)`; `crates/metal2vulkan/src/bind/replay/draws.rs:280 (draw_replay_preprocess)`; `crates/metal2vulkan/src/bind/replay/draws.rs:482 (draw_replay_module)`; `crates/metal2vulkan/src/bind/replay/flat.rs:247 (flat_dispatch_module)`; `crates/metal2vulkan/src/bind/replay/merged.rs:242 (draw_merge_module)`; `crates/metal2vulkan/src/lower/access/encode.rs:393 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:409 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:526 (select_command)`; `crates/metal2vulkan/src/lower/access/mod.rs:1539 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1562 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1565 (plan_replay)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2632 (merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2688 (finish_merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:455 (param)`; `crates/metal2vulkan/src/pipeline/compile.rs:2110 (plan_one)`; `crates/metal2vulkan/src/pipeline/compile.rs:2115 (plan_one)`
|
||||
- `feature::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:915 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)`
|
||||
- `feature::Constant`: `crates/metal2vulkan-air/src/bitcode/constants.rs:210 (record)`; `crates/metal2vulkan-air/src/bitcode/constants.rs:268 (record)`; `crates/metal2vulkan/src/error/mod.rs:255 (from)`
|
||||
- `feature::Attribute`: `crates/metal2vulkan-air/src/bitcode/attrs.rs:493 (known)`; `crates/metal2vulkan/src/error/mod.rs:256 (from)`
|
||||
- `feature::BitcodeRecord`: `crates/metal2vulkan-air/src/bitcode/attrs.rs:337 (decode_lists)`; `crates/metal2vulkan-air/src/bitcode/function.rs:572 (symtab)`; `crates/metal2vulkan-air/src/bitcode/metadata.rs:130 (decode)`; `crates/metal2vulkan-air/src/bitcode/metadata.rs:157 (decode)`; `crates/metal2vulkan-air/src/bitcode/module.rs:727 (check_bodies)`; `crates/metal2vulkan-air/src/bitcode/module.rs:872 (symtab)`; `crates/metal2vulkan/src/error/mod.rs:257 (from)`
|
||||
- `feature::SyncScope`: `crates/metal2vulkan-air/src/bitcode/function.rs:1255 (atomic)`; `crates/metal2vulkan/src/error/mod.rs:258 (from)`
|
||||
- `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1686 (simd)`; `crates/metal2vulkan/src/lower/simd/mod.rs:407 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:466 (full_quads)`; `crates/metal2vulkan/src/lower/simd/mod.rs:990 (select_group)`
|
||||
- `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1712 (simd)`; `crates/metal2vulkan/src/lower/simd/mod.rs:407 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:466 (full_quads)`; `crates/metal2vulkan/src/lower/simd/mod.rs:990 (select_group)`
|
||||
- `feature::DirectCall`: `crates/metal2vulkan-air/src/canon/mod.rs:1319 (post_check)`
|
||||
- `feature::WideSwitchLiteral`: `crates/metal2vulkan/src/structurize/emit.rs:207 (check_tree)`
|
||||
- `feature::Lowering`: `crates/metal2vulkan/src/bind/plan/resources.rs:762 (level_views)`; `crates/metal2vulkan/src/lower/access/handle.rs:1062 (texture_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:1073 (sampler_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:318 (domain_kind)`; `crates/metal2vulkan/src/lower/access/imageblock.rs:175 (operand)`; `crates/metal2vulkan/src/lower/access/mod.rs:571 (not_lowered)`; `crates/metal2vulkan/src/lower/access/pulled.rs:76 (share)`; `crates/metal2vulkan/src/lower/arith/legal.rs:53 (not_lowered)`; `crates/metal2vulkan/src/lower/dispatch.rs:113 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:144 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:653 (plan)`; `crates/metal2vulkan/src/lower/fragment/mod.rs:123 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:168 (finish)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:147 (not_lowered)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:126 (not_lowered)`; `crates/metal2vulkan/src/lower/sampler/mod.rs:212 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:30 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:829 (not_lowered)`; `crates/metal2vulkan/src/lower/select.rs:918 (route_air)`; `crates/metal2vulkan/src/lower/simd/mod.rs:136 (not_lowered)`; `crates/metal2vulkan/src/lower/simd/mod.rs:747 (select_param)`; `crates/metal2vulkan/src/lower/simd/workgroup.rs:353 (check)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:96 (not_lowered)`; `crates/metal2vulkan/src/lower/stage_io/mod.rs:177 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:72 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:269 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:310 (select)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:146 (not_lowered)`; `crates/metal2vulkan/src/lower/texture/mod.rs:180 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3670 (select_write)`; `crates/metal2vulkan/src/memory/alloca.rs:54 (not_lowered)`; `crates/metal2vulkan/src/memory/leaf.rs:183 (not_lowered)`; `crates/metal2vulkan/src/memory/plan.rs:490 (not_lowered)`; `crates/metal2vulkan/src/memory/provenance.rs:665 (not_lowered)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:96 (patch_fetch_projection)`
|
||||
- `feature::Lowering`: `crates/metal2vulkan/src/bind/plan/resources.rs:762 (level_views)`; `crates/metal2vulkan/src/lower/access/handle.rs:1062 (texture_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:1073 (sampler_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:318 (domain_kind)`; `crates/metal2vulkan/src/lower/access/imageblock.rs:175 (operand)`; `crates/metal2vulkan/src/lower/access/mod.rs:571 (not_lowered)`; `crates/metal2vulkan/src/lower/access/pulled.rs:76 (share)`; `crates/metal2vulkan/src/lower/arith/legal.rs:53 (not_lowered)`; `crates/metal2vulkan/src/lower/dispatch.rs:114 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:144 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:653 (plan)`; `crates/metal2vulkan/src/lower/fragment/mod.rs:123 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:168 (finish)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:147 (not_lowered)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:126 (not_lowered)`; `crates/metal2vulkan/src/lower/sampler/mod.rs:212 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:30 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:829 (not_lowered)`; `crates/metal2vulkan/src/lower/select.rs:918 (route_air)`; `crates/metal2vulkan/src/lower/simd/mod.rs:136 (not_lowered)`; `crates/metal2vulkan/src/lower/simd/mod.rs:747 (select_param)`; `crates/metal2vulkan/src/lower/simd/workgroup.rs:353 (check)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:96 (not_lowered)`; `crates/metal2vulkan/src/lower/stage_io/mod.rs:177 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:72 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:269 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:310 (select)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:146 (not_lowered)`; `crates/metal2vulkan/src/lower/texture/mod.rs:180 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3665 (select_write)`; `crates/metal2vulkan/src/memory/alloca.rs:54 (not_lowered)`; `crates/metal2vulkan/src/memory/leaf.rs:183 (not_lowered)`; `crates/metal2vulkan/src/memory/plan.rs:490 (not_lowered)`; `crates/metal2vulkan/src/memory/provenance.rs:665 (not_lowered)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:96 (patch_fetch_projection)`
|
||||
- `feature::SamplerAddressMode`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:176`; `crates/metal2vulkan/src/metal/sampler.rs:251 (check_sampler)`
|
||||
- `feature::AlphaToOne`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:282 (graphics_state)`
|
||||
- `feature::StageStoresAndAtomics`: `crates/metal2vulkan/src/lower/access/tile_memory.rs:72 (written)`
|
||||
- `feature::FunctionConstantArgument`: `crates/metal2vulkan-air/src/canon/interface.rs:899 (absent_values)`; `crates/metal2vulkan/src/lower/access/absent.rs:100 (require)`
|
||||
- `feature::SamplerBicubicFilter`: `crates/metal2vulkan/src/bind/heap.rs:997 (new)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1876 (bicubic_texels)`; `crates/metal2vulkan/src/bind/plan/slots.rs:503 (cubic_variant)`; `crates/metal2vulkan/src/lower/sampler/bicubic.rs:120 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:35 (bicubic_refused)`
|
||||
- `feature::GroupCount`: `crates/metal2vulkan/src/bind/dispatch.rs:379 (product)`; `crates/metal2vulkan/src/bind/dispatch.rs:461`; `crates/metal2vulkan/src/bind/dispatch.rs:959 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3185 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3236 (emulated_draw)`
|
||||
- `feature::GroupCount`: `crates/metal2vulkan/src/bind/dispatch.rs:379 (product)`; `crates/metal2vulkan/src/bind/dispatch.rs:455`; `crates/metal2vulkan/src/bind/dispatch.rs:953 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3175 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3226 (emulated_draw)`
|
||||
- `feature::IntersectionFunctionTable`: `crates/metal2vulkan/src/bind/acceleration.rs:177 (geometry_table_offset)`; `crates/metal2vulkan/src/bind/acceleration.rs:183 (geometry_table_offset)`; `crates/metal2vulkan/src/bind/acceleration.rs:188 (geometry_table_offset)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1222 (null_table)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1251 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1272 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:406 (table_of)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:422 (select_table)`; `crates/metal2vulkan/src/lower/select.rs:885 (route_air)`
|
||||
- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2036 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1008 (uniform_blend)`
|
||||
- `feature::RasterSampleCount`: `crates/metal2vulkan-runtime/src/families/limits.rs:1059 (sample_count)`; `crates/metal2vulkan/src/pipeline/graphics.rs:555 (sample_count_properties)`
|
||||
- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2036 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1005 (uniform_blend)`
|
||||
- `feature::RasterSampleCount`: `crates/metal2vulkan-runtime/src/families/limits.rs:1059 (sample_count)`; `crates/metal2vulkan/src/pipeline/graphics.rs:545 (sample_count_properties)`
|
||||
- `feature::TriangleFillLines`: `crates/metal2vulkan/src/metal/state.rs:347 (polygon_mode)`
|
||||
- `feature::DepthClipClamp`: `crates/metal2vulkan/src/metal/state.rs:363 (depth_clamp_enable)`
|
||||
- `feature::DepthBiasClamp`: `crates/metal2vulkan/src/metal/state.rs:463 (depth_bias)`
|
||||
@@ -395,94 +397,94 @@ Each refusal's sites, with the function that builds it.
|
||||
- `feature::SparseTexture`: `crates/metal2vulkan/src/bind/plan/slots.rs:583 (check_sparse_textures)`; `crates/metal2vulkan/src/bind/plan/slots.rs:607 (check_sparse_textures)`
|
||||
- `feature::TextureSize`: `crates/metal2vulkan-runtime/src/image_plan.rs:1196 (check_image_limits)`
|
||||
- `feature::TextureSampleCount`: `crates/metal2vulkan-runtime/src/image_plan.rs:1244 (check_image_limits)`; `crates/metal2vulkan-runtime/src/image_plan.rs:598 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:608 (plan_held)`
|
||||
- `feature::TextureView`: `crates/metal2vulkan-runtime/src/binding_view.rs:156 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:5032 (view)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:1420 (make_second_twin)`; `crates/metal2vulkan-runtime/src/texture/view_shadow.rs:298 (apart_refusal)`; `crates/metal2vulkan-runtime/src/view_plan.rs:431 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:481 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:503 (check_view)`
|
||||
- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:980 (may_view)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1102 (plain_texture)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2587 (select_one)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3396 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3743 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)`
|
||||
- `feature::TextureView`: `crates/metal2vulkan-runtime/src/binding_view.rs:156 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:5031 (view)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:1420 (make_second_twin)`; `crates/metal2vulkan-runtime/src/texture/view_shadow.rs:298 (apart_refusal)`; `crates/metal2vulkan-runtime/src/view_plan.rs:431 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:481 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:503 (check_view)`
|
||||
- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:979 (may_view)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1102 (plain_texture)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2587 (select_one)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3391 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3738 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)`
|
||||
- `feature::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1787 (mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37 (pick_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:262 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:270 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:275 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:304 (plan_mipmaps)`; `crates/metal2vulkan/src/bind/mipmap_filter.rs:973 (mipmap_filter_module)`
|
||||
- `feature::HostMemory`: `crates/metal2vulkan-runtime/src/host_memory.rs:393 (not_importable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:433 (refuse_unwritable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:652 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:657 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:675 (new)`
|
||||
- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2542 (gpu_times)`
|
||||
- `feature::CountingVisibility`: `crates/metal2vulkan-runtime/src/visibility.rs:452 (check_mode)`
|
||||
- `feature::ViewFormatReinterpretation`: `crates/metal2vulkan-runtime/src/view_plan.rs:568 (reinterpretation_refused)`
|
||||
- `feature::SeparateMultisampledDepthStencil`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188 (sampled_candidate)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294 (by_draws)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:336 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:376 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:777 (plan)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:658 (nan_write)`; `crates/metal2vulkan-runtime/src/texture/signed_depth.rs:191 (sample_strip)`
|
||||
- `feature::PixelCoverage`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:774 (split_pixel_fragments)`
|
||||
- `feature::CentroidVarying`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:792 (split_pixel_fragments)`
|
||||
- `feature::SeparateMultisampledDepthStencil`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188 (sampled_candidate)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294 (by_draws)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:336 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:376 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:777 (plan)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:651 (nan_write)`; `crates/metal2vulkan-runtime/src/texture/signed_depth.rs:191 (sample_strip)`
|
||||
- `feature::PixelCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1214 (state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:771 (split_pixel_fragments)`
|
||||
- `feature::CentroidVarying`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:789 (split_pixel_fragments)`
|
||||
- `feature::PrivateMemory`: `crates/metal2vulkan/src/lower/select.rs:1171 (function_storage)`
|
||||
- `feature::SparseTextures`: `crates/metal2vulkan-runtime/src/sparse/texture.rs:32 (sparse_refusal)`
|
||||
- `feature::SparseMapping`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:466 (splits_a_unit)`
|
||||
- `feature::TimelineSemaphores`: `crates/metal2vulkan-runtime/src/device/create.rs:1053 (timeline_difference)`
|
||||
- `feature::Reflection`: `crates/metal2vulkan/src/bind/argument_buffer.rs:626 (unmeasured)`; `crates/metal2vulkan/src/reflection/derive.rs:178 (specialized_reads)`; `crates/metal2vulkan/src/reflection/derive.rs:212 (read_attributes)`; `crates/metal2vulkan/src/reflection/derive.rs:239 (gap_at)`; `crates/metal2vulkan/src/reflection/function.rs:172 (unmeasured)`; `crates/metal2vulkan/src/reflection/function.rs:366 (attribute)`; `crates/metal2vulkan/src/reflection/function.rs:437 (module_constants)`; `crates/metal2vulkan/src/reflection/linked.rs:125 (function)`; `crates/metal2vulkan/src/reflection/mod.rs:249 (stage)`
|
||||
- `feature::HeapTextureTiling`: `crates/metal2vulkan-runtime/src/texture/heap.rs:565 (tiling_refusal)`
|
||||
- `feature::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render_state.rs:1200 (depth_ranges_refused)`
|
||||
- `feature::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render_state.rs:1186 (depth_ranges_refused)`
|
||||
- `feature::UndeclaredTextureUsage`: `crates/metal2vulkan-runtime/src/binding_view.rs:141 (binding_view)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:72 (refused)`
|
||||
- `feature::RenderTargetSize`: `crates/metal2vulkan-runtime/src/render_pass.rs:1271 (framebuffer_fits)`
|
||||
- `feature::RenderTargetSize`: `crates/metal2vulkan-runtime/src/render_pass.rs:1264 (framebuffer_fits)`
|
||||
- `feature::IndirectRenderState`: `crates/metal2vulkan/src/lower/access/encode.rs:567 (select_command)`
|
||||
- `feature::GlobalBuiltinInFragment`: `crates/metal2vulkan/src/lower/select.rs:912 (route_air)`
|
||||
- `feature::PrivateRenderState`: `crates/metal2vulkan/src/bind/heap.rs:1300 (array)`; `crates/metal2vulkan/src/bind/plan/resources.rs:887 (write_rounding)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2710 (clamps_reference)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3358 (alpha_test_refused)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2907 (mode_rounded_write)`; `crates/metal2vulkan/src/pipeline/private_state.rs:378 (logic_operation)`; `crates/metal2vulkan/src/pipeline/private_state.rs:97 (refused)`
|
||||
- `feature::ExtendedRangeBlend`: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305 (refused)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1553 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1556 (plan)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs:153 (plan)`
|
||||
- `feature::PrivateRenderState`: `crates/metal2vulkan/src/bind/heap.rs:1300 (array)`; `crates/metal2vulkan/src/bind/plan/resources.rs:887 (write_rounding)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2902 (mode_rounded_write)`; `crates/metal2vulkan/src/pipeline/private_state.rs:46 (refused)`
|
||||
- `feature::ExtendedRangeBlend`: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305 (refused)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1555 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1558 (plan)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs:153 (plan)`
|
||||
- `feature::TileReach`: `crates/metal2vulkan/src/bind/tile_reach.rs:270 (tile_reach_module)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2469 (capture)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2495 (capture)`
|
||||
- `feature::CommandPredication`: `crates/metal2vulkan/src/bind/replay/predication.rs:414 (predication_step_module)`
|
||||
- `feature::ProgramScopeBinding`: `crates/metal2vulkan-air/src/abi/module.rs:77 (decode)`; `crates/metal2vulkan/src/error/mod.rs:267 (from)`
|
||||
- `feature::SeqCstFence`: `crates/metal2vulkan/src/lower/sync/barrier.rs:443 (require_seq_cst)`
|
||||
- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs:163 (check_depth_view)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:1554 (view_usage)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1499 (compile_error)`; `crates/metal2vulkan-runtime/src/texture.rs:1445 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2174 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:2986 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:4030 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5503 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)`
|
||||
- `feature::PostDepthCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1208 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:779 (param)`
|
||||
- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs:163 (check_depth_view)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:1554 (view_usage)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1499 (compile_error)`; `crates/metal2vulkan-runtime/src/texture.rs:1444 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2173 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:2985 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:4029 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5512 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)`
|
||||
- `gap::ResourceHeap`: `crates/metal2vulkan-runtime/src/binding.rs:2016 (descriptor)`
|
||||
- `gap::SparseHeaps`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:458 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1629 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4722 (make_aliasable)`
|
||||
- `gap::SparseTileMaps`: `crates/metal2vulkan-runtime/src/binding.rs:553 (slot_tile_map)`; `crates/metal2vulkan-runtime/src/sparse/texture.rs:30 (sparse_refusal)`; `crates/metal2vulkan-runtime/src/texture.rs:1662 (plan_sparse_texture)`
|
||||
- `gap::SparseHeaps`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:458 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1628 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4721 (make_aliasable)`
|
||||
- `gap::SparseTileMaps`: `crates/metal2vulkan-runtime/src/binding.rs:553 (slot_tile_map)`; `crates/metal2vulkan-runtime/src/sparse/texture.rs:30 (sparse_refusal)`; `crates/metal2vulkan-runtime/src/texture.rs:1661 (plan_sparse_texture)`
|
||||
- `gap::HeapPastMaxBufferSize`: `crates/metal2vulkan-runtime/src/heap.rs:694 (heap_size)`
|
||||
- `gap::HeapTextureAlignment`: `crates/metal2vulkan-runtime/src/texture/heap.rs:980 (check_heap_base)`
|
||||
- `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1418 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1425 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1919 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2132 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:489 (memory_refusal)`
|
||||
- `gap::FunctionTablePastMaxBufferLength`: `crates/metal2vulkan-runtime/src/function_table.rs:622 (past_limit)`
|
||||
- `gap::IndirectCommandBufferPastMaxBufferLength`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:516 (new_indirect_command_buffer)`
|
||||
- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1084 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1163 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3638 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:511 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1506 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:6997 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7360 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7765 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8214 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1086 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1989 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2032 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2827 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:375 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:434 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:449 (execute_indirect_range)`
|
||||
- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1084 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1163 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3638 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:511 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1506 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:6979 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7342 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7747 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8196 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1086 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1989 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2032 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2827 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:375 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:434 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:449 (execute_indirect_range)`
|
||||
- `gap::IndirectImageblockSize`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:2757 (set_imageblock_size)`
|
||||
- `gap::CommandReplay`: `crates/metal2vulkan-runtime/src/binding.rs:694 (bind)`; `crates/metal2vulkan-runtime/src/binding.rs:697 (bind)`
|
||||
- `gap::RenderAttachments`: `crates/metal2vulkan-runtime/src/binding.rs:1839 (unexpected)`
|
||||
- `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1842 (unexpected)`
|
||||
- `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1156 (of)`
|
||||
- `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1147 (of)`
|
||||
- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:684 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:796 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1131 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2086 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5773 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7454 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:517 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1313 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1676 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1730 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1791 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2024 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1035 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1103 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1150 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1167 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1232 (destination)`
|
||||
- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:684 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:796 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:197 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1131 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2086 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5755 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7436 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:517 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1306 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1665 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1719 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1780 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2013 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1010 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1027 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1091 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:901 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:969 (color_copy)`
|
||||
- `gap::TexelsPastBufferLength`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261 (refusal_error)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105 (surface_depth_twin)`
|
||||
- `gap::OverlappingSurfaceRows`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263 (refusal_error)`
|
||||
- `gap::SamplePositionsAtBegin`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145 (stencil_scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1861 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)`
|
||||
- `gap::SamplePositionsAtBegin`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145 (stencil_scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1850 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)`
|
||||
- `gap::SharedEventAcrossDevices`: `crates/metal2vulkan-runtime/src/event.rs:376 (new_shared_event_with_handle)`
|
||||
- `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:330 (settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1024`; `crates/metal2vulkan-runtime/src/render_state.rs:1192 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1559 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1578 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:512 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:740 (compensation)`
|
||||
- `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1587 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1590 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:350 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:448 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:590 (compensation)`
|
||||
- `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:330 (settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1010`; `crates/metal2vulkan-runtime/src/render_state.rs:1178 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1545 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1564 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:503 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:731 (compensation)`
|
||||
- `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1573 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1576 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:347 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:439 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:581 (compensation)`
|
||||
- `gap::DepthNeverWithoutAttachment`: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147 (failing_draw)`
|
||||
- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6450 (hidden_depth_stencil)`
|
||||
- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3153 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7210 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7264 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7295 (draw_resident)`
|
||||
- `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1388 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:787 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:885 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:905 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:946 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:958 (split_steps)`
|
||||
- `gap::TileAtSampleCount`: `crates/metal2vulkan-runtime/src/render_pass.rs:1611 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:937`
|
||||
- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7133 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:930 (dispatch_tiles_resident)`
|
||||
- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7125 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:797 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:922 (dispatch_tiles_resident)`
|
||||
- `gap::Metal4Api`: `crates/metal2vulkan-runtime/src/families/features.rs:1460 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1022 (state)`; `crates/metal2vulkan-runtime/src/families/mod.rs:362 (audit)`
|
||||
- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6432 (hidden_depth_stencil)`
|
||||
- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3138 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7192 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7246 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7277 (draw_resident)`
|
||||
- `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1247 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:653 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:751 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:771 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:812 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:824 (split_steps)`
|
||||
- `gap::TileAtSampleCount`: `crates/metal2vulkan-runtime/src/render_pass.rs:1600 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:930`
|
||||
- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7115 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:930 (dispatch_tiles_resident)`
|
||||
- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7107 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:797 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:922 (dispatch_tiles_resident)`
|
||||
- `gap::Metal4Api`: `crates/metal2vulkan-runtime/src/families/features.rs:1486 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1022 (state)`; `crates/metal2vulkan-runtime/src/families/mod.rs:362 (audit)`
|
||||
- `gap::CounterSampleBuffers`: `crates/metal2vulkan-runtime/src/families/limits.rs:1013 (state)`
|
||||
- `gap::ResidencySets`: `crates/metal2vulkan-runtime/src/families/features.rs:1442 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1015 (state)`
|
||||
- `gap::TextureAccessCounters`: `crates/metal2vulkan-runtime/src/families/features.rs:1429 (state)`; `crates/metal2vulkan-runtime/src/families/features.rs:1434 (state)`
|
||||
- `gap::IoCommandQueues`: `crates/metal2vulkan-runtime/src/families/features.rs:1439 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1020 (state)`
|
||||
- `gap::TextureViewPools`: `crates/metal2vulkan-runtime/src/families/features.rs:1443 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1021 (state)`
|
||||
- `gap::ColorAttachmentMapping`: `crates/metal2vulkan-runtime/src/families/features.rs:1444 (state)`
|
||||
- `gap::LossyTextureCompression`: `crates/metal2vulkan-runtime/src/families/features.rs:1438 (state)`
|
||||
- `gap::ShaderValidation`: `crates/metal2vulkan-runtime/src/families/features.rs:1440 (state)`
|
||||
- `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1441 (state)`
|
||||
- `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1445 (state)`
|
||||
- `gap::ResidencySets`: `crates/metal2vulkan-runtime/src/families/features.rs:1468 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1015 (state)`
|
||||
- `gap::TextureAccessCounters`: `crates/metal2vulkan-runtime/src/families/features.rs:1455 (state)`; `crates/metal2vulkan-runtime/src/families/features.rs:1460 (state)`
|
||||
- `gap::IoCommandQueues`: `crates/metal2vulkan-runtime/src/families/features.rs:1465 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1020 (state)`
|
||||
- `gap::TextureViewPools`: `crates/metal2vulkan-runtime/src/families/features.rs:1469 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1021 (state)`
|
||||
- `gap::ColorAttachmentMapping`: `crates/metal2vulkan-runtime/src/families/features.rs:1470 (state)`
|
||||
- `gap::LossyTextureCompression`: `crates/metal2vulkan-runtime/src/families/features.rs:1464 (state)`
|
||||
- `gap::ShaderValidation`: `crates/metal2vulkan-runtime/src/families/features.rs:1466 (state)`
|
||||
- `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1467 (state)`
|
||||
- `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1471 (state)`
|
||||
- `gap::RateMapRegions`: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:349 (refusal)`
|
||||
- `gap::LayeredPass`: `crates/metal2vulkan-runtime/src/color_resolve.rs:890 (plan)`
|
||||
- `gap::FunctionOptions`: `crates/metal2vulkan-runtime/src/library.rs:215 (new_function_with_descriptor)`
|
||||
- `gap::OverlappingTextureCopies`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1242 (texture_copies_of_bytes)`
|
||||
- `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:600 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2431 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2446 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2457 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2500 (dma_buf_heap_images_again)`
|
||||
- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5575 (host_copy)`
|
||||
- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1637 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1281 (heap_plan)`
|
||||
- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5584 (host_copy)`
|
||||
- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1636 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1281 (heap_plan)`
|
||||
- `gap::VertexFetchPast4GiB`: `crates/metal2vulkan-runtime/src/render/vertex_reach.rs:72 (check_vertex_reach)`
|
||||
- `gap::StageInFetchPast4GiB`: `crates/metal2vulkan-runtime/src/fetch_reach.rs:126 (check_stage_in_reach)`
|
||||
- `gap::MappedTextureSampling`: `crates/metal2vulkan-runtime/src/address_map.rs:158 (resolve)`
|
||||
- `gap::LibrarySource`: `crates/metal2vulkan-runtime/src/library.rs:107 (new_library_with_source)`
|
||||
- `gap::RestartedStrip`: `crates/metal2vulkan-runtime/src/index_rewrite.rs:110 (new)`; `crates/metal2vulkan-runtime/src/render.rs:7237 (draw_resident)`
|
||||
- `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:7614 (draw_resident)`
|
||||
- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1571 (texel_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:715 (turned_plane)`; `crates/metal2vulkan-runtime/src/rotated.rs:185 (new)`; `crates/metal2vulkan-runtime/src/rotated.rs:201 (new)`; `crates/metal2vulkan-runtime/src/shadow.rs:638 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:4990 (view)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:100 (check_rotated_reach)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:322 (copied_image)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:238 (new_usage_shadow)`
|
||||
- `gap::RestartedStrip`: `crates/metal2vulkan-runtime/src/index_rewrite.rs:110 (new)`; `crates/metal2vulkan-runtime/src/render.rs:7219 (draw_resident)`
|
||||
- `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:7596 (draw_resident)`
|
||||
- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1571 (texel_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:715 (turned_plane)`; `crates/metal2vulkan-runtime/src/rotated.rs:185 (new)`; `crates/metal2vulkan-runtime/src/rotated.rs:201 (new)`; `crates/metal2vulkan-runtime/src/shadow.rs:638 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:4989 (view)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:100 (check_rotated_reach)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:322 (copied_image)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:238 (new_usage_shadow)`
|
||||
- `gap::DetachTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:604 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:622 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:152 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2639 (heap_texture_at)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:143 (new_stand_in)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:248 (stand_in_while_detached)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:298 (stand_ins)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:304 (stand_ins)`
|
||||
- `gap::TextureBufferLevels`: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:540 (check_made)`
|
||||
- `gap::WriteSwizzle`: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:547 (check_made)`
|
||||
- `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4820 (refuse_detached_texels)`
|
||||
- `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4819 (refuse_detached_texels)`
|
||||
- `gap::SurfaceDepthStencil`: `crates/metal2vulkan-runtime/src/blit_texture.rs:236 (unit)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57 (surface_depth_twin)`
|
||||
- `gap::ExtendedRangeResolve`: `crates/metal2vulkan-runtime/src/resolve.rs:604 (color)`
|
||||
- `gap::HostHeapUncompressedMultisample`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1924 (host_heap_plan)`
|
||||
- `gap::PredicationUnbalanced`: `crates/metal2vulkan-runtime/src/predication.rs:371 (nil)`; `crates/metal2vulkan-runtime/src/predication.rs:403 (start_else)`; `crates/metal2vulkan-runtime/src/predication.rs:455 (end_if)`; `crates/metal2vulkan-runtime/src/predication.rs:575 (end_loop)`
|
||||
- `gap::PredicationOpenAtUnitEnd`: `crates/metal2vulkan-runtime/src/predication.rs:280 (commit_refusal)`; `crates/metal2vulkan-runtime/src/predication.rs:296 (commit)`
|
||||
@@ -491,20 +493,22 @@ Each refusal's sites, with the function that builds it.
|
||||
- `gap::PredicatedLoopAcrossEncoders`: `crates/metal2vulkan-runtime/src/predication.rs:284 (commit_refusal)`; `crates/metal2vulkan-runtime/src/predication.rs:300 (commit)`
|
||||
- `gap::MultisampledBufferCopy`: `crates/metal2vulkan-runtime/src/blit_texture.rs:485 (copy_from_buffer_to_texture)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:641 (copy_from_texture_to_buffer)`
|
||||
- `gap::ColorAttachmentGroups`: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106 (gap)`
|
||||
- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/apple_only.rs:208 (check)`
|
||||
- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:210 (check)`
|
||||
- `apple::ProvokingVertexMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:215 (check)`
|
||||
- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:212 (check)`
|
||||
- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:219 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:344 (set_vertex_amplification_mode)`
|
||||
- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/apple_only.rs:200 (check)`
|
||||
- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:202 (check)`
|
||||
- `apple::ProvokingVertexMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:207 (check)`
|
||||
- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:204 (check)`
|
||||
- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:210 (check)`
|
||||
- `apple::DepthCleared`: `crates/metal2vulkan-runtime/src/apple_only.rs:212 (check)`
|
||||
- `apple::StencilCleared`: `crates/metal2vulkan-runtime/src/apple_only.rs:213 (check)`
|
||||
- `apple::SurfaceClientDirection`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417 (new_texture_with_iosurface_plane)`
|
||||
- `apple::FillUnmeasured`: `crates/metal2vulkan-runtime/src/blit_fill.rs:149 (unmeasured)`
|
||||
- `bind::DescriptorRangeExceeded`: `crates/metal2vulkan/src/bind/instantiate.rs:652 (bind_buffers)`
|
||||
- `bind::TexelBufferTooLarge`: `crates/metal2vulkan/src/bind/instantiate.rs:891 (texel_ranges)`
|
||||
- `bind::HeapTooLarge`: `crates/metal2vulkan/src/bind/heap.rs:1014 (new)`; `crates/metal2vulkan/src/bind/heap.rs:1748 (directory_bytes)`; `crates/metal2vulkan/src/bind/heap.rs:1863 (listed_sampler_tables)`; `crates/metal2vulkan/src/bind/heap.rs:1913 (placed)`; `crates/metal2vulkan/src/bind/heap.rs:2069 (heap_elements)`; `crates/metal2vulkan/src/bind/heap.rs:949 (new)`; `crates/metal2vulkan/src/bind/heap.rs:965 (new)`
|
||||
- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3566 (patch_binding)`
|
||||
- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3610 (patch_binding)`
|
||||
- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3648 (patch_binding)`
|
||||
- `bind::MissingStageInRegion`: `crates/metal2vulkan/src/bind/dispatch.rs:802 (instantiate)`
|
||||
- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3556 (patch_binding)`
|
||||
- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3600 (patch_binding)`
|
||||
- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3638 (patch_binding)`
|
||||
- `bind::MissingStageInRegion`: `crates/metal2vulkan/src/bind/dispatch.rs:796 (instantiate)`
|
||||
- `bind::UniformViewAliased`: `crates/metal2vulkan/src/bind/instantiate.rs:606 (check_uniform_aliasing)`
|
||||
- `bind::MissingDeviceAddress`: `crates/metal2vulkan/src/bind/plan/slots.rs:133 (plan_buffer)`
|
||||
- `limit::InlinedInstructions`: `crates/metal2vulkan-air/src/canon/inline.rs:330 (u32_of)`; `crates/metal2vulkan-air/src/canon/inline.rs:334 (usize_of)`; `crates/metal2vulkan-air/src/canon/inline.rs:61 (inline)`
|
||||
|
||||
@@ -109,6 +109,7 @@ feature CountingVisibility rare counting occlusion queries on a device without p
|
||||
feature ViewFormatReinterpretation app a view of another component layout on a portability subset (MoltenVK)
|
||||
feature SeparateMultisampledDepthStencil rare separate multisampled depth and stencil textures
|
||||
feature PixelCoverage rare coverage reads at pixel rate in a multisampled pipeline
|
||||
feature PostDepthCoverage rare the coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage
|
||||
feature CentroidVarying rare centroid varyings in a multisampled pipeline
|
||||
feature PrivateMemory rare very large per-thread arrays
|
||||
feature SparseTextures rare sparse heaps on a device without sparse images
|
||||
|
||||
|
@@ -88,7 +88,7 @@ values Quads OutputVertices OutputPoints SubgroupUniformControlFlowKHR SignedZer
|
||||
values StencilRefReplacingEXT RequireFullQuadsKHR OutputLinesEXT OutputPrimitivesEXT
|
||||
values DerivativeGroupLinearKHR OutputTrianglesEXT PixelInterlockOrderedEXT
|
||||
values SampleInterlockOrderedEXT MaximallyReconvergesKHR InputPoints InputLines Invocations
|
||||
values OutputLineStrip OutputTriangleStrip DenormPreserve RoundingModeRTE
|
||||
values OutputLineStrip OutputTriangleStrip DenormPreserve RoundingModeRTE PostDepthCoverage
|
||||
test-values ContractionOff FPFastMathDefault
|
||||
|
||||
enum StorageClass
|
||||
|
||||
Reference in new issue
Block a user