Answer a depth/stencil state's resource ID as plain Metal does below Apple10

The steps this packet landed as, in order:
- Take every tile threadgroup argument length plain Metal takes

Content: the tree of `development` at 4d695b78ae, unchanged.
This commit is contained in:
Anees Iqbal committed 2026-10-26 13:19:16 +02:00
1 parent 14c73a67dc
commit 0ce84de6bc
11 files changed
+203 -84

No files matched your search

@@ -8,15 +8,16 @@
//! (`render.rs`). Metal makes a state of any descriptor, masks wider than the 8-bit stencil
//! included (measured on an M4), so creation refuses nothing.
//!
//! A state's `gpuResourceID` is Apple10's: below it Metal's API validation stops the call
//! ("Obtaining the resourceID of a DepthStencilState object requires support for
//! MTLGPUFamilyApple10", an M4 under macOS 27.0.1), and on the primary reference, an M3 under macOS
//! 26.7, the plain call raises too (the consumer's measurement), so the runtime refuses it typed on
//! a device that does not claim the family. macOS 27.0.1's plain call answers 0 for every state
//! below Apple10 (two runs, three states): an OS version's difference,
//! which [`DepthStencilState::gpu_resource_id`] would take in its one refusal if the primary
//! reference moved to macOS 27. What the ID names on Apple10, a depth/stencil state an indirect
//! render command sets, is not built.
//! A state's `gpuResourceID` below Apple10 is a release's answer, not a refusal: Metal's API
//! validation stops the call at every release measured ("Obtaining the resourceID of a
//! DepthStencilState object requires support for MTLGPUFamilyApple10", an M4 under macOS 27.0.1),
//! but plain Metal is what the runtime answers as, and the two differ. macOS 27.0.1's plain call
//! answers 0 for every state asked below Apple10 (our probe on an M3 Max, and an earlier run of
//! three states over two runs), where macOS 26.7's plain call raises (the consumer's measurement
//! on an M3 Max). So the answer is the device's level's
//! ([`MetalLevel::depth_stencil_resource_id`](crate::MetalLevel)), and the refusal is kept only for
//! a level whose plain call raises. What the ID names on Apple10, a depth/stencil state an
//! indirect render command sets, is not built.
use super::error::{invalid, Error, Problem, RuntimeGap};
use super::families::GpuFamily;
@@ -76,15 +77,19 @@ impl DepthStencilState {
&self.0.descriptor
}
/// `gpuResourceID` (the module docs): refused `Invalid(DepthStencilResourceId)` on a device
/// that does not claim Apple10 ([`Device::supports_family`]), as Metal's API validation stops
/// it, and `NotImplemented(IndirectRenderCommands)` on one that does: indirect render
/// commands that set a depth/stencil state are not built.
/// `gpuResourceID` (the module docs): on a device that does not claim Apple10
/// ([`Device::supports_family`]), what its level's plain Metal answers there (0 at macOS
/// 27.0.1), or `Invalid(DepthStencilResourceId)` at a level whose plain call raises (macOS
/// 26.7). Refused `NotImplemented(IndirectRenderCommands)` on a device that claims Apple10:
/// indirect render commands that set a depth/stencil state are not built.
pub fn gpu_resource_id(&self) -> Result<ResourceId, Error> {
if self.0.device.supports_family(GpuFamily::Apple10.raw()) {
return Err(Error::NotImplemented(RuntimeGap::IndirectRenderCommands));
}
Err(invalid("gpu_resource_id", Problem::DepthStencilResourceId))
let level = self.0.device.properties().metal_level;
level
.depth_stencil_resource_id()
.ok_or_else(|| invalid("gpu_resource_id", Problem::DepthStencilResourceId))
}
/// The Vulkan depth/stencil state the state stands for.
+15 -7
View File
@@ -738,9 +738,15 @@ pub enum Problem {
WrappedBuffer(WrappedBufferProblem),
/// A tile function's threadgroup argument of `length` bytes at byte `offset` of its tile's
/// threadgroup memory, which the pass makes `tile_length` bytes (its
/// `threadgroupMemoryLength`): a length or offset that is not a multiple of 16, or an
/// argument that ends past the tile's memory (`set_threadgroup_memory_length` of a render
/// encoder, as Metal's validation refuses it).
/// `threadgroupMemoryLength`): an `offset` that is not a multiple of 16, past the tile's
/// memory, or past a `u32` (`set_threadgroup_memory_length` of a render encoder). Metal's own
/// API validation refuses the setter for those and for a length that is not a multiple of 16
/// or an argument that ends past the tile's memory, which is not what plain Metal does: on an
/// Apple M3 Max under macOS 27.0.1 plain Metal takes every length and offset tried (4, 17, 0
/// and 2^32 among them), the pass completes, and the argument begins at its offset floored to
/// a multiple of 4 bytes, reading zero from the tile's memory's end on. So the runtime takes
/// every length and every argument that ends past the tile's memory too
/// (`metal2vulkan::error::BindError::TileThreadgroupArgument` carries the whole measurement).
TileThreadgroupArgument {
/// The argument's length, in bytes.
length: u64,
@@ -749,10 +755,12 @@ pub enum Problem {
/// The tile's threadgroup memory, in bytes.
tile_length: u64,
},
/// A depth/stencil state's `gpu_resource_id` on a device that does not claim Apple10:
/// Metal's API validation stops it ("Obtaining the resourceID of a DepthStencilState object
/// requires support for MTLGPUFamilyApple10"), and the primary reference's plain call (macOS
/// 26.7) raises; macOS 27.0.1's plain call answers 0.
/// A depth/stencil state's `gpu_resource_id` on a device that does not claim Apple10, at a
/// [`MetalLevel`](crate::MetalLevel) whose plain Metal raises there (macOS 26.7, the
/// consumer's measurement on an M3 Max). Metal's API validation stops the call at every
/// release measured ("Obtaining the resourceID of a DepthStencilState object requires support
/// for MTLGPUFamilyApple10"), which is not what plain Metal does: macOS 27.0.1's plain call
/// answers 0 (our probe on an M3 Max), and so does the runtime at that level.
DepthStencilResourceId,
/// A pipeline's `requiredThreadsPerThreadgroup` that Metal refuses at creation, or a dispatch
/// whose threadgroup size is not it.
+26 -1
View File
@@ -4,7 +4,9 @@
//! descriptor's `setPixelFormat:` takes, and which formats `MTLPixelFormatGetInfoForDevice`
//! describes, whose textures Metal's validation stops otherwise; and whether a compute encoder
//! run's first indirect dispatch in an encoder of another dispatch type ends the process
//! ([`MetalLevel::ends_at_a_runs_first_indirect_of_another_type`]). A [`MetalLevel`] is one measured
//! ([`MetalLevel::ends_at_a_runs_first_indirect_of_another_type`]); and what a depth/stencil
//! state's `gpuResourceID` answers below Apple10
//! ([`MetalLevel::depth_stencil_resource_id`]). A [`MetalLevel`] is one measured
//! release, and its row of the table ([`MetalLevel::knows`], [`MetalLevel::describes`]) is what
//! that release answered on our own probes. Every check that differs by release reads the row of
//! the device's level, never a release's name.
@@ -20,6 +22,7 @@
//! no release of the host's names it.
use crate::error::{Error, Problem, Unproven};
use crate::resource_ids::ResourceId;
use crate::texture::heap_tiled::{BlockFamily, BlockPlacement, GpuRows};
use crate::Degradation;
use metal2vulkan::bind::{CompressedBlit, MipmapRule};
@@ -84,6 +87,10 @@ struct Row {
/// in an encoder of another dispatch type than the run's first encoder's
/// ([`MetalLevel::ends_at_a_runs_first_indirect_of_another_type`]).
indirect_of_another_type_ends: bool,
/// What its plain Metal answers for a depth/stencil state's `gpuResourceID` on a device that
/// does not claim Apple10, or `None` where the plain call raises
/// ([`MetalLevel::depth_stencil_resource_id`]).
depth_stencil_resource_id: Option<ResourceId>,
}
/// How a level's Metal places a block-compressed texture's blocks in its levels' tiles, per
@@ -126,6 +133,9 @@ const MACOS_26_7: Row = Row {
// of the 18 shapes of its `a_units_first_indirect_dispatch_of_another_type_dies` (the
// others run), and in `interplay_decodewalk_27` in each of its setups; not run here.
indirect_of_another_type_ends: true,
// The consumer's measurement on its M3 Max: the plain call raises, as its API validation
// stops it; we cannot run 26.7 here.
depth_stencil_resource_id: None,
};
/// macOS 27.0.1 on an Apple M3 Max: its descriptor knows every value the runtime names (it
@@ -161,6 +171,10 @@ const MACOS_27_0_1: Row = Row {
// Our probe on the M3 Max: 12 shapes of it, with and without a predication block open, run;
// the consumer's `interplay_decodewalk_27` completes in each of its setups.
indirect_of_another_type_ends: false,
// Our probe on the M3 Max (macOS 27.0.1, build 26A434, plain Metal): 0 for a depth state and
// for a depth-and-stencil one, the call returning; an earlier run of three states over two
// runs answered 0 alike.
depth_stencil_resource_id: Some(ResourceId(0)),
};
impl MetalLevel {
@@ -264,6 +278,17 @@ impl MetalLevel {
self.row().indirect_of_another_type_ends
}
/// What the release's plain Metal answers for a depth/stencil state's `gpuResourceID` on a
/// device that does not claim Apple10, or `None` where the plain call raises, which the
/// runtime answers alike (`Invalid`, `Problem::DepthStencilResourceId`). Metal's own API
/// validation stops the call at every release measured ("Obtaining the resourceID of a
/// DepthStencilState object requires support for MTLGPUFamilyApple10"), which is not what
/// plain Metal does: 27.0.1 answers 0 (our probe on an M3 Max, every state asked), where
/// 26.7's plain call raises (the consumer's measurement on an M3 Max).
pub(crate) fn depth_stencil_resource_id(self) -> Option<ResourceId> {
self.row().depth_stencil_resource_id
}
/// The newest level whose release is at or below macOS `version` (major, minor, patch), if
/// any.
pub(crate) fn at_or_below(version: [u32; 3]) -> Option<MetalLevel> {
@@ -132,10 +132,13 @@ impl RenderLowering {
const CALL: &str = "set_threadgroup_memory_length";
check_index(CALL, index, BUFFER_SLOTS)?;
let tile_length = self.layout.tile.threadgroup_memory_length;
let fits = |n: u64| u32::try_from(n).ok().filter(|n| n.is_multiple_of(16));
let argument = match (fits(length), fits(offset)) {
// Each below 2^32: the sum does not overflow.
(Some(length32), Some(offset32)) if offset + length <= tile_length => {
// A length takes no part in the layout and bounds no access, as plain Metal's does not, so
// any length a `u32` holds is planned; an argument that ends past the tile's memory has
// its accesses contained there, reading zero as Metal's do.
let argument = match (u32::try_from(length).ok(), u32::try_from(offset).ok()) {
(Some(length32), Some(offset32))
if offset32.is_multiple_of(16) && u64::from(offset32) <= tile_length =>
{
TileThreadgroupArgument::new(length32, offset32)
}
_ => {
@@ -157,10 +160,12 @@ impl RenderLowering {
impl RenderCommandEncoder {
/// `setThreadgroupMemoryLength:offset:atIndex:`: a tile or fragment function's threadgroup
/// argument `index` is `length` bytes at byte `offset` of its tile's threadgroup memory, for
/// the encoder's later tile dispatches and draws (the module docs). Refused (`Invalid`), as Metal's
/// validation refuses it: an index past the table (`IndexOutOfRange`), and a length or an
/// offset that is not a multiple of 16 bytes, or an argument that ends past the pass's
/// `threadgroupMemoryLength` (`TileThreadgroupArgument`).
/// the encoder's later tile dispatches and draws (the module docs). Every length is taken, and
/// an argument that ends past the pass's `threadgroupMemoryLength` reads zero from its end on,
/// as plain Metal does (`Problem::TileThreadgroupArgument` names the measurement). Refused
/// (`Invalid`): an index past the table (`IndexOutOfRange`), and an offset that is not a
/// multiple of 16 bytes, past the pass's `threadgroupMemoryLength`, or past a `u32`
/// (`TileThreadgroupArgument`).
pub fn set_threadgroup_memory_length(
&mut self,
length: u64,
@@ -7,7 +7,7 @@ use crate::metal_level::{choose, parse_version, Chosen, Host};
use crate::texture::heap::no_texture_alignment;
use crate::texture_descriptor::{Creator, Refused, TextureDescriptor, TextureProblem};
use crate::texture_descriptor::{TextureRules, APPLE_SAMPLE_COUNTS};
use crate::{BufferTextureProblem, Error, Invalid, MetalLevel, Problem, Unproven};
use crate::{BufferTextureProblem, Error, Invalid, MetalLevel, Problem, ResourceId, Unproven};
use metal2vulkan::bind::MipmapRule;
use metal2vulkan::metal::PixelFormat as P;
use metal2vulkan::metal::{TextureType, TextureUsage};
@@ -160,6 +160,25 @@ fn a_level_takes_its_release_s_mipmaps_and_nil_alignments() {
/// of another dispatch type (the consumer's measurement); 27.0.1 runs it (ours). The 18 shapes
/// run on a device at each level in the validation crate's runtime lane
/// (`a_runs_first_indirect_dispatch_of_another_type_ends_the_process_at_26_7`).
/// A depth/stencil state's `gpuResourceID` below Apple10 is the level's plain Metal answer: 0 at
/// macOS 27.0.1 (our probe on an M3 Max, build 26A434, plain Metal: 0 for a depth state and for a
/// depth-and-stencil one, the call returning), and no answer at macOS 26.7, whose plain call
/// raises (the consumer's measurement on an M3 Max). Metal's own API validation stops the call at
/// both releases, which is not what plain Metal does, so no level takes its word for it.
#[test]
fn only_26_7_has_no_depth_stencil_resource_id_below_apple10() {
assert_eq!(MetalLevel::MacOS26_7.depth_stencil_resource_id(), None);
assert_eq!(
MetalLevel::MacOS27_0_1.depth_stencil_resource_id(),
Some(ResourceId(0))
);
assert_eq!(
MetalLevel::NEWEST.depth_stencil_resource_id(),
Some(ResourceId(0)),
"a device off macOS answers the newest level's"
);
}
#[test]
fn only_26_7_ends_at_a_runs_first_indirect_dispatch_of_another_type() {
assert!(MetalLevel::MacOS26_7.ends_at_a_runs_first_indirect_of_another_type());
@@ -9,8 +9,9 @@
//! - A state without that support, and a tile state, take no ID: they answer 0 whatever the
//! placement, 16384 included.
//! - A placement at 16384 or more after the cut, which ended Metal's process, is refused typed.
//! - A depth/stencil state's ID is refused typed on a device that does not claim Apple10, as
//! Metal's validation stops it.
//! - A depth/stencil state's ID below Apple10 is its level's plain Metal answer, 0 at macOS
//! 27.0.1, and refused typed only at a level whose plain call raises (macOS 26.7). Metal's own
//! API validation stops the call at every release measured, which is not what plain Metal does.
//!
//! - A state answers its descriptor's label, and one made from it with additional binary
//! functions keeps it.
@@ -22,15 +23,15 @@
use super::tile_states::on_device;
use crate::air_library::AirLibrary;
use metal2vulkan::metal::state::DepthStencilDescriptor;
use metal2vulkan::metal::PixelFormat;
use metal2vulkan::metal::{CompareFunction, PixelFormat};
use metal2vulkan::pipeline::{
ComputePipelineDescriptor, RenderPipelineDescriptor, StageSource, TileRenderPipelineDescriptor,
};
use metal2vulkan_devtools::{engine_dir, llvm_assemble};
use metal2vulkan_runtime::{
ComputePipelineState, Device, Error, GpuFamily, IdPlacement, Invalid, PipelineOption,
PipelineOptions, Problem, RenderPipelineFunctionsDescriptor, RenderPipelineState, ResourceId,
RuntimeGap,
ComputePipelineState, Device, Error, GpuFamily, IdPlacement, Invalid, MetalLevel,
PipelineOption, PipelineOptions, Problem, RenderPipelineFunctionsDescriptor,
RenderPipelineState, ResourceId, RuntimeGap,
};
/// The placement at `id`.
@@ -253,20 +254,30 @@ fn placements_past_the_pipeline_limit_are_refused_typed() {
});
}
/// A depth/stencil state's `gpu_resource_id` is refused typed on a device that does not claim
/// Apple10, as Metal's validation stops it ("Obtaining the resourceID of a DepthStencilState
/// object requires support for MTLGPUFamilyApple10", probe 6), and is a gap on one that does.
/// A depth/stencil state's `gpu_resource_id` below Apple10 is its device's level's plain Metal
/// answer: 0 at macOS 27.0.1 (our probe on an M3 Max; Metal's own API validation stops the call
/// there, "Obtaining the resourceID of a DepthStencilState object requires support for
/// MTLGPUFamilyApple10", probe 6, which is not what plain Metal does), and refused typed at macOS
/// 26.7, whose plain call raises. It is a gap on a device that claims Apple10. Every descriptor
/// answers alike, a depth one and a depth-and-stencil one among them.
#[test]
fn a_depth_stencil_states_id_is_refused_below_apple10() {
fn a_depth_stencil_states_id_below_apple10_is_its_levels_answer() {
on_device(|device| {
let state = device
.new_depth_stencil_state(&DepthStencilDescriptor::default())
.unwrap();
let expected = if device.supports_family(GpuFamily::Apple10.raw()) {
Error::NotImplemented(RuntimeGap::IndirectRenderCommands)
} else {
invalid("gpu_resource_id", Problem::DepthStencilResourceId)
};
assert_eq!(state.gpu_resource_id(), Err(expected));
let mut stencilled = DepthStencilDescriptor::default();
stencilled.front_face_stencil.stencil_compare_function = CompareFunction::Equal;
for descriptor in [DepthStencilDescriptor::default(), stencilled] {
let state = device.new_depth_stencil_state(&descriptor).unwrap();
let expected = if device.supports_family(GpuFamily::Apple10.raw()) {
Err(Error::NotImplemented(RuntimeGap::IndirectRenderCommands))
} else {
match device.properties().metal_level {
MetalLevel::MacOS26_7 => {
Err(invalid("gpu_resource_id", Problem::DepthStencilResourceId))
}
_ => Ok(ResourceId(0)),
}
};
assert_eq!(state.gpu_resource_id(), expected, "{descriptor:?}");
}
});
}
@@ -14,9 +14,14 @@
//! - Each argument sits at the byte offset the encoder set: `shift` with argument 1 at byte 16
//! writes words 4 to 19, which argument 0 reads back, and `dump` with argument 0 at byte 64
//! reads words 16 on, past `shift`'s still zero.
//! - The setter is refused where Metal's validation refuses it, and a dispatch of a function whose
//! argument the encoder never set is the binder's `MissingThreadgroupMemory`, where Metal's
//! validation stops the dispatch.
//! - The setter takes every length, and an argument that ends past the tile's memory, as plain
//! Metal does (an M3 Max under macOS 27.0.1: every length and offset tried took, the pass
//! completing, reading zero from the tile's memory's end on); it is refused for an offset that is
//! not a multiple of 16 or past the tile's memory, which Metal floors to a multiple of 4 and
//! reads as zero respectively — measurements `Problem::TileThreadgroupArgument` names. A
//! dispatch of a function whose argument the encoder never set is the binder's
//! `MissingThreadgroupMemory`: plain Metal runs it with the argument at a driver-chosen offset
//! (byte 120 of 256 on an M3 Max, our probe), which no rule gives.
use super::tile_states::on_device;
use super::{buffer_with, read_buffer, WAIT};
@@ -225,7 +230,7 @@ fn each_pass_starts_its_tiles_threadgroup_memory_at_zero() {
}
#[test]
fn tile_threadgroup_arguments_are_refused_as_metal_refuses_them() {
fn tile_threadgroup_arguments_answer_as_plain_metal_does() {
on_device(|device| {
let states = States::new(device);
let target = target(device);
@@ -254,17 +259,23 @@ fn tile_threadgroup_arguments_are_refused_as_metal_refuses_them() {
limit: 31
})
);
assert_eq!(
encoder.set_threadgroup_memory_length(8, 0, 0),
argument(8, 0)
);
// Every length is taken, a multiple of 16 or not, and so is an argument that
// ends past the tile's memory: plain Metal takes either.
for (length, offset) in [(8, 0), (0, 0), (1, 16), (64, 112), (u64::MAX, 32)] {
assert_eq!(
encoder.set_threadgroup_memory_length(length, offset, 0),
Ok(()),
"{length} at {offset}"
);
}
// An offset that is not a multiple of 16, or past the tile's memory, is refused.
assert_eq!(
encoder.set_threadgroup_memory_length(64, 8, 0),
argument(64, 8)
);
assert_eq!(
encoder.set_threadgroup_memory_length(64, 80, 0),
argument(64, 80)
encoder.set_threadgroup_memory_length(64, 144, 0),
argument(64, 144)
);
encoder.set_render_pipeline_state(&states.add).unwrap();
assert_eq!(
+12 -9
View File
@@ -40,8 +40,9 @@
//! (`SpecKey::TileThreadgroupLength`, the pass's length rounded up to 16) and the tiles across
//! the render area (`SpecKey::TileGridWidth`), and binds the pass's tile memory
//! (`WriteSource::TileMemory`, every tile's bytes). An argument the encoder did not set is
//! `BindError::MissingThreadgroupMemory`; one past the tile's memory or not 16-byte aligned
//! `BindError::TileThreadgroupArgument`. The tile's bytes start the threadgroup total.
//! `BindError::MissingThreadgroupMemory`; one whose offset is past the tile's memory or not
//! 16-byte aligned `BindError::TileThreadgroupArgument`. An argument's length bounds nothing, as
//! plain Metal's does not. The tile's bytes start the threadgroup total.
//! - **Kept imageblock bytes** (`RuntimeFact::TileImageblock`). A tile function whose explicit
//! imageblock stands alone, in a pass that keeps fewer bytes of its cells than its data
//! (`BindShape::kept_imageblock_bytes`), asks for `VariantKey::kept_imageblock_bytes`: plain
@@ -176,9 +177,10 @@ impl TileMemoryPlan {
/// The tile threadgroup memory of a pipeline of `dependencies` as `shape` places it on `device`;
/// `None` for a pipeline that reads no threadgroup argument (`RuntimeFact::TileThreadgroupMemory`:
/// a tile function's, or a fragment function's). An argument the encoder did not set is
/// `BindError::MissingThreadgroupMemory`; one whose length or offset is not a multiple of 16, or
/// that ends past the tile's memory, `BindError::TileThreadgroupArgument`, as Metal's validation
/// refuses either. A shape without a render area or a tile is `InvalidRenderArea` or
/// `BindError::MissingThreadgroupMemory`. An argument's length takes no part in the layout and
/// bounds no access, as plain Metal's does not; one whose offset is not a multiple of 16, or past
/// the tile's memory, is `BindError::TileThreadgroupArgument` (both doc comments name what plain
/// Metal answers there). A shape without a render area or a tile is `InvalidRenderArea` or
/// `InvalidImageblockSize`. A buffer of every tile's memory past the device's
/// `maxStorageBufferRange`, which one descriptor binds at most, is `Unsupported`.
pub(crate) fn tile_memory(
@@ -196,10 +198,11 @@ pub(crate) fn tile_memory(
.arguments
.get(&index)
.ok_or(BindError::MissingThreadgroupMemory { index })?;
let aligned = |n: u32| u64::from(n).is_multiple_of(TG_ALIGN);
let end = u64::from(argument.offset) + u64::from(argument.length);
if !aligned(argument.length) || !aligned(argument.offset) || end > u64::from(memory.length)
{
// The length bounds nothing: an access past the tile's memory is contained against
// `SpecKey::TileThreadgroupLength` and reads zero, which is what plain Metal reads past
// the pass's `threadgroupMemoryLength` (`BindError::TileThreadgroupArgument`).
let aligned = u64::from(argument.offset).is_multiple_of(TG_ALIGN);
if !aligned || argument.offset > memory.length {
return Err(BindError::TileThreadgroupArgument {
index,
offset: argument.offset,
+13 -3
View File
@@ -1996,9 +1996,19 @@ pub enum BindError {
/// (`BindState::tile_threadgroup`, `setThreadgroupMemoryLength:offset:atIndex:`): Metal's
/// validation stops the dispatch ("missing Threadgroup Memory binding").
MissingThreadgroupMemory { index: u32 },
/// A tile function's threadgroup argument `index` set at `offset` for `length` bytes, which
/// end past the render pass's tile threadgroup memory of `tile_length` bytes, or a length or
/// offset that is not a multiple of 16: Metal's validation refuses the setter.
/// A tile function's threadgroup argument `index` set at an `offset` past the render pass's
/// tile threadgroup memory of `tile_length` bytes, or at one that is not a multiple of 16
/// (`length` is the length set, which bounds nothing). Metal's own API validation refuses the
/// setter for either, and for a length that is not a multiple of 16, which is not what plain
/// Metal does: on an Apple M3 Max under macOS 27.0.1, plain Metal takes every length and
/// offset, the pass completes, and an argument begins at its offset floored to a multiple of
/// 4 bytes (17 reads byte 16), reading zero from the pass's memory's end on. So a length takes
/// no part in the layout here either, and an argument that ends past the tile's memory is
/// planned, its accesses contained to read zero as Metal's do. An offset between multiples of
/// 16 is refused all the same: matching Metal's floor needs a region base of 4-byte alignment,
/// whose effect on an access that claims wider alignment is unmeasured. An offset past the
/// tile's memory, which Metal reads as zero throughout, is refused because the shader's
/// 32-bit offset arithmetic could wrap into the memory.
TileThreadgroupArgument {
index: u32,
offset: u32,
+26 -4
View File
@@ -772,9 +772,13 @@ fn a_tiles_threadgroup_memory_persists_across_dispatches() {
/// The binder places a tile function's threadgroup arguments where the encoder set them: it
/// specializes each offset, the tile's bytes (the pass's length rounded up to 16) and the tiles
/// across the render area, and binds the pass's tile memory of every tile's bytes; an argument the
/// encoder did not set, or that Metal's validation refuses, is refused, and so is a tile memory
/// past one storage-buffer descriptor's range.
/// across the render area, and binds the pass's tile memory of every tile's bytes. An argument's
/// length takes no part in the layout and bounds no access, as plain Metal's does not, so a length
/// that is not a multiple of 16 and one that ends past the tile's memory are both planned at their
/// offset (plain Metal on an M3 Max under macOS 27.0.1 takes every length, and reads zero from the
/// tile's memory's end on, which the arena's containment gives). An argument the encoder did not
/// set, or whose offset is not a multiple of 16 or past the tile's memory, is refused, and so is a
/// tile memory past one storage-buffer descriptor's range.
#[test]
fn a_tile_pipeline_places_its_threadgroup_arguments() {
use crate::bind::{TileThreadgroupArgument, TileThreadgroupMemory};
@@ -834,7 +838,25 @@ fn a_tile_pipeline_places_its_threadgroup_arguments() {
Err(BindError::MissingThreadgroupMemory { index: 1 }),
"{stem}"
);
for (index, length, offset) in [(1, 64, 8), (1, 56, 16), (1, 64, 16)] {
// A length that is not a multiple of 16, and an argument that ends past the tile's
// memory, are planned at their offset: plain Metal takes either.
for (length, offset) in [(56, 16), (64, 16), (1, 64), (0, 0), (u32::MAX, 32)] {
let plan = pipe
.plan(&dev, &state(72, &[(0, 64, 0), (1, length, offset)]).shape())
.unwrap_or_else(|e| panic!("{stem}: {length} at {offset}: {e}"));
assert_eq!(
specialized(&pipe, &plan, SpecKey::TgOffset(1)),
Some(offset),
"{stem} {length} at {offset}"
);
assert_eq!(
specialized(&pipe, &plan, SpecKey::TileThreadgroupLength),
Some(80),
"{stem} {length} at {offset}"
);
}
// An offset that is not a multiple of 16, or past the tile's memory, is refused.
for (index, length, offset) in [(1, 64, 8), (1, 16, 4), (1, 16, 80), (1, 16, 1 << 20)] {
assert_eq!(
refused(&[(0, 64, 0), (index, length, offset)]),
Err(BindError::TileThreadgroupArgument {
+8 -8
View File
@@ -14,7 +14,7 @@ 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 `6269e784f`.
Generated at `e43e4580f`.
## Totals
@@ -60,7 +60,7 @@ Generated at `6269e784f`.
| `PointerCompare` | Comparing pointers with different roots | - | via a helper: 1: `crates/metal2vulkan/src/lower/access/copy.rs:717` | `rare`: comparing pointers of different roots |
| `HandleAsPointer` | A resource handle used as a byte pointer, or conflicting handle provenance | every device (no Vulkan mechanism); every device (not implemented) | 6: `crates/metal2vulkan/src/lower/access/handle.rs:311`, `crates/metal2vulkan/src/lower/access/handle.rs:393` (+4) | `rare`: resource handles used as byte pointers |
| `ConstantGlobalEscaping` | A constant global whose address escapes | every device (not implemented) | 2: `crates/metal2vulkan/src/memory/plan.rs:1124`, `crates/metal2vulkan/src/memory/plan.rs:1265` | `rare`: a constant global whose address escapes |
| `ThreadgroupMemorySize` | Threadgroup memory above the device limit | devices short of a device limit the site names; devices without VkLimit::MaxComputeSharedMemorySize; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/bind/plan/compute.rs:714`, `crates/metal2vulkan/src/memory/arena.rs:170` (+1) | `rare`: threadgroup memory past a smaller device's limit |
| `ThreadgroupMemorySize` | Threadgroup memory above the device limit | devices short of a device limit the site names; devices without VkLimit::MaxComputeSharedMemorySize; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/bind/plan/compute.rs:717`, `crates/metal2vulkan/src/memory/arena.rs:170` (+1) | `rare`: threadgroup memory past a smaller device's limit |
| `CoherentMemory` | `coherent(device)` accesses (Vulkan memory model) | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207` | `rare`: coherent(device) accesses |
| `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:466`, `crates/metal2vulkan-runtime/src/families/formats.rs:470` (+1) | `rare`: texture atomics beyond 32-bit integers |
@@ -101,7 +101,7 @@ Generated at `6269e784f`.
| `KernelStageIn` | Kernel `[[stage_in]]` | every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/indirect_execute.rs:376`, `crates/metal2vulkan/src/bind/dispatch.rs:954` (+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:1250`, `crates/metal2vulkan-air/src/canon/mod.rs:1341` (+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:1663`, `crates/metal2vulkan/src/bind/graphics.rs:3131` (+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:520`, `crates/metal2vulkan/src/bind/plan/compute.rs:237` (+3) | `rare`: tile shaders (Apple GPU families) |
| `TileShading` | | devices without VkLimit::MaxStorageBufferRange; devices without a format's usage; every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520`, `crates/metal2vulkan/src/bind/plan/compute.rs:240` (+3) | `rare`: tile shaders (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 |
@@ -186,7 +186,7 @@ Generated at `6269e784f`.
| `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:385` | `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:341`, `crates/metal2vulkan-runtime/src/render_state.rs:1053` (+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:1617`, `crates/metal2vulkan-runtime/src/render_state.rs:1620` (+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 |
| `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:152` | `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:564`, `crates/metal2vulkan-runtime/src/render.rs:6678` | `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:102`, `crates/metal2vulkan-runtime/src/render.rs:3331` (+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:1392` (+5) | `rare`: depth/stencil resolve modes a device lacks |
@@ -319,7 +319,7 @@ Each refusal's sites, with the function that builds it.
- `feature::PointerCompare`: `crates/metal2vulkan/src/lower/access/copy.rs:717 (addressed)`
- `feature::HandleAsPointer`: `crates/metal2vulkan/src/lower/access/handle.rs:311 (domain_kind)`; `crates/metal2vulkan/src/lower/access/handle.rs:393 (element)`; `crates/metal2vulkan/src/lower/access/handle.rs:400 (element)`; `crates/metal2vulkan/src/memory/plan.rs:2016 (reprs)`; `crates/metal2vulkan/src/memory/provenance.rs:2219 (classify)`; `crates/metal2vulkan/src/memory/provenance.rs:2439 (seed)`
- `feature::ConstantGlobalEscaping`: `crates/metal2vulkan/src/memory/plan.rs:1124 (blob_nodes)`; `crates/metal2vulkan/src/memory/plan.rs:1265 (serialize)`
- `feature::ThreadgroupMemorySize`: `crates/metal2vulkan/src/bind/plan/compute.rs:714 (plan)`; `crates/metal2vulkan/src/memory/arena.rs:170 (check)`; `crates/metal2vulkan/src/memory/plan.rs:494 (too_large)`
- `feature::ThreadgroupMemorySize`: `crates/metal2vulkan/src/bind/plan/compute.rs:717 (plan)`; `crates/metal2vulkan/src/memory/arena.rs:170 (check)`; `crates/metal2vulkan/src/memory/plan.rs:494 (too_large)`
- `feature::CoherentMemory`: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207 (check)`
- `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:466 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:470 (atomic_gap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:907 (atomic_format)`
@@ -360,7 +360,7 @@ Each refusal's sites, with the function that builds it.
- `feature::KernelStageIn`: `crates/metal2vulkan-runtime/src/indirect_execute.rs:376 (record)`; `crates/metal2vulkan/src/bind/dispatch.rs:954 (instantiate)`; `crates/metal2vulkan/src/lower/stage_io/stage_in.rs:143 (select)`
- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1250 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1341 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:4037 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:527 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1524 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1810 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:842 (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:1663 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3131 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:521 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:560 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:594 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:102 (records)`
- `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520 (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:729 (tile_pipeline)`
- `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520 (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs:240 (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:729 (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:2460 (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)`
@@ -426,7 +426,7 @@ Each refusal's sites, with the function that builds it.
- `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1716 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2258 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2490 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:587 (memory_refusal)`
- `gap::FunctionTablePastMaxBufferLength`: `crates/metal2vulkan-runtime/src/function_table.rs:622 (past_limit)`
- `gap::IndirectCommandBufferPastMaxBufferLength`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:523 (new_indirect_command_buffer)`
- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1317 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1402 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4631 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1684 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7295 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7879 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8337 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8891 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1127 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2942 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:393 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:461 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:476 (execute_indirect_range)`
- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1317 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1402 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:87 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4631 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1684 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7295 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7879 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8337 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8891 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1127 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2942 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:393 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:461 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:476 (execute_indirect_range)`
- `gap::IndirectImageblockSize`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3601 (set_imageblock_size)`
- `gap::CommandReplay`: `crates/metal2vulkan-runtime/src/binding.rs:723 (bind_into)`; `crates/metal2vulkan-runtime/src/binding.rs:726 (bind_into)`
- `gap::RenderAttachments`: `crates/metal2vulkan-runtime/src/binding.rs:1801 (unexpected)`
@@ -440,7 +440,7 @@ Each refusal's sites, with the function that builds it.
- `gap::SharedEventAcrossDevices`: `crates/metal2vulkan-runtime/src/event.rs:385 (new_shared_event_with_handle)`
- `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:341 (settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1053`; `crates/metal2vulkan-runtime/src/render_state.rs:1222 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1589 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1608 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:541 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:769 (compensation)`
- `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1617 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1620 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:379 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:477 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:619 (compensation)`
- `gap::DepthNeverWithoutAttachment`: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147 (failing_draw)`
- `gap::DepthNeverWithoutAttachment`: `crates/metal2vulkan-runtime/src/depth_stencil.rs:152 (failing_draw)`
- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:564 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6678 (hidden_depth_stencil)`
- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:102 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3331 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7624 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7761 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7792 (draw_resident)`
- `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1392 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:791 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:889 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:909 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:950 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:962 (split_steps)`