Bound a run of indexed indirect draws' index fetches in two dispatches
The steps this packet landed as, in order: - Announce a provoking mode past 1 at the draws Metal's third way draws otherwise Content: the tree of `development` at 107929f7b9, unchanged.
This commit is contained in:
1 parent
4533745d05
commit
35dd559a04
26 files changed
+1802
-353
No files matched your search
@@ -1228,6 +1228,7 @@ impl Gpu for Runtime {
|
||||
),
|
||||
("provoking_listed_draws", c.provoking_listed_draws),
|
||||
("gathered_draws", c.gathered_draws),
|
||||
("bounded_run_draws", c.bounded_run_draws),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|(name, count)| (name, count as f64))
|
||||
|
||||
@@ -3149,6 +3149,7 @@ pub fn provoking<G: Gpu>(g: &G, library: &G::Library, sizes: &Sizes) {
|
||||
"provoking_last_pipeline_draws"
|
||||
| "provoking_listed_draws"
|
||||
| "gathered_draws"
|
||||
| "bounded_run_draws"
|
||||
| "dispatches"
|
||||
| "pipeline_barriers"
|
||||
) {
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
//! to 8, 15, 16, 255 and the largest values): the count is the value's set bits in mode 1 and the
|
||||
//! value in every other mode, exact from 1 to 8 (`amplification_mode_count`).
|
||||
//!
|
||||
//! A provoking vertex mode past 1, which Metal draws a third way that differs between pipeline
|
||||
//! states, is accepted and drawn as mode 1, announced at the call (`provoking-vertex-unmatched`).
|
||||
//! A provoking vertex mode past 1, which Metal draws a third way, is accepted and drawn as mode 1
|
||||
//! (patches as mode 0), announced at each draw whose shape and pipeline state Metal draws
|
||||
//! otherwise there (`provoking-vertex-unmatched`).
|
||||
//!
|
||||
//! Every other call is refused, and records nothing:
|
||||
//! - a line width other than 1 (Apple's wide-line rule is unmeasured, where Vulkan has
|
||||
@@ -376,9 +377,12 @@ impl RenderCommandEncoder {
|
||||
/// led by its last vertex, which a GPU pass writes (the CPU for a direct draw without
|
||||
/// indices); what that list draws otherwise than Metal is announced
|
||||
/// (`provoking-vertex-lines`, `provoking-vertex-unmatched`). Metal draws every other mode,
|
||||
/// its top bit set or not, a third way, which differs between pipeline states (every line's
|
||||
/// flat inputs and `[[primitive_id]]` 0), and the runtime as mode 1, announced at the call
|
||||
/// (`provoking-vertex-unmatched`). No mode is refused.
|
||||
/// its top bit set or not, as 2, a third way: a triangle list's, a fan's and the private
|
||||
/// triangle types' primitives as mode 1 (but a triangle of a pipeline that selects its slice
|
||||
/// or viewport from its middle vertex), a strip's odd triangle from its first vertex, every
|
||||
/// line's flat inputs and `[[primitive_id]]` 0, and patches as mode 0. The runtime draws it as
|
||||
/// mode 1, and patches as mode 0, announcing each draw whose pipeline state reads what Metal
|
||||
/// draws otherwise there (`provoking-vertex-unmatched`). No mode is refused.
|
||||
pub fn set_provoking_vertex_mode(&mut self, mode: u64) -> Result<(), Error> {
|
||||
match self.lowers_at_call() {
|
||||
true => self.at_call(|lowering| lowering.set_provoking_vertex_mode(mode)),
|
||||
|
||||
@@ -416,8 +416,9 @@ degradations! {
|
||||
IndirectIndexBoundsPass = "indirect-index-bounds-pass", Performance,
|
||||
"two dispatches before the pass write two draws' arguments and the indices past the \
|
||||
buffer into the command buffer's index pool (a sixty-fourth of the device's largest \
|
||||
device-local heap), between barriers, and the draw is two indirect draws; a draw \
|
||||
the pool cannot hold fails the command buffer";
|
||||
device-local heap), between barriers, two for a run of such draws over one arguments \
|
||||
and one index buffer, and the draw is two indirect draws; a draw the pool cannot \
|
||||
hold fails the command buffer";
|
||||
/// A mesh render pipeline's draws on a device without `VK_EXT_mesh_shader`
|
||||
/// (`render/mesh.rs`).
|
||||
EmulatedMeshDraws = "emulated-mesh-draws", Performance,
|
||||
@@ -2040,9 +2041,11 @@ degradations! {
|
||||
/// viewport a vertex function selects where the pipeline selects it in a synthesized
|
||||
/// geometry stage (a device without `shaderOutputLayer` or `shaderOutputViewportIndex`, an
|
||||
/// index that differs between a primitive's vertices, or weights the stage writes), from
|
||||
/// each primitive's first vertex. And on every device, a mode past 1, its top bit set or
|
||||
/// not, which Metal draws a third way that differs between pipeline states (every line's
|
||||
/// flat inputs and `[[primitive_id]]` 0) and the runtime as mode 1: announced at the call.
|
||||
/// each primitive's first vertex. And on every device, a draw at a mode past 1, which
|
||||
/// Metal draws a third way and the runtime as mode 1, whose shape and pipeline state Metal
|
||||
/// draws otherwise than mode 1 (a strip's odd triangles, every line's flat inputs and
|
||||
/// `[[primitive_id]]` 0, sized points, the middle vertex of a triangle whose pipeline
|
||||
/// selects its slice or viewport, mesh draws unmeasured): announced at the draw.
|
||||
ProvokingVertexUnmatched = "provoking-vertex-unmatched", Precision,
|
||||
"flat inputs or a computed primitive ID read another vertex than Metal's, or \
|
||||
barycentric weights come in another order than Metal's or round otherwise";
|
||||
|
||||
@@ -37,6 +37,7 @@ use super::error::{internal, invalid, vulkan, CommandBufferError, Error, Problem
|
||||
use super::execution::Execution;
|
||||
use super::fresh_unwritten::FreshRead;
|
||||
use super::heap::Heap;
|
||||
use super::index_bounds::{BoundsRunRequest, BoundsSlot};
|
||||
use super::index_rewrite::{
|
||||
self, CommandedList, GatherHeld, GatherRequest, GatherRuns, GatheredList,
|
||||
IndirectGatherRequest, RewriteRunRequest,
|
||||
@@ -723,6 +724,7 @@ impl EncoderCore {
|
||||
return Ok(None);
|
||||
};
|
||||
self.joined(held, uses);
|
||||
self.device().shared().counts.gathered_draw();
|
||||
Ok(Some(list))
|
||||
}
|
||||
|
||||
@@ -752,6 +754,7 @@ impl EncoderCore {
|
||||
return Ok(None);
|
||||
};
|
||||
self.joined(held, uses);
|
||||
self.device().shared().counts.gathered_draw();
|
||||
Ok(Some(list))
|
||||
}
|
||||
|
||||
@@ -779,12 +782,43 @@ impl EncoderCore {
|
||||
return Ok(None);
|
||||
};
|
||||
self.joined(held, uses);
|
||||
self.device().shared().counts.gathered_draw();
|
||||
Ok(Some(list))
|
||||
}
|
||||
|
||||
/// A draw joined a gather run or a rewrite run: hold what a new run's command buffer holds, track the draw's
|
||||
/// `request`'s indexed indirect draw joins an open run of the index bounds pass, which
|
||||
/// records before the encoder's next command (`index_bounds.rs`): its slot, or `None` where
|
||||
/// no run takes it. Its reads `uses` are tracked here, the run's barriers before and after it
|
||||
/// ordering them. Refused as the run's objects, the command buffer's index pool and its
|
||||
/// status words are refused.
|
||||
pub(super) fn bounds_run(
|
||||
&mut self,
|
||||
request: BoundsRunRequest<'_>,
|
||||
uses: &[Use<ResourceKey>],
|
||||
) -> Result<Option<BoundsSlot>, Error> {
|
||||
if self.gathers.full() {
|
||||
self.flush_gathers();
|
||||
}
|
||||
let device = self.device().clone();
|
||||
let queue = self.open.command_buffer.command_queue().id();
|
||||
let joined = {
|
||||
let mut state = self.open.command_buffer.state();
|
||||
let pool = state.index_pool(&device, queue)?;
|
||||
let status = state.status_words(&device)?;
|
||||
self.gathers
|
||||
.join_bounds(&device, (&mut state.uploads, &status, &pool), request)?
|
||||
};
|
||||
let Some((slot, held)) = joined else {
|
||||
return Ok(None);
|
||||
};
|
||||
self.joined(held, uses);
|
||||
self.device().shared().counts.bounded_run_draw();
|
||||
Ok(Some(slot))
|
||||
}
|
||||
|
||||
/// A draw joined a run: hold what a new run's command buffer holds, and track the draw's
|
||||
/// reads `uses` (the run's barrier from everything before orders them: the one tracking
|
||||
/// returns goes unrecorded), and count the draw.
|
||||
/// returns goes unrecorded).
|
||||
fn joined(&mut self, held: Option<GatherHeld>, uses: &[Use<ResourceKey>]) {
|
||||
if let Some(held) = held {
|
||||
if let Some(output) = held.output {
|
||||
@@ -799,7 +833,6 @@ impl EncoderCore {
|
||||
uses,
|
||||
&BTreeSet::new(),
|
||||
);
|
||||
self.device().shared().counts.gathered_draw();
|
||||
}
|
||||
|
||||
/// Record the open gather runs, where any is open, into the encoder's `VkCommandBuffer`.
|
||||
|
||||
@@ -35,6 +35,15 @@
|
||||
//! the write there (probes, M3 and M4). A write since the last barrier, which Metal does not
|
||||
//! order before the draw's fetch, is refused, `NotImplemented(IndirectDrawArguments)` as before;
|
||||
//! so is any earlier write where an execution's command draws.
|
||||
//! - **Runs** (`bind::IndexBoundsRun`): a draw that reads its arguments and indices in place,
|
||||
//! where nothing of the encoder wrote them behind a memory barrier and no execution replays it,
|
||||
//! joins an open run of draws over its arguments and index buffers in place of its own pass,
|
||||
//! which records before the encoder's next command with the encoder's other runs
|
||||
//! (`index_rewrite.rs`'s `record_runs`): one plan dispatch of one invocation for the run's
|
||||
//! draws, then one fill dispatch for all of them, where each draw's own pass takes two
|
||||
//! dispatches between three barriers. Each draw's two draws, its reservation and the status are
|
||||
//! the ones its own pass leaves (the module's tests), and its two draws read their commands from
|
||||
//! its slot of the run's words.
|
||||
//! - **Announced** once per device as `indirect-index-bounds-pass` (decision (d)); a draw from
|
||||
//! an index offset at or past the buffer's length, whose positions draw index 0 where Metal
|
||||
//! reads the memory past the buffer (the probe-ix), also as `zeroed-index-fetch`.
|
||||
@@ -44,15 +53,17 @@ use super::draw_source::{DrawSource, IndexBind, SizedIndexBind};
|
||||
use super::encoder::EncoderCore;
|
||||
use super::error::{internal, Error, RuntimeGap};
|
||||
use super::gpu_pools::IndexPool;
|
||||
use super::index_rewrite::GatherHeld;
|
||||
use super::owned_kernel::{OwnedKernel, OwnedModule, OwnedSets};
|
||||
use super::resource::ResourceKey;
|
||||
use super::tracker::{Access, Barrier, Use, UseRange};
|
||||
use super::upload::Upload;
|
||||
use super::upload::{Upload, Uploads};
|
||||
use super::Device;
|
||||
use crate::device::functions::Vk;
|
||||
use ash::vk;
|
||||
use metal2vulkan::bind::{
|
||||
ExecutionStatus, IndexBoundsFillModule, IndexBoundsPass, IndexBoundsPlanModule, IndexBufferRef,
|
||||
IndirectRef,
|
||||
BoundsRunDraw, ExecutionStatus, IndexBoundsFillModule, IndexBoundsPass, IndexBoundsPlanModule,
|
||||
IndexBoundsRun, IndexBufferRef, IndirectRef,
|
||||
};
|
||||
|
||||
/// One draw's pass, planned: what records before the render pass instance, and the two draws in
|
||||
@@ -146,8 +157,7 @@ impl BoundsPass {
|
||||
OwnedSets::write(&device, &plan, &[plan_set.to_vec()])?,
|
||||
OwnedSets::write(&device, &fill, &[fill_set.to_vec()])?,
|
||||
];
|
||||
let (buffer, offset) = index.metal();
|
||||
let past_length = (offset >= buffer.length()).then(|| (offset, buffer.length()));
|
||||
let past_length = past_length(index);
|
||||
Ok(BoundsPass {
|
||||
words,
|
||||
pool,
|
||||
@@ -187,93 +197,131 @@ impl BoundsPass {
|
||||
};
|
||||
core.retain(plan_sets);
|
||||
core.retain(fill_sets);
|
||||
let device = core.device();
|
||||
device.degrade(Degradation::IndirectIndexBoundsPass, || {
|
||||
(
|
||||
"an indexed indirect draw whose index fetch nothing bounds".to_owned(),
|
||||
"the device does not enable robustBufferAccess2, or its driver is not measured to \
|
||||
read index 0 past the bound range, or the draw's index offset lies at or past the \
|
||||
buffer's length, so the draw's indices are bounded on the GPU before the pass"
|
||||
.to_owned(),
|
||||
)
|
||||
});
|
||||
if let Some((offset, length)) = past_length {
|
||||
device.degrade(Degradation::ZeroedIndexFetch, || {
|
||||
(
|
||||
format!(
|
||||
"an indexed indirect draw from offset {offset} of an index buffer of \
|
||||
{length} bytes"
|
||||
),
|
||||
"its offset lies at or past the buffer's length, so each position draws \
|
||||
index 0 plus the base vertex"
|
||||
.to_owned(),
|
||||
)
|
||||
});
|
||||
}
|
||||
announce(core.device(), past_length);
|
||||
steps
|
||||
}
|
||||
|
||||
/// The two draws of the pass, in order: each its index binding, the `VkBuffer` of its
|
||||
/// arguments, and its command. `draw` is the binder's indexed indirect draw of `index`, and
|
||||
/// `sized` the device's index range binding.
|
||||
/// The two draws of the pass ([`two_draws`]).
|
||||
pub(super) fn draws(
|
||||
&self,
|
||||
index: &DrawSource<'_>,
|
||||
draw: metal2vulkan::vk::DrawCommand,
|
||||
sized: Option<SizedIndexBind>,
|
||||
) -> Result<
|
||||
[(
|
||||
Option<IndexBind>,
|
||||
Option<vk::Buffer>,
|
||||
metal2vulkan::vk::DrawCommand,
|
||||
); 2],
|
||||
Error,
|
||||
> {
|
||||
let metal2vulkan::vk::DrawCommand::DrawIndexedIndirect {
|
||||
index_type,
|
||||
index_buffer_offset,
|
||||
..
|
||||
} = draw
|
||||
else {
|
||||
return Err(internal(
|
||||
"an index bounds pass of a draw that is not indexed indirect",
|
||||
));
|
||||
};
|
||||
let words = self.words.raw();
|
||||
) -> Result<[BoundDraw; 2], Error> {
|
||||
let at = |offset: u64| self.words.offset() + offset;
|
||||
// The first draws only where every position lies inside the buffer's whole indices;
|
||||
// with none inside, its offset may lie past the `VkBuffer`, so it binds offset 0 and
|
||||
// draws nothing.
|
||||
let first_offset = if index.bound(index.at) == 0 {
|
||||
0
|
||||
} else {
|
||||
index_buffer_offset
|
||||
};
|
||||
let first = metal2vulkan::vk::DrawCommand::DrawIndexedIndirect {
|
||||
index_type,
|
||||
index_buffer_offset: first_offset,
|
||||
offset: at(IndexBoundsPass::FIRST_DRAW_OFFSET),
|
||||
draw_count: 1,
|
||||
stride: 20,
|
||||
};
|
||||
let pool_indices = IndexBoundsPass::POOL_HEADER_BYTES;
|
||||
let second = metal2vulkan::vk::DrawCommand::DrawIndexedIndirect {
|
||||
index_type,
|
||||
index_buffer_offset: pool_indices,
|
||||
offset: at(IndexBoundsPass::SECOND_DRAW_OFFSET),
|
||||
draw_count: 1,
|
||||
stride: 20,
|
||||
};
|
||||
let pool = IndexBind {
|
||||
buffer: self.pool.block,
|
||||
offset: pool_indices,
|
||||
index_type: index_type.into(),
|
||||
sized: sized.map(|bind| (bind, self.pool.index_bytes())),
|
||||
};
|
||||
Ok([
|
||||
(IndexBind::of(index, first, sized), Some(words), first),
|
||||
(Some(pool), Some(words), second),
|
||||
])
|
||||
two_draws(
|
||||
(index, draw, sized),
|
||||
(
|
||||
self.words.raw(),
|
||||
at(IndexBoundsPass::FIRST_DRAW_OFFSET),
|
||||
at(IndexBoundsPass::SECOND_DRAW_OFFSET),
|
||||
),
|
||||
&self.pool,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// One Vulkan draw of a bounded draw: its index binding, the `VkBuffer` of its arguments, and its
|
||||
/// command.
|
||||
pub(super) type BoundDraw = (
|
||||
Option<IndexBind>,
|
||||
Option<vk::Buffer>,
|
||||
metal2vulkan::vk::DrawCommand,
|
||||
);
|
||||
|
||||
/// The two draws of a pass or a run's slot, in order, their commands in `words` at `first` and
|
||||
/// `second`: the first over the Metal index buffer as `index` binds it, the second over `pool`.
|
||||
/// `draw` is the binder's indexed indirect draw of `index`, and `sized` the device's index range
|
||||
/// binding.
|
||||
fn two_draws(
|
||||
(index, draw, sized): (
|
||||
&DrawSource<'_>,
|
||||
metal2vulkan::vk::DrawCommand,
|
||||
Option<SizedIndexBind>,
|
||||
),
|
||||
(words, first, second): (vk::Buffer, u64, u64),
|
||||
pool: &IndexPool,
|
||||
) -> Result<[BoundDraw; 2], Error> {
|
||||
let metal2vulkan::vk::DrawCommand::DrawIndexedIndirect {
|
||||
index_type,
|
||||
index_buffer_offset,
|
||||
..
|
||||
} = draw
|
||||
else {
|
||||
return Err(internal(
|
||||
"an index bounds pass of a draw that is not indexed indirect",
|
||||
));
|
||||
};
|
||||
// The first draws only where every position lies inside the buffer's whole indices; with
|
||||
// none inside, its offset may lie past the `VkBuffer`, so it binds offset 0 and draws
|
||||
// nothing.
|
||||
let first_offset = if index.bound(index.at) == 0 {
|
||||
0
|
||||
} else {
|
||||
index_buffer_offset
|
||||
};
|
||||
let first_draw = metal2vulkan::vk::DrawCommand::DrawIndexedIndirect {
|
||||
index_type,
|
||||
index_buffer_offset: first_offset,
|
||||
offset: first,
|
||||
draw_count: 1,
|
||||
stride: 20,
|
||||
};
|
||||
let pool_indices = IndexBoundsPass::POOL_HEADER_BYTES;
|
||||
let second_draw = metal2vulkan::vk::DrawCommand::DrawIndexedIndirect {
|
||||
index_type,
|
||||
index_buffer_offset: pool_indices,
|
||||
offset: second,
|
||||
draw_count: 1,
|
||||
stride: 20,
|
||||
};
|
||||
let pooled = IndexBind {
|
||||
buffer: pool.block,
|
||||
offset: pool_indices,
|
||||
index_type: index_type.into(),
|
||||
sized: sized.map(|bind| (bind, pool.index_bytes())),
|
||||
};
|
||||
Ok([
|
||||
(
|
||||
IndexBind::of(index, first_draw, sized),
|
||||
Some(words),
|
||||
first_draw,
|
||||
),
|
||||
(Some(pooled), Some(words), second_draw),
|
||||
])
|
||||
}
|
||||
|
||||
/// The index offset and the buffer's length of a draw from `index`, where the offset lies at or
|
||||
/// past the length: every position draws index 0 there, where Metal reads memory.
|
||||
fn past_length(index: &DrawSource<'_>) -> Option<(u64, u64)> {
|
||||
let (buffer, offset) = index.metal();
|
||||
(offset >= buffer.length()).then(|| (offset, buffer.length()))
|
||||
}
|
||||
|
||||
/// Announce the pass once per device, and where the draw's index offset lies at or past the
|
||||
/// buffer's length (`past_length`), the zeroed fetch.
|
||||
fn announce(device: &Device, past_length: Option<(u64, u64)>) {
|
||||
device.degrade(Degradation::IndirectIndexBoundsPass, || {
|
||||
(
|
||||
"an indexed indirect draw whose index fetch nothing bounds".to_owned(),
|
||||
"the device does not enable robustBufferAccess2, or its driver is not measured to read \
|
||||
index 0 past the bound range, or the draw's index offset lies at or past the buffer's \
|
||||
length, so the draw's indices are bounded on the GPU before the pass"
|
||||
.to_owned(),
|
||||
)
|
||||
});
|
||||
if let Some((offset, length)) = past_length {
|
||||
device.degrade(Degradation::ZeroedIndexFetch, || {
|
||||
(
|
||||
format!(
|
||||
"an indexed indirect draw from offset {offset} of an index buffer of {length} \
|
||||
bytes"
|
||||
),
|
||||
"its offset lies at or past the buffer's length, so each position draws index 0 \
|
||||
plus the base vertex"
|
||||
.to_owned(),
|
||||
)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,37 +426,16 @@ impl BoundsSteps {
|
||||
///
|
||||
/// `command_buffer` is recording outside a render pass, and only one encoder records it.
|
||||
unsafe fn dispatches(&self, raw: &Vk, command_buffer: vk::CommandBuffer) {
|
||||
let bind = |kernel: &OwnedKernel, sets: &[vk::DescriptorSet]| {
|
||||
// SAFETY: as the caller states; the kernel is the device's, and its sets are live
|
||||
// until the command buffer completes (retained by `into_steps`).
|
||||
unsafe {
|
||||
raw.cmd_bind_pipeline(
|
||||
command_buffer,
|
||||
vk::PipelineBindPoint::COMPUTE,
|
||||
kernel.pipeline,
|
||||
);
|
||||
raw.cmd_bind_descriptor_sets(
|
||||
command_buffer,
|
||||
vk::PipelineBindPoint::COMPUTE,
|
||||
kernel.layout,
|
||||
0,
|
||||
sets,
|
||||
&[],
|
||||
);
|
||||
}
|
||||
};
|
||||
let (words, offset) = self.words;
|
||||
bind(&self.plan, &self.sets[0]);
|
||||
// SAFETY: as above; the uploads and the Metal buffers the sets name are live until the
|
||||
// command buffer completes, and the fill's dispatch arguments lie in the words, which the
|
||||
// plan writes before the barrier between the two.
|
||||
// SAFETY: as the caller states; the kernels are the device's, and their sets are live
|
||||
// until the command buffer completes (retained by `into_steps`), as are the uploads and
|
||||
// the Metal buffers the sets name; the fill's dispatch arguments lie in the words, which
|
||||
// the plan writes before the barrier between the two.
|
||||
unsafe {
|
||||
bind_kernel(raw, command_buffer, &self.plan, &self.sets[0]);
|
||||
raw.cmd_dispatch(command_buffer, 1, 1, 1);
|
||||
Barrier::everything().record(raw, command_buffer);
|
||||
}
|
||||
bind(&self.fill, &self.sets[1]);
|
||||
// SAFETY: as above.
|
||||
unsafe {
|
||||
bind_kernel(raw, command_buffer, &self.fill, &self.sets[1]);
|
||||
raw.cmd_dispatch_indirect(
|
||||
command_buffer,
|
||||
words,
|
||||
@@ -417,3 +444,266 @@ impl BoundsSteps {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// An indexed indirect draw's index bounds, which records before the pass: its own pass, or its
|
||||
/// slot of a run (the module docs).
|
||||
pub(super) enum Bounded {
|
||||
Pass(Box<BoundsPass>),
|
||||
Run(BoundsSlot),
|
||||
}
|
||||
|
||||
impl Bounded {
|
||||
/// The reads of the Metal arguments and indices that record with the draw: its own pass's; a
|
||||
/// run's draw's were tracked when it joined.
|
||||
pub(super) fn uses(&self) -> &[Use<ResourceKey>] {
|
||||
match self {
|
||||
Bounded::Pass(pass) => pass.uses(),
|
||||
Bounded::Run(_) => &[],
|
||||
}
|
||||
}
|
||||
|
||||
/// The two draws ([`two_draws`]).
|
||||
pub(super) fn draws(
|
||||
&self,
|
||||
index: &DrawSource<'_>,
|
||||
draw: metal2vulkan::vk::DrawCommand,
|
||||
sized: Option<SizedIndexBind>,
|
||||
) -> Result<[BoundDraw; 2], Error> {
|
||||
match self {
|
||||
Bounded::Pass(pass) => pass.draws(index, draw, sized),
|
||||
Bounded::Run(slot) => {
|
||||
let (words, at) = slot.words;
|
||||
two_draws(
|
||||
(index, draw, sized),
|
||||
(
|
||||
words,
|
||||
at + IndexBoundsRun::first_draw_offset(slot.slot),
|
||||
at + IndexBoundsRun::second_draw_offset(slot.slot),
|
||||
),
|
||||
&slot.pool,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The most draws of a run: its words fit half an ordinary chunk of the upload arena
|
||||
/// (`upload.rs`).
|
||||
const RUN_DRAWS: u32 = 288;
|
||||
|
||||
/// An indexed indirect draw whose index fetch a run of the index bounds pass bounds: its Metal
|
||||
/// index and arguments sources, both read in place, and its index size.
|
||||
pub(super) struct BoundsRunRequest<'a> {
|
||||
pub(super) index: &'a DrawSource<'a>,
|
||||
pub(super) indirect: &'a DrawSource<'a>,
|
||||
pub(super) index_size: u64,
|
||||
}
|
||||
|
||||
/// What a run's draws share: the arguments' `VkBuffer` and the bytes it binds of it, then the
|
||||
/// indices'.
|
||||
type RunKey = ((vk::Buffer, u64, u64), (vk::Buffer, u64, u64));
|
||||
|
||||
/// One run of the index bounds pass: its draws, what they share, its words' region, its kernels
|
||||
/// and their sets (the plan's, then the fill's).
|
||||
pub(super) struct BoundsRun {
|
||||
run: IndexBoundsRun,
|
||||
key: RunKey,
|
||||
words: Upload,
|
||||
plan: OwnedKernel,
|
||||
fill: OwnedKernel,
|
||||
sets: [Vec<vk::DescriptorSet>; 2],
|
||||
}
|
||||
|
||||
/// A draw's slot of a run: the run's words' `VkBuffer` and offset, the slot, the command
|
||||
/// buffer's index pool, and the draw's index offset and buffer length where the offset lies at
|
||||
/// or past the length.
|
||||
pub(super) struct BoundsSlot {
|
||||
words: (vk::Buffer, u64),
|
||||
slot: u32,
|
||||
pool: IndexPool,
|
||||
past_length: Option<(u64, u64)>,
|
||||
}
|
||||
|
||||
impl BoundsSlot {
|
||||
/// Announce the bounds as the draw's own pass announces them. Call it once the draw records.
|
||||
pub(super) fn announce(&self, device: &Device) {
|
||||
announce(device, self.past_length);
|
||||
}
|
||||
}
|
||||
|
||||
/// `request`'s draw joins an open run of `runs` over its arguments and index buffers that takes
|
||||
/// it, or a new one into `pool`, with its words' region in `uploads` and `status` the command
|
||||
/// buffer's status words: its slot, and what a new run's command buffer holds. `None` where no
|
||||
/// run takes the draw (its own pass would not be made, or its bytes are past what a run's
|
||||
/// bindings take), which its own pass then bounds. Refused as uploads, kernels and descriptor
|
||||
/// sets are refused.
|
||||
pub(super) fn join(
|
||||
runs: &mut Vec<BoundsRun>,
|
||||
device: &Device,
|
||||
(uploads, status, pool): (&mut Uploads, &Upload, &IndexPool),
|
||||
request: BoundsRunRequest<'_>,
|
||||
) -> Result<Option<(BoundsSlot, Option<GatherHeld>)>, Error> {
|
||||
let BoundsRunRequest {
|
||||
index,
|
||||
indirect,
|
||||
index_size,
|
||||
} = request;
|
||||
// The run binds each Metal buffer's bytes, from its start, through its length (an index
|
||||
// buffer's rounded up to 4, `IndexBufferRef::fetch_end`).
|
||||
let bytes = |source: &DrawSource<'_>| (source.raw, source.at - source.metal().1, source.length);
|
||||
let key = (bytes(indirect), bytes(index));
|
||||
let draw = BoundsRunDraw {
|
||||
arguments_offset: indirect.at,
|
||||
index_size,
|
||||
index_offset: index.at,
|
||||
index_end: index.at + index.bound(index.at),
|
||||
};
|
||||
let slot_of = |run: &BoundsRun, slot| BoundsSlot {
|
||||
words: (run.words.raw(), run.words.offset()),
|
||||
slot,
|
||||
pool: pool.clone(),
|
||||
past_length: past_length(index),
|
||||
};
|
||||
let joined = runs
|
||||
.iter_mut()
|
||||
.filter(|run| run.key == key && run.run.len() < RUN_DRAWS as usize)
|
||||
.find_map(|run| {
|
||||
let slot = run.run.push(draw)?;
|
||||
Some(slot_of(run, slot))
|
||||
});
|
||||
if let Some(slot) = joined {
|
||||
return Ok(Some((slot, None)));
|
||||
}
|
||||
let limits = &device.properties().description.limits;
|
||||
let Ok(pool_bytes) = u32::try_from(pool.index_bytes()) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let ((_, arguments_start, arguments_end), (_, index_start, index_end)) = key;
|
||||
let Some(mut run) = IndexBoundsRun::new(
|
||||
(arguments_start, arguments_end),
|
||||
Some((index_start, index_end)),
|
||||
(
|
||||
limits.min_storage_buffer_offset_alignment,
|
||||
limits.max_storage_buffer_range,
|
||||
limits.max_compute_work_group_count[0],
|
||||
),
|
||||
pool_bytes,
|
||||
) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some(slot) = run.push(draw) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let words = uploads.upload(device, &[], IndexBoundsRun::words_bytes(RUN_DRAWS))?;
|
||||
let plan = device.owned_kernel(OwnedModule::IndexBoundsPlanRun)?;
|
||||
let fill = device.owned_kernel(OwnedModule::IndexBoundsFillRun)?;
|
||||
let region = |upload: &Upload, len: u64| (upload.raw(), upload.offset(), len);
|
||||
let words_range = region(&words, words.len());
|
||||
let arguments = run.arguments_range();
|
||||
let mut plan_set = [(vk::Buffer::null(), 0, 0); 4];
|
||||
plan_set[IndexBoundsPlanModule::WORDS_BINDING as usize] = words_range;
|
||||
plan_set[IndexBoundsPlanModule::ARGUMENTS_BINDING as usize] =
|
||||
(indirect.raw, arguments.offset, arguments.range);
|
||||
plan_set[IndexBoundsPlanModule::POOL_BINDING as usize] =
|
||||
region(&pool.counter, IndexBoundsPass::POOL_HEADER_BYTES);
|
||||
plan_set[IndexBoundsPlanModule::STATUS_BINDING as usize] =
|
||||
region(status, ExecutionStatus::BYTES as u64);
|
||||
let mut fill_set = [(vk::Buffer::null(), 0, 0); 3];
|
||||
fill_set[IndexBoundsFillModule::WORDS_BINDING as usize] = words_range;
|
||||
// No index inside the buffer: nothing reads the binding, which takes the words.
|
||||
fill_set[IndexBoundsFillModule::INDICES_BINDING as usize] = match run.indices_range() {
|
||||
Some(range) => (index.raw, range.offset, range.range),
|
||||
None => words_range,
|
||||
};
|
||||
fill_set[IndexBoundsFillModule::POOL_BINDING as usize] = (pool.block, 0, pool.bytes);
|
||||
let plan_sets = OwnedSets::write(device, &plan, &[plan_set.to_vec()])?;
|
||||
let fill_sets = OwnedSets::write(device, &fill, &[fill_set.to_vec()])?;
|
||||
let run = BoundsRun {
|
||||
run,
|
||||
key,
|
||||
words,
|
||||
plan,
|
||||
fill,
|
||||
sets: [plan_sets.sets.clone(), fill_sets.sets.clone()],
|
||||
};
|
||||
let slot = slot_of(&run, slot);
|
||||
runs.push(run);
|
||||
Ok(Some((
|
||||
slot,
|
||||
Some(GatherHeld {
|
||||
output: None,
|
||||
sets: vec![plan_sets, fill_sets],
|
||||
}),
|
||||
)))
|
||||
}
|
||||
|
||||
impl BoundsRun {
|
||||
/// Write the run's words into its region: before its plan records.
|
||||
pub(super) fn write(&self) {
|
||||
self.words.write(&self.run.words());
|
||||
}
|
||||
|
||||
/// Record the run's plan, one invocation, into `command_buffer`.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// `command_buffer` is recording outside a render pass, and only one encoder records it; the
|
||||
/// run's kernels are the device's, its sets are held until the command buffer completes, and
|
||||
/// its words were written ([`write`](Self::write)).
|
||||
pub(super) unsafe fn record_plan(&self, raw: &Vk, command_buffer: vk::CommandBuffer) {
|
||||
// SAFETY: as the caller states.
|
||||
unsafe {
|
||||
bind_kernel(raw, command_buffer, &self.plan, &self.sets[0]);
|
||||
raw.cmd_dispatch(command_buffer, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/// Record the run's fill into `command_buffer`, dispatched indirectly from what its plan
|
||||
/// wrote into its words.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// As [`record_plan`](Self::record_plan)'s, after the plan and a barrier from its writes to
|
||||
/// the dispatch's reads.
|
||||
pub(super) unsafe fn record_fill(&self, raw: &Vk, command_buffer: vk::CommandBuffer) {
|
||||
// SAFETY: as the caller states.
|
||||
unsafe {
|
||||
bind_kernel(raw, command_buffer, &self.fill, &self.sets[1]);
|
||||
raw.cmd_dispatch_indirect(
|
||||
command_buffer,
|
||||
self.words.raw(),
|
||||
self.words.offset() + IndexBoundsRun::DISPATCH_OFFSET,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Bind `kernel` and its `sets` for the compute dispatches that follow in `command_buffer`.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// `command_buffer` is recording, and only one encoder records it; the kernel is the device's,
|
||||
/// and its sets are live until the command buffer completes.
|
||||
unsafe fn bind_kernel(
|
||||
raw: &Vk,
|
||||
command_buffer: vk::CommandBuffer,
|
||||
kernel: &OwnedKernel,
|
||||
sets: &[vk::DescriptorSet],
|
||||
) {
|
||||
// SAFETY: as the caller states.
|
||||
unsafe {
|
||||
raw.cmd_bind_pipeline(
|
||||
command_buffer,
|
||||
vk::PipelineBindPoint::COMPUTE,
|
||||
kernel.pipeline,
|
||||
);
|
||||
raw.cmd_bind_descriptor_sets(
|
||||
command_buffer,
|
||||
vk::PipelineBindPoint::COMPUTE,
|
||||
kernel.layout,
|
||||
0,
|
||||
sets,
|
||||
&[],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ use super::draw_source::{DrawSource, IndexBind, SizedIndexBind};
|
||||
use super::encoder::EncoderCore;
|
||||
use super::error::{internal, Error, RuntimeGap};
|
||||
use super::gpu_pools::IndexPool;
|
||||
use super::index_bounds;
|
||||
use super::index_bounds::{self, BoundsRun, BoundsRunRequest, BoundsSlot};
|
||||
use super::owned_kernel::{OwnedKernel, OwnedModule, OwnedSets};
|
||||
use super::resource::ResourceKey;
|
||||
use super::tracker::{Access, Barrier, Use, UseRange};
|
||||
@@ -792,19 +792,22 @@ pub(super) struct RewriteRunRequest<'a> {
|
||||
pub(super) wide: bool,
|
||||
}
|
||||
|
||||
/// The runs of an encoder's gathered draws (the module docs, `index_rewrite.rs`'s gather): each
|
||||
/// one dispatch (an indirect run's after its plan), recorded before the encoder's next command,
|
||||
/// between a barrier from everything before and one to everything after for all of them.
|
||||
/// The runs of an encoder's gathered draws (the module docs, `index_rewrite.rs`'s gather) and of
|
||||
/// its bounded ones (`index_bounds.rs`): each one dispatch (an indirect run's and a bounds run's
|
||||
/// after its plan), recorded before the encoder's next command, between a barrier from
|
||||
/// everything before and one to everything after for all of them.
|
||||
#[derive(Default)]
|
||||
pub(super) struct GatherRuns {
|
||||
runs: Vec<GatherRun>,
|
||||
rewrites: Vec<RewriteRun>,
|
||||
bounds: Vec<BoundsRun>,
|
||||
}
|
||||
|
||||
/// The open runs an encoder records now ([`record_runs`]).
|
||||
pub(super) struct TakenRuns {
|
||||
gathers: Vec<GatherRun>,
|
||||
rewrites: Vec<RewriteRun>,
|
||||
bounds: Vec<BoundsRun>,
|
||||
}
|
||||
|
||||
/// What a rewrite run's draws share: the index `VkBuffer` and the bytes it binds of it, the
|
||||
@@ -881,12 +884,12 @@ pub(super) struct GatherHeld {
|
||||
impl GatherRuns {
|
||||
/// Whether no run is open.
|
||||
pub(super) fn is_empty(&self) -> bool {
|
||||
self.runs.is_empty() && self.rewrites.is_empty()
|
||||
self.runs.is_empty() && self.rewrites.is_empty() && self.bounds.is_empty()
|
||||
}
|
||||
|
||||
/// Whether the runs are as many as an encoder keeps open: they record before another opens.
|
||||
pub(super) fn full(&self) -> bool {
|
||||
self.runs.len() + self.rewrites.len() >= OPEN_RUNS
|
||||
self.runs.len() + self.rewrites.len() + self.bounds.len() >= OPEN_RUNS
|
||||
}
|
||||
|
||||
/// The open runs, which record now ([`record_runs`]).
|
||||
@@ -894,6 +897,7 @@ impl GatherRuns {
|
||||
TakenRuns {
|
||||
gathers: std::mem::take(&mut self.runs),
|
||||
rewrites: std::mem::take(&mut self.rewrites),
|
||||
bounds: std::mem::take(&mut self.bounds),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1235,6 +1239,20 @@ impl GatherRuns {
|
||||
}
|
||||
}
|
||||
|
||||
impl GatherRuns {
|
||||
/// `request`'s indexed indirect draw joins an open run of the index bounds pass over its
|
||||
/// arguments and index buffers that takes it, or a new one (`index_bounds::join`): its slot,
|
||||
/// and what a new run's command buffer holds; `None` where no run takes it.
|
||||
pub(super) fn join_bounds(
|
||||
&mut self,
|
||||
device: &Device,
|
||||
regions: (&mut Uploads, &Upload, &IndexPool),
|
||||
request: BoundsRunRequest<'_>,
|
||||
) -> Result<Option<(BoundsSlot, Option<GatherHeld>)>, Error> {
|
||||
index_bounds::join(&mut self.bounds, device, regions, request)
|
||||
}
|
||||
}
|
||||
|
||||
impl RewriteRun {
|
||||
/// Where the run's draw of slot `slot` finds its list (the run's output, from its start, the
|
||||
/// command's first index its region's) and its command.
|
||||
@@ -1400,9 +1418,9 @@ impl CommandedList {
|
||||
|
||||
/// Record `runs` into `command_buffer`: each run's table or words written into its region, then
|
||||
/// between a barrier from everything before and one to everything after, each rewrite run's
|
||||
/// dispatch, each indirect run's plan (one after another: each reads and writes the index pool's
|
||||
/// counter), and after the plans' writes each gather run's dispatch (an indirect run's from its
|
||||
/// plan's).
|
||||
/// dispatch, each bounds run's and indirect run's plan (one after another: each reads and writes
|
||||
/// the index pool's counter), and after the plans' writes each bounds run's fill and each gather
|
||||
/// run's dispatch (an indirect run's and a bounds run's from its plan's).
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
@@ -1418,6 +1436,9 @@ pub(super) unsafe fn record_runs(raw: &Vk, command_buffer: vk::CommandBuffer, ta
|
||||
for run in &taken.rewrites {
|
||||
run.words.write(&run.run.words());
|
||||
}
|
||||
for run in &taken.bounds {
|
||||
run.write();
|
||||
}
|
||||
let bind = |kernel: &OwnedKernel, sets: &[vk::DescriptorSet]| {
|
||||
// SAFETY: as the caller states.
|
||||
unsafe {
|
||||
@@ -1444,16 +1465,26 @@ pub(super) unsafe fn record_runs(raw: &Vk, command_buffer: vk::CommandBuffer, ta
|
||||
raw.cmd_dispatch(command_buffer, run.run.workgroups(), 1, 1);
|
||||
}
|
||||
let plans = runs.iter().filter_map(|run| run.plan.as_ref());
|
||||
for (at, plan) in plans.enumerate() {
|
||||
let bounds = taken.bounds.len();
|
||||
for (at, run) in taken.bounds.iter().enumerate() {
|
||||
if at > 0 {
|
||||
Barrier::between_dispatches().record(raw, command_buffer);
|
||||
}
|
||||
run.record_plan(raw, command_buffer);
|
||||
}
|
||||
for (at, plan) in plans.enumerate() {
|
||||
if bounds + at > 0 {
|
||||
Barrier::between_dispatches().record(raw, command_buffer);
|
||||
}
|
||||
bind(&plan.kernel, &plan.sets);
|
||||
raw.cmd_dispatch(command_buffer, 1, 1, 1);
|
||||
}
|
||||
if runs.iter().any(|run| run.plan.is_some()) {
|
||||
if bounds > 0 || runs.iter().any(|run| run.plan.is_some()) {
|
||||
Barrier::between_dispatches().record(raw, command_buffer);
|
||||
}
|
||||
for run in &taken.bounds {
|
||||
run.record_fill(raw, command_buffer);
|
||||
}
|
||||
for run in runs {
|
||||
bind(&run.kernel, &run.sets);
|
||||
match run.plan {
|
||||
|
||||
@@ -55,6 +55,12 @@ pub(super) enum OwnedModule {
|
||||
IndexBoundsPlan,
|
||||
/// `bind::index_bounds_fill_module`: the plan's reservation in the index pool, filled.
|
||||
IndexBoundsFill,
|
||||
/// `bind::index_bounds_plan_run_module`: a run of indexed indirect draws' index bounds plans,
|
||||
/// by one invocation (`index_bounds.rs`).
|
||||
IndexBoundsPlanRun,
|
||||
/// `bind::index_bounds_fill_run_module`: a run's reservations in the index pool, filled by
|
||||
/// one dispatch.
|
||||
IndexBoundsFillRun,
|
||||
/// `bind::index_gather_module`: the lists of a run of draws, by one dispatch
|
||||
/// (`index_rewrite.rs`).
|
||||
IndexGather,
|
||||
@@ -255,6 +261,18 @@ impl OwnedModule {
|
||||
.map_err(Error::Compile)?;
|
||||
Ok((module.spirv.to_vec(), 3, 0))
|
||||
}
|
||||
OwnedModule::IndexBoundsPlanRun => {
|
||||
let module =
|
||||
metal2vulkan::bind::index_bounds_plan_run_module(device.compile_device())
|
||||
.map_err(Error::Compile)?;
|
||||
Ok((module.spirv.to_vec(), 4, 0))
|
||||
}
|
||||
OwnedModule::IndexBoundsFillRun => {
|
||||
let module =
|
||||
metal2vulkan::bind::index_bounds_fill_run_module(device.compile_device())
|
||||
.map_err(Error::Compile)?;
|
||||
Ok((module.spirv.to_vec(), 3, 0))
|
||||
}
|
||||
OwnedModule::IndexGather => {
|
||||
let module = metal2vulkan::bind::index_gather_module(device.compile_device())
|
||||
.map_err(Error::Compile)?;
|
||||
@@ -530,6 +548,8 @@ pub(super) struct OwnedKernels {
|
||||
visibility_combine: Option<OwnedKernel>,
|
||||
index_bounds_plan: Option<OwnedKernel>,
|
||||
index_bounds_fill: Option<OwnedKernel>,
|
||||
index_bounds_plan_run: Option<OwnedKernel>,
|
||||
index_bounds_fill_run: Option<OwnedKernel>,
|
||||
index_gather: Option<OwnedKernel>,
|
||||
index_gather_plan: Option<OwnedKernel>,
|
||||
replay_preprocess: Option<OwnedKernel>,
|
||||
@@ -580,6 +600,8 @@ impl OwnedKernels {
|
||||
self.visibility_combine,
|
||||
self.index_bounds_plan,
|
||||
self.index_bounds_fill,
|
||||
self.index_bounds_plan_run,
|
||||
self.index_bounds_fill_run,
|
||||
self.index_gather,
|
||||
self.index_gather_plan,
|
||||
self.replay_preprocess,
|
||||
@@ -716,6 +738,8 @@ impl OwnedKernels {
|
||||
OwnedModule::VisibilityCombine => &mut self.visibility_combine,
|
||||
OwnedModule::IndexBoundsPlan => &mut self.index_bounds_plan,
|
||||
OwnedModule::IndexBoundsFill => &mut self.index_bounds_fill,
|
||||
OwnedModule::IndexBoundsPlanRun => &mut self.index_bounds_plan_run,
|
||||
OwnedModule::IndexBoundsFillRun => &mut self.index_bounds_fill_run,
|
||||
OwnedModule::IndexGather => &mut self.index_gather,
|
||||
OwnedModule::IndexGatherPlan => &mut self.index_gather_plan,
|
||||
OwnedModule::ReplayPreprocess => &mut self.replay_preprocess,
|
||||
|
||||
@@ -294,7 +294,7 @@ use super::framebuffer_fetch;
|
||||
use super::fresh_unwritten::FreshUnwritten;
|
||||
use super::function_table::VisibleFunctionTable;
|
||||
use super::heap_sets;
|
||||
use super::index_bounds::{self, BoundsPass, BoundsSteps};
|
||||
use super::index_bounds::{self, Bounded, BoundsPass, BoundsSteps};
|
||||
use super::index_rewrite::{self, Listed, RewritePass, RewriteSteps, WrittenList};
|
||||
use super::kept_bytes;
|
||||
use super::linear_attachment;
|
||||
@@ -7767,13 +7767,35 @@ impl RenderLowering {
|
||||
{
|
||||
return Err(Error::NotImplemented(RuntimeGap::IndirectDrawArguments));
|
||||
}
|
||||
Some(BoundsPass::new(
|
||||
&mut self.core,
|
||||
index,
|
||||
indirect,
|
||||
size,
|
||||
reads,
|
||||
)?)
|
||||
// A draw that reads both in place, which nothing of the encoder wrote behind a
|
||||
// memory barrier, joins a run of the pass, one plan and one fill for the run's
|
||||
// draws; any other takes its own pass, which records before the draw's render
|
||||
// pass instance where it must.
|
||||
let joined = match !self.replaying
|
||||
&& index.in_place()
|
||||
&& indirect.in_place()
|
||||
&& !self.core.uses().written(&reads)
|
||||
{
|
||||
true => self.core.bounds_run(
|
||||
index_bounds::BoundsRunRequest {
|
||||
index,
|
||||
indirect,
|
||||
index_size: size,
|
||||
},
|
||||
&reads,
|
||||
)?,
|
||||
false => None,
|
||||
};
|
||||
Some(match joined {
|
||||
Some(slot) => Bounded::Run(slot),
|
||||
None => Bounded::Pass(Box::new(BoundsPass::new(
|
||||
&mut self.core,
|
||||
index,
|
||||
indirect,
|
||||
size,
|
||||
reads,
|
||||
)?)),
|
||||
})
|
||||
}
|
||||
};
|
||||
// The dynamic states the pipeline holds, which the draw records and its secondary's record
|
||||
@@ -8772,7 +8794,11 @@ impl RenderLowering {
|
||||
.into_iter()
|
||||
.chain(indirect)
|
||||
.filter_map(DrawSource::copy_reads)
|
||||
.chain(bounds.iter().flat_map(|pass| pass.uses().iter().cloned()))
|
||||
.chain(
|
||||
bounds
|
||||
.iter()
|
||||
.flat_map(|bounded| bounded.uses().iter().cloned()),
|
||||
)
|
||||
.chain(rewrite.iter().flat_map(|pass| pass.uses().iter().cloned()))
|
||||
.collect();
|
||||
self.core.uses().written(&reads) && !self.unordered.written(&reads)
|
||||
@@ -9238,12 +9264,16 @@ impl RenderLowering {
|
||||
}
|
||||
}
|
||||
self.current.tile_memory |= reads_tile_memory;
|
||||
if let Some(pass) = bounds {
|
||||
let pass = pass.into_steps(&mut self.core);
|
||||
match before_instance {
|
||||
true => self.steps_before().push(Before::Bounds(pass)),
|
||||
false => pass.record(&mut self.core),
|
||||
match bounds {
|
||||
Some(Bounded::Pass(pass)) => {
|
||||
let pass = pass.into_steps(&mut self.core);
|
||||
match before_instance {
|
||||
true => self.steps_before().push(Before::Bounds(pass)),
|
||||
false => pass.record(&mut self.core),
|
||||
}
|
||||
}
|
||||
Some(Bounded::Run(slot)) => slot.announce(self.core.device()),
|
||||
None => {}
|
||||
}
|
||||
if let Some(pass) = rewrite {
|
||||
let pass = pass.into_steps(&mut self.core);
|
||||
|
||||
@@ -433,7 +433,7 @@ impl ShapeInputs<'_> {
|
||||
bias,
|
||||
compensation,
|
||||
);
|
||||
let provoking_last = provoking::natively_last(device, self.state, pipeline);
|
||||
let provoking_last = provoking::natively_last(device, self.state, (pipeline, assembly));
|
||||
Ok(DrawSettings {
|
||||
unsized_points,
|
||||
topology,
|
||||
|
||||
@@ -659,6 +659,7 @@ impl RenderLowering {
|
||||
// encoder's provoking vertex mode (Metal probes on the M3 Max, macOS 27.0.1).
|
||||
let mut state = (*self.state).clone();
|
||||
state.set_provoking_last(false);
|
||||
state.set_provoking_third(false);
|
||||
let snapshot = Snapshot {
|
||||
layout: self.layout.clone(),
|
||||
state,
|
||||
|
||||
@@ -5,11 +5,22 @@
|
||||
//!
|
||||
//! - Mode 0 takes a primitive's flat inputs, and the slice and viewport its vertex function
|
||||
//! selects, from its first vertex; mode 1 from its last. Every other value, its top bit set or
|
||||
//! not, draws a third way, which differs between pipeline states (for one, a triangle list from
|
||||
//! its last vertex and an odd strip triangle `(i + 2, i + 1, i)` from `i`; for one whose vertex
|
||||
//! function selects a slice, a triangle from its middle vertex) and draws every line's flat
|
||||
//! inputs and `[[primitive_id]]` 0: the runtime draws them as mode 1, announcing it at the call
|
||||
//! (`Degradation::ProvokingVertexUnmatched`). No value is a validation error.
|
||||
//! not, draws as 2 does, a third way: a triangle list's, a fan's and Metal's private triangle
|
||||
//! types' primitives as mode 1 draws them, flat inputs, `[[primitive_id]]` and weights, but for
|
||||
//! a pipeline whose vertex function selects a slice or viewport, whose triangles take their
|
||||
//! middle vertex; a triangle strip's odd triangle `(i + 2, i + 1, i)` from `i`; every line's
|
||||
//! flat inputs and `[[primitive_id]]` 0; points whose vertex function writes their size another
|
||||
//! way than mode 1's; and patches as mode 0. No value is a validation error.
|
||||
//!
|
||||
//! The runtime draws the third way as mode 1, and patches as mode 0, announcing at each draw
|
||||
//! whose shape Metal's third way draws otherwise than mode 1, as far as its pipeline state reads
|
||||
//! the difference ([`RenderLowering::third_way`]): a strip of triangles whose pipeline reads flat
|
||||
//! inputs, weights, or a slice or viewport; lines whose pipeline reads flat inputs, the primitive
|
||||
//! ID, or a slice or viewport; sized points whose pipeline reads flat inputs or the primitive ID;
|
||||
//! triangles of a pipeline that selects a slice or viewport; and mesh draws, unmeasured, whose
|
||||
//! pipeline reads flat inputs, weights, or a slice or viewport
|
||||
//! (`Degradation::ProvokingVertexUnmatched`). A list's, a fan's and a private type's triangles of
|
||||
//! any other pipeline, and patches, draw as Metal's, silent.
|
||||
//! - At mode 1 the vertex is a line list's `2j + 1`, a line strip's `j + 1`, a triangle list's
|
||||
//! `3j + 2`, a triangle strip's `j + 2`, and Metal's private types' list primitives' last
|
||||
//! (`DrawPrimitiveType`). The barycentric order is mode 0's but for a triangle strip's odd
|
||||
@@ -64,8 +75,8 @@
|
||||
//! fragment function reads flat inputs and barycentrics, and patches and mesh draws, whose
|
||||
//! primitives no list holds (their flat inputs from the first vertex).
|
||||
//!
|
||||
//! An execution's commands take the first vertex: its snapshot of the encoder's state does
|
||||
//! (`render/executions.rs`).
|
||||
//! An execution's commands take the first vertex, at every mode: its snapshot of the encoder's
|
||||
//! state does (`render/executions.rs`).
|
||||
|
||||
use super::{Assembly, RenderLowering};
|
||||
use crate::degradation::Degradation;
|
||||
@@ -180,15 +191,24 @@ fn native(device: &Device) -> bool {
|
||||
.contains(&VkProperty::ProvokingVertexModePerPipeline)
|
||||
}
|
||||
|
||||
/// Whether a draw of `pipeline` under `state` runs a `VkPipeline` of the last provoking vertex
|
||||
/// ([`Provoking::Native`]).
|
||||
/// Whether a draw of `pipeline` as `assembly` under `state` runs a `VkPipeline` of the last
|
||||
/// provoking vertex ([`Provoking::Native`]): patches at a mode past 1 take the first.
|
||||
pub(super) fn natively_last(
|
||||
device: &Device,
|
||||
state: &EncoderState,
|
||||
pipeline: &DrawingState,
|
||||
(pipeline, assembly): (&DrawingState, Assembly),
|
||||
) -> bool {
|
||||
let (flat, weights) = reads(pipeline);
|
||||
state.provoking_last() && (flat || weights) && native(device)
|
||||
state.provoking_last()
|
||||
&& !third_way_first(state, assembly)
|
||||
&& (flat || weights)
|
||||
&& native(device)
|
||||
}
|
||||
|
||||
/// Whether a draw as `assembly` under `state` takes the first vertex at a mode past 1, as Metal's
|
||||
/// third way draws it: patches.
|
||||
fn third_way_first(state: &EncoderState, assembly: Assembly) -> bool {
|
||||
state.provoking_third() && matches!(assembly, Assembly::Patches)
|
||||
}
|
||||
|
||||
/// Whether `draw` of `assembly` makes no primitive: a direct or indexed draw of too few vertices
|
||||
@@ -218,6 +238,17 @@ enum Class {
|
||||
}
|
||||
|
||||
impl Class {
|
||||
/// What a draw of the class draws, in words.
|
||||
fn name(&self) -> &'static str {
|
||||
match self {
|
||||
Class::Points => "points",
|
||||
Class::Lines => "lines",
|
||||
Class::Triangles { strip: true } => "a triangle strip",
|
||||
Class::Triangles { strip: false } => "triangles",
|
||||
Class::Unlisted => "patches or meshes",
|
||||
}
|
||||
}
|
||||
|
||||
fn of(assembly: Assembly) -> Class {
|
||||
use metal2vulkan::bind::RewriteProgram as R;
|
||||
match assembly {
|
||||
@@ -235,29 +266,68 @@ impl Class {
|
||||
|
||||
impl RenderLowering {
|
||||
/// The lowering of `setProvokingVertexMode:`'s `mode`: the encoder's draws from here take
|
||||
/// the first vertex or the last, the third way drawn as the last and announced (the module
|
||||
/// docs).
|
||||
/// the first vertex or the last, the third way drawn as the last but for patches, each draw
|
||||
/// it draws otherwise than Metal announced there (the module docs).
|
||||
pub(crate) fn set_provoking_vertex(&mut self, mode: u64) {
|
||||
let mode = Mode::of(mode);
|
||||
if mode == Mode::Third {
|
||||
self.core
|
||||
.device()
|
||||
.degrade(Degradation::ProvokingVertexUnmatched, || {
|
||||
(
|
||||
"setProvokingVertexMode: of a mode past 1".to_owned(),
|
||||
"Metal draws such a mode a third way, which differs between pipeline \
|
||||
states, and every line's flat inputs and [[primitive_id]] as 0; the \
|
||||
runtime draws it as mode 1"
|
||||
.to_owned(),
|
||||
)
|
||||
});
|
||||
}
|
||||
let last = mode != Mode::First;
|
||||
let (last, third) = (mode != Mode::First, mode == Mode::Third);
|
||||
// Only a change takes the state to a new version (`versioned.rs`), so the draws' memo
|
||||
// holds across a call that repeats the mode.
|
||||
if self.state.provoking_last() != last {
|
||||
self.state.set_provoking_last(last);
|
||||
}
|
||||
if self.state.provoking_third() != third {
|
||||
self.state.set_provoking_third(third);
|
||||
}
|
||||
}
|
||||
|
||||
/// Announce `call`'s draw of `pipeline` as `assembly` at a mode past 1 where Metal's third
|
||||
/// way draws it otherwise than mode 1, as the runtime does, as far as the pipeline state
|
||||
/// reads the difference (the module docs). Patches, which take the first vertex as Metal's,
|
||||
/// and a list's, a fan's and a private type's triangles of a pipeline that selects no slice
|
||||
/// or viewport, which mode 1 draws as Metal, announce nothing.
|
||||
fn third_way(&self, call: &'static str, pipeline: &DrawingState, assembly: Assembly) {
|
||||
let graphics = &pipeline.base().graphics;
|
||||
let flat = graphics.flat_fragment_inputs;
|
||||
let selects = pipeline.vertex_chooses_slice() || graphics.writes_viewport_index;
|
||||
let (weights, ids) = (
|
||||
graphics.reads_barycentric_coord,
|
||||
graphics.reads_primitive_id,
|
||||
);
|
||||
let differs = match Class::of(assembly) {
|
||||
Class::Points => (graphics.writes_point_size && (flat || ids)).then_some(
|
||||
"a point whose vertex function writes its size is drawn otherwise than at mode 1",
|
||||
),
|
||||
Class::Lines => (flat || ids || selects)
|
||||
.then_some("every line's flat inputs and [[primitive_id]] read 0"),
|
||||
Class::Triangles { strip: true } => (flat || weights || selects).then_some(
|
||||
"a strip's odd triangle takes its first vertex, its weights in the order (i + 2, \
|
||||
i + 1, i)",
|
||||
),
|
||||
Class::Triangles { strip: false } => selects.then_some(
|
||||
"a triangle of a pipeline that selects its slice or viewport \
|
||||
takes its middle vertex",
|
||||
),
|
||||
Class::Unlisted if matches!(assembly, Assembly::Meshes) => {
|
||||
(flat || weights || selects).then_some("a mesh draw is unmeasured there")
|
||||
}
|
||||
Class::Unlisted => None,
|
||||
};
|
||||
let Some(how) = differs else {
|
||||
return;
|
||||
};
|
||||
self.core
|
||||
.device()
|
||||
.degrade(Degradation::ProvokingVertexUnmatched, || {
|
||||
(
|
||||
format!(
|
||||
"{call}: a draw of {} under setProvokingVertexMode: of a mode past 1, \
|
||||
whose pipeline state reads what Metal draws a third way there",
|
||||
Class::of(assembly).name()
|
||||
),
|
||||
format!("Metal draws such a mode a third way: {how}; the runtime draws it as mode 1"),
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
/// How `call`'s `draw` of `pipeline` as `assembly` takes the encoder's provoking vertex (the
|
||||
@@ -270,8 +340,17 @@ impl RenderLowering {
|
||||
assembly: Assembly,
|
||||
draw: &DrawCall,
|
||||
) -> Provoking {
|
||||
if !self.state.provoking_last() || makes_none(assembly, draw) {
|
||||
return Provoking::AsIs;
|
||||
}
|
||||
if self.state.provoking_third() {
|
||||
if third_way_first(&self.state, assembly) {
|
||||
return Provoking::AsIs;
|
||||
}
|
||||
self.third_way(call, pipeline, assembly);
|
||||
}
|
||||
let (flat, weights) = reads(pipeline);
|
||||
if !self.state.provoking_last() || !(flat || weights) || makes_none(assembly, draw) {
|
||||
if !(flat || weights) {
|
||||
return Provoking::AsIs;
|
||||
}
|
||||
let device = self.core.device();
|
||||
|
||||
@@ -200,6 +200,9 @@ pub(super) struct EncoderState {
|
||||
/// Apple's `setProvokingVertexMode:` at 1: a primitive's flat inputs read its last vertex
|
||||
/// (`render/provoking.rs`). Metal's default, and every new encoder's, is the first.
|
||||
provoking_last: bool,
|
||||
/// The mode is past 1, which Metal draws a third way, the runtime as mode 1 but for patches
|
||||
/// (`render/provoking.rs`).
|
||||
provoking_third: bool,
|
||||
}
|
||||
|
||||
impl EncoderState {
|
||||
@@ -236,6 +239,7 @@ impl EncoderState {
|
||||
fill_mode: TriangleFillMode::Fill,
|
||||
clip_mode: DepthClipMode::Clip,
|
||||
provoking_last: false,
|
||||
provoking_third: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,6 +329,16 @@ impl EncoderState {
|
||||
self.provoking_last
|
||||
}
|
||||
|
||||
/// `setProvokingVertexMode:`: a mode past 1 where `third` (`render/provoking.rs`).
|
||||
pub(super) fn set_provoking_third(&mut self, third: bool) {
|
||||
self.provoking_third = third;
|
||||
}
|
||||
|
||||
/// Whether the mode is past 1, which Metal draws a third way.
|
||||
pub(super) fn provoking_third(&self) -> bool {
|
||||
self.provoking_third
|
||||
}
|
||||
|
||||
pub(super) fn set_winding(&mut self, winding: Winding) {
|
||||
self.winding = winding;
|
||||
}
|
||||
|
||||
@@ -188,6 +188,7 @@ pub(crate) struct Counters {
|
||||
provoking_last_pipeline_draws: AtomicU64,
|
||||
provoking_listed_draws: AtomicU64,
|
||||
gathered_draws: AtomicU64,
|
||||
bounded_run_draws: AtomicU64,
|
||||
bound_notices_made: AtomicU64,
|
||||
argument_tables_retained: AtomicU64,
|
||||
argument_objects_retained: AtomicU64,
|
||||
@@ -1396,6 +1397,12 @@ impl Counters {
|
||||
self.gathered_draws.fetch_add(1, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// An indexed indirect draw whose index fetch the index bounds pass bounds joined a run of
|
||||
/// it, which plans and fills the run's draws by one dispatch each (`index_bounds.rs`).
|
||||
pub(crate) fn bounded_run_draw(&self) {
|
||||
self.bounded_run_draws.fetch_add(1, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// A bind of a variant made the notices it announces at every occurrence
|
||||
/// (`VariantObjects::announce_bound`).
|
||||
pub(crate) fn bound_notices_made(&self) {
|
||||
@@ -3204,6 +3211,11 @@ pub struct WorkCounts {
|
||||
/// plan dispatch) or the index rewrite pass's (one dispatch for a run of direct indexed draws
|
||||
/// over one index buffer), where a draw's own rewrite pass takes three dispatches.
|
||||
pub gathered_draws: u64,
|
||||
/// Indexed indirect draws whose index fetch the index bounds pass bounds (no
|
||||
/// `robustBufferAccess2`, or a driver not measured to read index 0 past the bound range) that
|
||||
/// joined a run of it: one plan dispatch and one fill dispatch for the run's draws, where a
|
||||
/// draw's own pass takes two dispatches between three barriers.
|
||||
pub bounded_run_draws: u64,
|
||||
/// Notices of a variant's that a bind announces at every occurrence
|
||||
/// (`DeviceOptions::announce_each`), made for a bind: once per variant until the
|
||||
/// specializations or the formats its notices name change; each bind announces them.
|
||||
@@ -4166,6 +4178,7 @@ impl Device {
|
||||
.load(Ordering::Relaxed),
|
||||
provoking_listed_draws: counters.provoking_listed_draws.load(Ordering::Relaxed),
|
||||
gathered_draws: counters.gathered_draws.load(Ordering::Relaxed),
|
||||
bounded_run_draws: counters.bounded_run_draws.load(Ordering::Relaxed),
|
||||
bound_notices_made: counters.bound_notices_made.load(Ordering::Relaxed),
|
||||
argument_tables_retained: counters.argument_tables_retained.load(Ordering::Relaxed),
|
||||
argument_objects_retained: counters.argument_objects_retained.load(Ordering::Relaxed),
|
||||
|
||||
@@ -340,6 +340,109 @@ fn index_positions_past_the_buffer_draw_index_zero_plus_the_base_vertex() {
|
||||
}
|
||||
}
|
||||
|
||||
/// One encoder's indexed indirect draws from one index buffer and one arguments buffer, on a
|
||||
/// device opened without robustness, so that every venue bounds them: each draw's index offset,
|
||||
/// positions, and `seen` after Metal's draw. Inside the buffer; two positions past it; from the
|
||||
/// second index, then past it; of no position; from offsets at and past the length (index 0 plus
|
||||
/// the base vertex at each position); and all four again.
|
||||
const RUN: [(u64, u32, [u32; 8]); 7] = [
|
||||
(0, 2, [0, 0, 0, 0, 0, 1, 1, 0]),
|
||||
(0, POSITIONS, METAL),
|
||||
(4, 3, [0, 0, 0, 0, 1, 0, 1, 0]),
|
||||
(0, 0, [0; 8]),
|
||||
(8, POSITIONS, ZEROS),
|
||||
(16, 1, ZEROS),
|
||||
(0, POSITIONS, METAL),
|
||||
];
|
||||
|
||||
/// The draws of [`RUN`] in one encoder each draw Metal's vertices into a `seen` of its own, and
|
||||
/// each joins the one run of the index bounds pass their buffers share
|
||||
/// (`WorkCounts::bounded_run_draws`): one plan and one fill bound them all, each draw's two
|
||||
/// draws and reservation its own pass's.
|
||||
#[test]
|
||||
fn a_run_of_bounded_indirect_draws_draws_each_draws_metal_vertices() {
|
||||
let bytes: Vec<u8> = INDICES.iter().flat_map(|i| i.to_le_bytes()).collect();
|
||||
let cache = ScratchCache::new().unwrap();
|
||||
let messages = Messages::default();
|
||||
{
|
||||
let device = validated_device_with(TEST_DEVICE, &messages, cache.path(), |options| {
|
||||
Opened::WithoutRobustness.adjust(options)
|
||||
})
|
||||
.unwrap();
|
||||
let name = device.name().to_owned();
|
||||
let shared = shared_kinds(&device);
|
||||
let lane = Lane::new(device);
|
||||
let indices = buffer_with(&lane.device, &bytes).unwrap();
|
||||
let arguments: Vec<u8> = RUN
|
||||
.iter()
|
||||
.flat_map(|&(_, positions, _)| [positions, 1, 0, BASE_VERTEX as u32, 0])
|
||||
.flat_map(u32::to_le_bytes)
|
||||
.collect();
|
||||
let arguments = buffer_with(&lane.device, &arguments).unwrap();
|
||||
let seen: Vec<Buffer> = RUN
|
||||
.iter()
|
||||
.map(|_| buffer_with(&lane.device, &[0; 32]).unwrap())
|
||||
.collect();
|
||||
let before = lane.device.work_counts().bounded_run_draws;
|
||||
let mut pass = RenderPassDescriptor::new();
|
||||
pass.render_target_width = 1;
|
||||
pass.render_target_height = 1;
|
||||
pass.default_raster_sample_count = 1;
|
||||
let command_buffer = lane.queue.command_buffer().unwrap();
|
||||
let mut encoder = command_buffer.render_command_encoder(&pass).unwrap();
|
||||
encoder.set_render_pipeline_state(&lane.pipeline).unwrap();
|
||||
for (at, ((offset, _, _), seen)) in RUN.iter().zip(&seen).enumerate() {
|
||||
encoder.set_vertex_buffer(Some(seen), 0, 0).unwrap();
|
||||
encoder
|
||||
.draw_indexed_primitives_indirect(
|
||||
PrimitiveType::Point,
|
||||
IndexType::UInt32,
|
||||
&indices,
|
||||
*offset,
|
||||
&arguments,
|
||||
at as u64 * 20,
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
encoder.end_encoding().unwrap();
|
||||
command_buffer.commit().unwrap();
|
||||
command_buffer.wait_until_completed_for(WAIT).unwrap();
|
||||
assert_eq!(command_buffer.error(), None, "on {name}");
|
||||
assert_eq!(
|
||||
lane.device.work_counts().bounded_run_draws - before,
|
||||
RUN.len() as u64,
|
||||
"on {name}: the draws joined a run"
|
||||
);
|
||||
for (at, ((offset, positions, metal), seen)) in RUN.iter().zip(&seen).enumerate() {
|
||||
let bytes = read_buffer(seen, 0, 32).unwrap();
|
||||
let words: Vec<u32> = bytes
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|chunk| u32::from_le_bytes(*chunk))
|
||||
.collect();
|
||||
assert_eq!(
|
||||
words, metal,
|
||||
"on {name}: draw {at}, {positions} positions from offset {offset}"
|
||||
);
|
||||
}
|
||||
assert_made_once(
|
||||
&messages,
|
||||
&[
|
||||
Degradation::IndirectIndexBoundsPass,
|
||||
Degradation::ZeroedIndexFetch,
|
||||
],
|
||||
&shared,
|
||||
);
|
||||
println!(
|
||||
"CBF-MARK {name}: {} indexed indirect draws joined one run of the index bounds pass \
|
||||
and drew Metal's vertices",
|
||||
RUN.len()
|
||||
);
|
||||
}
|
||||
assert_eq!(messages.take(), Vec::new(), "the validation layer reported");
|
||||
}
|
||||
|
||||
/// The positions of [`an_indirect_draw_past_the_old_index_pool_draws_metals_vertices`]'s draw:
|
||||
/// 300,000 32-bit positions, 1.2 MB of indices in the command buffer's index pool, past the 1 MiB
|
||||
/// every device's pool once held.
|
||||
|
||||
@@ -919,54 +919,74 @@ fn draws_take_metal_s_last_vertex_listed_through_a_geometry_stage() {
|
||||
run(true, Weights::Withheld);
|
||||
}
|
||||
|
||||
/// A mode past 1, its top bit set or not, which Metal draws a third way, is drawn as mode 1, bit
|
||||
/// for bit, and announced at the call (`provoking-vertex-unmatched`), on the cfg's device.
|
||||
/// The modes past 1 of [`the_third_way_is_drawn_as_mode_1_announced_where_metal_differs`], its
|
||||
/// top bit set or not.
|
||||
const THIRD: [u64; 6] = [
|
||||
2,
|
||||
0xffff_ffff,
|
||||
i64::MAX as u64,
|
||||
1 << 63,
|
||||
u64::MAX - 1,
|
||||
u64::MAX,
|
||||
];
|
||||
|
||||
/// A mode past 1, which Metal draws a third way, is drawn as mode 1, bit for bit, on the cfg's
|
||||
/// device, under `pv_flat` (flat inputs and the primitive ID). A triangle list and a fan, which
|
||||
/// Metal's third way draws as mode 1 there, announce nothing; a triangle strip and a line strip,
|
||||
/// which it draws otherwise, are announced at their draws (`provoking-vertex-unmatched`), each on
|
||||
/// a device of its own, as a device announces a kind once.
|
||||
#[test]
|
||||
fn the_third_way_is_drawn_as_mode_1_announced() {
|
||||
let cache = ScratchCache::new().unwrap();
|
||||
let messages = Messages::default();
|
||||
fn the_third_way_is_drawn_as_mode_1_announced_where_metal_differs() {
|
||||
use DrawPrimitiveType::{Public, TriangleFan};
|
||||
let silent = vec![
|
||||
Case::direct(Public(PrimitiveType::Triangle), Form::Direct, 12, 2),
|
||||
Case::direct(TriangleFan, Form::Direct, 9, 1),
|
||||
];
|
||||
let announced = [
|
||||
Case::direct(Public(PrimitiveType::TriangleStrip), Form::Direct, 12, 2),
|
||||
Case::direct(Public(PrimitiveType::LineStrip), Form::Direct, 9, 1),
|
||||
];
|
||||
let third = |messages: &Messages| {
|
||||
messages
|
||||
.take_notices()
|
||||
.iter()
|
||||
.filter_map(|m| m.degradation.as_ref())
|
||||
.filter(|notice| notice.degradation == Degradation::ProvokingVertexUnmatched)
|
||||
.filter(|notice| notice.object.contains("a mode past 1"))
|
||||
.count()
|
||||
};
|
||||
for (cases, announces) in [(silent, false)]
|
||||
.into_iter()
|
||||
.chain(announced.into_iter().map(|case| (vec![case], true)))
|
||||
{
|
||||
let device = validated_device_with(TEST_DEVICE, &messages, cache.path(), |_| {}).unwrap();
|
||||
let name = device.name().to_owned();
|
||||
let lane = Lane::new(device);
|
||||
let pipeline = lane.pipeline(FRAGMENTS[0]);
|
||||
let strip = DrawPrimitiveType::Public(PrimitiveType::TriangleStrip);
|
||||
let line_strip = DrawPrimitiveType::Public(PrimitiveType::LineStrip);
|
||||
let cases = [
|
||||
Case::direct(strip, Form::Direct, 12, 2),
|
||||
Case::direct(line_strip, Form::Direct, 9, 1),
|
||||
];
|
||||
let at = |case: &Case, mode| lane.draw(&pipeline, case, mode).unwrap();
|
||||
let last: Vec<Texels> = cases.iter().map(|case| at(case, 1)).collect();
|
||||
let third = |messages: &Messages| {
|
||||
messages
|
||||
.take_notices()
|
||||
.iter()
|
||||
.filter_map(|m| m.degradation.as_ref())
|
||||
.filter(|notice| notice.degradation == Degradation::ProvokingVertexUnmatched)
|
||||
.filter(|notice| notice.object.contains("a mode past 1"))
|
||||
.count()
|
||||
};
|
||||
assert_eq!(third(&messages), 0, "{name}");
|
||||
for mode in [
|
||||
2,
|
||||
0xffff_ffff,
|
||||
i64::MAX as u64,
|
||||
1 << 63,
|
||||
u64::MAX - 1,
|
||||
u64::MAX,
|
||||
] {
|
||||
for (case, last) in cases.iter().zip(&last) {
|
||||
assert!(at(case, mode) == *last, "{case:?} at {mode:#x} on {name}");
|
||||
let cache = ScratchCache::new().unwrap();
|
||||
let messages = Messages::default();
|
||||
{
|
||||
let device =
|
||||
validated_device_with(TEST_DEVICE, &messages, cache.path(), |_| {}).unwrap();
|
||||
let name = device.name().to_owned();
|
||||
let lane = Lane::new(device);
|
||||
let pipeline = lane.pipeline(FRAGMENTS[0]);
|
||||
let at = |case: &Case, mode| lane.draw(&pipeline, case, mode).unwrap();
|
||||
let last: Vec<Texels> = cases.iter().map(|case| at(case, 1)).collect();
|
||||
assert_eq!(third(&messages), 0, "{name}");
|
||||
for mode in THIRD {
|
||||
for (case, last) in cases.iter().zip(&last) {
|
||||
assert!(at(case, mode) == *last, "{case:?} at {mode:#x} on {name}");
|
||||
}
|
||||
}
|
||||
assert_eq!(
|
||||
third(&messages) > 0,
|
||||
announces,
|
||||
"{cases:?} on {name}: announced"
|
||||
);
|
||||
}
|
||||
assert!(third(&messages) > 0, "{name}: not announced");
|
||||
let reported = messages.take();
|
||||
assert!(
|
||||
reported.is_empty(),
|
||||
"the validation layer reported: {reported:#?}"
|
||||
);
|
||||
}
|
||||
let reported = messages.take();
|
||||
assert!(
|
||||
reported.is_empty(),
|
||||
"the validation layer reported: {reported:#?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// A draw that makes no primitive, too few vertices or indices for one (a line of one vertex,
|
||||
|
||||
@@ -303,6 +303,38 @@ fn store_word(f: &mut FunctionBuilder<'_>, buffer: Value, index: Value, v: Value
|
||||
f.store(p, v, MemAccess::default())
|
||||
}
|
||||
|
||||
/// A draw's bounds words: the words buffer, and where a run's slot starts in it (`None` for a
|
||||
/// pass's own words, from word 0).
|
||||
#[derive(Clone, Copy)]
|
||||
struct Words {
|
||||
buffer: Value,
|
||||
slot: Option<Value>,
|
||||
}
|
||||
|
||||
impl Words {
|
||||
/// The index into the buffer of the draw's word `index`.
|
||||
fn at(self, f: &mut FunctionBuilder<'_>, index: u32) -> BResult<Value> {
|
||||
let i = k(f, index)?;
|
||||
match self.slot {
|
||||
None => Ok(i),
|
||||
Some(first) => f.binary(BinOp::IAdd, first, i),
|
||||
}
|
||||
}
|
||||
|
||||
/// The draw's word `index`.
|
||||
fn load(self, f: &mut FunctionBuilder<'_>, index: u32) -> BResult<Value> {
|
||||
let i = self.at(f, index)?;
|
||||
let p = word_ptr(f, self.buffer, i)?;
|
||||
f.load(p, MemAccess::default())
|
||||
}
|
||||
|
||||
/// Store `v` as the draw's word `index`.
|
||||
fn store(self, f: &mut FunctionBuilder<'_>, index: u32, v: Value) -> BResult<()> {
|
||||
let i = self.at(f, index)?;
|
||||
store_word(f, self.buffer, i, v)
|
||||
}
|
||||
}
|
||||
|
||||
/// The range of a buffer that a pass binds as a storage buffer of words to read the bytes from
|
||||
/// `offset` to `end` (in the `VkBuffer`'s offsets), and `offset`'s byte in it: from `offset`
|
||||
/// aligned down to `alignment` (`minStorageBufferOffsetAlignment`, and to 4) through `end`
|
||||
@@ -347,6 +379,12 @@ fn contained_word(f: &mut FunctionBuilder<'_>, buffer: Value, index: Value) -> B
|
||||
/// serializes, which the CPU interpreter runs. Its bindings are the symbols [`WORDS`], [`SOURCE`]
|
||||
/// (the arguments), [`POOL`], and [`STATUS`].
|
||||
pub fn plan_typed_module() -> BResult<TypedModule> {
|
||||
plan_module_of(false)
|
||||
}
|
||||
|
||||
/// The plan of a run of draws (`run`) or of one draw, as a typed module: one invocation, which
|
||||
/// plans a run's draws one after another, each from its slot (`run::IndexBoundsRun`).
|
||||
pub(crate) fn plan_module_of(run: bool) -> BResult<TypedModule> {
|
||||
let mut b = ModuleBuilder::new();
|
||||
let u32_ = b.ty(Type::Int {
|
||||
width: 32,
|
||||
@@ -362,22 +400,50 @@ pub fn plan_typed_module() -> BResult<TypedModule> {
|
||||
let arguments = f.module().global_value(arguments)?;
|
||||
let pool = f.module().global_value(pool)?;
|
||||
let status = f.module().global_value(status)?;
|
||||
let zero = k(&mut f, 0)?;
|
||||
let one = k(&mut f, 1)?;
|
||||
let two = k(&mut f, 2)?;
|
||||
let three = k(&mut f, 3)?;
|
||||
let four = k(&mut f, 4)?;
|
||||
let sources = (arguments, pool, status);
|
||||
match run {
|
||||
false => plan_draw(
|
||||
&mut f,
|
||||
Words {
|
||||
buffer: words,
|
||||
slot: None,
|
||||
},
|
||||
sources,
|
||||
)?,
|
||||
true => run::plan_run(&mut f, u32_, words, sources)?,
|
||||
}
|
||||
f.ret(None)?;
|
||||
let id = f.finish()?;
|
||||
b.entry(
|
||||
ExecModel::GLCompute,
|
||||
id,
|
||||
vec![ExecMode::LocalSize { x: 1, y: 1, z: 1 }],
|
||||
)?;
|
||||
b.finalize()
|
||||
}
|
||||
|
||||
let first = load_word(&mut f, words, Parameter::ArgumentsWord as u32)?;
|
||||
let inside = load_word(&mut f, words, Parameter::Inside as u32)?;
|
||||
let wide = load_word(&mut f, words, Parameter::Wide as u32)?;
|
||||
let pool_bytes = load_word(&mut f, words, Parameter::PoolBytes as u32)?;
|
||||
/// The plan of the draw whose bounds words are `words`, over the arguments, pool and status.
|
||||
fn plan_draw(
|
||||
f: &mut FunctionBuilder<'_>,
|
||||
words: Words,
|
||||
(arguments, pool, status): (Value, Value, Value),
|
||||
) -> BResult<()> {
|
||||
let zero = k(f, 0)?;
|
||||
let one = k(f, 1)?;
|
||||
let two = k(f, 2)?;
|
||||
let three = k(f, 3)?;
|
||||
let four = k(f, 4)?;
|
||||
|
||||
let first = words.load(f, Parameter::ArgumentsWord as u32)?;
|
||||
let inside = words.load(f, Parameter::Inside as u32)?;
|
||||
let wide = words.load(f, Parameter::Wide as u32)?;
|
||||
let pool_bytes = words.load(f, Parameter::PoolBytes as u32)?;
|
||||
// Metal's arguments: indexCount, instanceCount, indexStart, baseVertex, baseInstance.
|
||||
let mut argument = Vec::with_capacity(5);
|
||||
for i in 0..5 {
|
||||
let i = k(&mut f, i)?;
|
||||
let i = k(f, i)?;
|
||||
let index = f.binary(BinOp::IAdd, first, i)?;
|
||||
argument.push(contained_word(&mut f, arguments, index)?);
|
||||
argument.push(contained_word(f, arguments, index)?);
|
||||
}
|
||||
let (count, instances, start, base, base_instance) = (
|
||||
argument[0],
|
||||
@@ -400,7 +466,7 @@ pub fn plan_typed_module() -> BResult<TypedModule> {
|
||||
let is_wide = f.binary(BinOp::INotEqual, wide, zero)?;
|
||||
let size = f.select(is_wide, four, two)?;
|
||||
let counter_index = zero;
|
||||
let counter_ptr = word_ptr(&mut f, pool, counter_index)?;
|
||||
let counter_ptr = word_ptr(f, pool, counter_index)?;
|
||||
let reserved = f.load(counter_ptr, MemAccess::default())?;
|
||||
let room = f.binary(BinOp::ISub, pool_bytes, reserved)?;
|
||||
let room_indices = f.binary(BinOp::UDiv, room, size)?;
|
||||
@@ -432,18 +498,17 @@ pub fn plan_typed_module() -> BResult<TypedModule> {
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
{
|
||||
let index = k(&mut f, at + i as u32)?;
|
||||
store_word(&mut f, words, index, v)?;
|
||||
words.store(f, at + i as u32, v)?;
|
||||
}
|
||||
}
|
||||
// The fill: a workgroup per LOCAL_SIZE words of the reservation.
|
||||
let fill_words = f.select(place, word_count, zero)?;
|
||||
let local = k(&mut f, IndexBoundsFillModule::LOCAL_SIZE - 1)?;
|
||||
let local = k(f, IndexBoundsFillModule::LOCAL_SIZE - 1)?;
|
||||
let rounded = f.binary(BinOp::IAdd, fill_words, local)?;
|
||||
let local_size = k(&mut f, IndexBoundsFillModule::LOCAL_SIZE)?;
|
||||
let local_size = k(f, IndexBoundsFillModule::LOCAL_SIZE)?;
|
||||
let groups = f.binary(BinOp::UDiv, rounded, local_size)?;
|
||||
let reserved_word = f.binary(BinOp::ShiftRightLogical, reserved, two)?;
|
||||
let header_words = k(&mut f, (IndexBoundsPass::POOL_HEADER_BYTES / 4) as u32)?;
|
||||
let header_words = k(f, (IndexBoundsPass::POOL_HEADER_BYTES / 4) as u32)?;
|
||||
let pool_word = f.binary(BinOp::IAdd, header_words, reserved_word)?;
|
||||
for (at, v) in [
|
||||
(Output::FillDispatch as u32, groups),
|
||||
@@ -453,32 +518,30 @@ pub fn plan_typed_module() -> BResult<TypedModule> {
|
||||
(Output::FillStart as u32, start),
|
||||
(Output::FillCount as u32, second_count),
|
||||
] {
|
||||
let index = k(&mut f, at)?;
|
||||
store_word(&mut f, words, index, v)?;
|
||||
words.store(f, at, v)?;
|
||||
}
|
||||
// A draw of indices the pool cannot hold draws nothing and says so.
|
||||
let word = k(&mut f, StatusWord::Status.index())?;
|
||||
let bit = k(&mut f, StatusBits::INDEX_POOL_OVERFLOW.0)?;
|
||||
let word = k(f, StatusWord::Status.index())?;
|
||||
let bit = k(f, StatusBits::INDEX_POOL_OVERFLOW.0)?;
|
||||
let then: ArmFn<'_, ()> = Box::new(move |fb, _| {
|
||||
let p = word_ptr(fb, status, word)?;
|
||||
fb.atomic(AtomicOp::Or, p, Scope::Device, Semantics::RELAXED, bit)?;
|
||||
Ok(ArmEnd::FallThrough(Vec::new()))
|
||||
});
|
||||
f.if_(&mut (), overflow, then, None)?;
|
||||
f.ret(None)?;
|
||||
let id = f.finish()?;
|
||||
b.entry(
|
||||
ExecModel::GLCompute,
|
||||
id,
|
||||
vec![ExecMode::LocalSize { x: 1, y: 1, z: 1 }],
|
||||
)?;
|
||||
b.finalize()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The fill as a typed module, before serialization: the module [`index_bounds_fill_module`]
|
||||
/// serializes, which the CPU interpreter runs. Its bindings are the symbols [`WORDS`], [`SOURCE`]
|
||||
/// (the indices), and [`POOL`].
|
||||
pub fn fill_typed_module() -> BResult<TypedModule> {
|
||||
fill_module_of(false)
|
||||
}
|
||||
|
||||
/// The fill of a run of draws (`run`) or of one draw, as a typed module: a run's workgroup fills
|
||||
/// its part of the draw whose fill groups hold it (`run::IndexBoundsRun`).
|
||||
pub(crate) fn fill_module_of(run: bool) -> BResult<TypedModule> {
|
||||
let mut b = ModuleBuilder::new();
|
||||
let u32_ = b.ty(Type::Int {
|
||||
width: 32,
|
||||
@@ -494,19 +557,54 @@ pub fn fill_typed_module() -> BResult<TypedModule> {
|
||||
let words = f.module().global_value(words)?;
|
||||
let indices = f.module().global_value(indices)?;
|
||||
let pool = f.module().global_value(pool)?;
|
||||
let zero = k(&mut f, 0)?;
|
||||
let one = k(&mut f, 1)?;
|
||||
let sixteen = k(&mut f, 16)?;
|
||||
let invocation = f.module().global_value(invocation)?;
|
||||
let invocation = f.load(invocation, MemAccess::default())?;
|
||||
let w = f.composite_extract(invocation, &[0])?;
|
||||
let row = f.composite_extract(invocation, &[1])?;
|
||||
match run {
|
||||
false => fill_draw(
|
||||
&mut f,
|
||||
Words {
|
||||
buffer: words,
|
||||
slot: None,
|
||||
},
|
||||
(indices, pool),
|
||||
w,
|
||||
)?,
|
||||
true => run::fill_run(&mut f, u32_, words, (indices, pool), (w, row))?,
|
||||
}
|
||||
f.ret(None)?;
|
||||
let id = f.finish()?;
|
||||
b.entry(
|
||||
ExecModel::GLCompute,
|
||||
id,
|
||||
vec![ExecMode::LocalSize {
|
||||
x: IndexBoundsFillModule::LOCAL_SIZE,
|
||||
y: 1,
|
||||
z: 1,
|
||||
}],
|
||||
)?;
|
||||
b.finalize()
|
||||
}
|
||||
|
||||
let first_byte = load_word(&mut f, words, Parameter::IndicesByte as u32)?;
|
||||
let inside = load_word(&mut f, words, Parameter::Inside as u32)?;
|
||||
let wide = load_word(&mut f, words, Parameter::Wide as u32)?;
|
||||
let pool_word = load_word(&mut f, words, Output::FillPoolWord as u32)?;
|
||||
let start = load_word(&mut f, words, Output::FillStart as u32)?;
|
||||
let count = load_word(&mut f, words, Output::FillCount as u32)?;
|
||||
/// The fill of word `w` of the reservation of the draw whose bounds words are `words`, from the
|
||||
/// indices into the pool.
|
||||
fn fill_draw(
|
||||
f: &mut FunctionBuilder<'_>,
|
||||
words: Words,
|
||||
(indices, pool): (Value, Value),
|
||||
w: Value,
|
||||
) -> BResult<()> {
|
||||
let zero = k(f, 0)?;
|
||||
let one = k(f, 1)?;
|
||||
let sixteen = k(f, 16)?;
|
||||
|
||||
let first_byte = words.load(f, Parameter::IndicesByte as u32)?;
|
||||
let inside = words.load(f, Parameter::Inside as u32)?;
|
||||
let wide = words.load(f, Parameter::Wide as u32)?;
|
||||
let pool_word = words.load(f, Output::FillPoolWord as u32)?;
|
||||
let start = words.load(f, Output::FillStart as u32)?;
|
||||
let count = words.load(f, Output::FillCount as u32)?;
|
||||
let is_wide = f.binary(BinOp::INotEqual, wide, zero)?;
|
||||
// Words of the reservation: one per 32-bit index, one per two 16-bit ones.
|
||||
let plus_one = f.binary(BinOp::IAdd, count, one)?;
|
||||
@@ -567,18 +665,7 @@ pub fn fill_typed_module() -> BResult<TypedModule> {
|
||||
Ok(ArmEnd::FallThrough(Vec::new()))
|
||||
});
|
||||
f.if_(&mut (), listed, fill, None)?;
|
||||
f.ret(None)?;
|
||||
let id = f.finish()?;
|
||||
b.entry(
|
||||
ExecModel::GLCompute,
|
||||
id,
|
||||
vec![ExecMode::LocalSize {
|
||||
x: IndexBoundsFillModule::LOCAL_SIZE,
|
||||
y: 1,
|
||||
z: 1,
|
||||
}],
|
||||
)?;
|
||||
b.finalize()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The fixed binding numbers of the plan's symbols.
|
||||
@@ -656,5 +743,10 @@ pub fn index_bounds_fill_module(device: &Device) -> Result<IndexBoundsFillModule
|
||||
})
|
||||
}
|
||||
|
||||
mod run;
|
||||
pub use run::{
|
||||
index_bounds_fill_run_module, index_bounds_plan_run_module, BoundsRunDraw, IndexBoundsRun,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -0,0 +1,387 @@
|
||||
//! A run of the index bounds pass: indexed indirect draws over one arguments buffer and one index
|
||||
//! buffer, planned by one dispatch of one invocation and filled by one dispatch for all of them,
|
||||
//! where a draw's own pass takes two dispatches between three barriers. Each draw's plan and fill
|
||||
//! are its own pass's, over its slot of the run's words, so its two draws and its reservation are
|
||||
//! the ones its own pass makes, the plans reserving one after another as passes recorded in turn
|
||||
//! do.
|
||||
//!
|
||||
//! - **The words** ([`IndexBoundsRun::words`], at both modules' `WORDS_BINDING`):
|
||||
//! [`IndexBoundsRun::HEADER_WORDS`] words of header, then one slot of
|
||||
//! [`IndexBoundsRun::SLOT_WORDS`] words per draw.
|
||||
//!
|
||||
//! | Header word | Written by | Contents |
|
||||
//! |---|---|---|
|
||||
//! | 0 | the consumer | the run's draws |
|
||||
//! | 1 to 3 | the plan | the fill's `VkDispatchIndirectCommand` ([`IndexBoundsRun::DISPATCH_OFFSET`]): the run's fill workgroups, at most word 4's along x and as few along y as hold them |
|
||||
//! | 4 | the consumer | the most workgroups of a dispatch along x (`maxComputeWorkGroupCount[0]`) |
|
||||
//! | 5 to 7 | nobody | zero |
|
||||
//!
|
||||
//! A slot's words 0 to 23 are a pass's bounds words (the parent module's table), its two draws
|
||||
//! at [`IndexBoundsRun::first_draw_offset`] and [`IndexBoundsRun::second_draw_offset`]; its word
|
||||
//! 24, which the plan writes, is the draw's first fill workgroup (the fill workgroups of the
|
||||
//! draws before it).
|
||||
//! - **The plan** ([`index_bounds_plan_run_module`]) plans each draw in turn, then writes the
|
||||
//! fill's dispatch; **the fill** ([`index_bounds_fill_run_module`]) finds its workgroup's draw
|
||||
//! (the last whose first fill workgroup is at or before it; workgroup `(x, y)` is the run's
|
||||
//! `y · width + x`, `width` the dispatch's along x) and fills its words. The draws' fill
|
||||
//! workgroups summed may pass what one dispatch takes along x where each draw's alone does not,
|
||||
//! so the dispatch spreads them over y; a workgroup past the last draw's fills nothing.
|
||||
//! - **Bindings**: a pass's, the arguments and the indices the run's bytes
|
||||
//! ([`IndexBoundsRun::arguments_range`], [`IndexBoundsRun::indices_range`]), so one binding
|
||||
//! serves every draw.
|
||||
//! - **Synchronization** (consumer): a pass's, the run's plan and fill in place of a pass's.
|
||||
|
||||
use super::{
|
||||
fill_binding_of, fill_draw, fill_module_of, finished, k, load_word, plan_binding_of, plan_draw,
|
||||
plan_module_of, store_word, word_ptr, word_range, IndexBoundsFillModule, IndexBoundsPass,
|
||||
IndexBoundsPlanModule, Output, Parameter, Words,
|
||||
};
|
||||
use crate::bind::index_rewrite::{for_range, when};
|
||||
use crate::bind::instantiate::{BufferRange, IndirectRef};
|
||||
use crate::device::Device;
|
||||
use crate::error::Error;
|
||||
use crate::spirv::builder::FunctionBuilder;
|
||||
use crate::spirv::error::BResult;
|
||||
use crate::spirv::ids::{TypeId, Value};
|
||||
use crate::spirv::ir::{BinOp, MemAccess};
|
||||
|
||||
/// A run of indexed indirect draws of the index bounds pass (the module docs).
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct IndexBoundsRun {
|
||||
/// The bound arguments bytes.
|
||||
arguments: BufferRange,
|
||||
/// The bound index bytes, and their end.
|
||||
indices: Option<(BufferRange, u64)>,
|
||||
alignment: u64,
|
||||
max_range: u32,
|
||||
/// The most workgroups of a dispatch along x.
|
||||
max_groups: u32,
|
||||
pool_bytes: u32,
|
||||
/// Each draw's slot.
|
||||
slots: Vec<[u32; IndexBoundsRun::SLOT_WORDS as usize]>,
|
||||
}
|
||||
|
||||
/// One draw of a run: where its Metal arguments lie (in the bound arguments buffer's offsets),
|
||||
/// its index size (2 or 4), its index offset, and the end of the bytes its fetch reads (in the
|
||||
/// bound index buffer's offsets).
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct BoundsRunDraw {
|
||||
/// The offset of the draw's `MTLDrawIndexedPrimitivesIndirectArguments`.
|
||||
pub arguments_offset: u64,
|
||||
/// The draw's index size in bytes.
|
||||
pub index_size: u64,
|
||||
/// The draw's index offset: a multiple of its index size.
|
||||
pub index_offset: u64,
|
||||
/// Where the draw's fetch stops reading bytes: a position from there on reads index 0.
|
||||
pub index_end: u64,
|
||||
}
|
||||
|
||||
/// A slot's word past a pass's bounds words: the draw's first fill workgroup.
|
||||
const FIRST_GROUP: u32 = 24;
|
||||
|
||||
impl IndexBoundsRun {
|
||||
/// Words of the header.
|
||||
pub const HEADER_WORDS: u32 = 8;
|
||||
/// Words of a draw's slot: a pass's bounds words and the draw's first fill workgroup,
|
||||
/// rounded up to 16 bytes.
|
||||
pub const SLOT_WORDS: u32 = 28;
|
||||
/// Bytes of a draw's slot.
|
||||
pub const SLOT_BYTES: u64 = 4 * Self::SLOT_WORDS as u64;
|
||||
/// The fill's `VkDispatchIndirectCommand` in the words.
|
||||
pub const DISPATCH_OFFSET: u64 = 4;
|
||||
|
||||
/// An empty run of draws whose arguments lie in the bytes from `arguments_start` to
|
||||
/// `arguments_end` of a buffer, and with `indices` the bytes of an index buffer it binds
|
||||
/// (`None` where none lies inside it), each bound at an offset aligned to `alignment`
|
||||
/// (`minStorageBufferOffsetAlignment`) over at most `max_range` bytes
|
||||
/// (`maxStorageBufferRange`), into a pool of `pool_bytes` index bytes, its fill dispatched
|
||||
/// over at most `max_groups` workgroups along x (`maxComputeWorkGroupCount[0]`). `None` where
|
||||
/// the arguments' bytes are none, where bytes are past `max_range`, and where `max_groups` is
|
||||
/// 0.
|
||||
pub fn new(
|
||||
(arguments_start, arguments_end): (u64, u64),
|
||||
indices: Option<(u64, u64)>,
|
||||
(alignment, max_range, max_groups): (u64, u32, u32),
|
||||
pool_bytes: u32,
|
||||
) -> Option<IndexBoundsRun> {
|
||||
if arguments_end <= arguments_start || max_groups == 0 {
|
||||
return None;
|
||||
}
|
||||
let (arguments, _) = word_range(arguments_start, arguments_end, alignment, max_range)?;
|
||||
let indices = match indices {
|
||||
Some((start, end)) if end > start => {
|
||||
let (range, _) = word_range(start, end, alignment, max_range)?;
|
||||
Some((range, range.offset + range.range))
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
Some(IndexBoundsRun {
|
||||
arguments,
|
||||
indices,
|
||||
alignment,
|
||||
max_range,
|
||||
max_groups,
|
||||
pool_bytes,
|
||||
slots: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
/// Add `draw` to the run: its slot. `None` where the run cannot take it, and is as before:
|
||||
/// where its own pass would not be made ([`IndexBoundsPass::new`]), and where its arguments or
|
||||
/// the indices it reads lie outside the run's bound bytes.
|
||||
pub fn push(&mut self, draw: BoundsRunDraw) -> Option<u32> {
|
||||
let slot = u32::try_from(self.slots.len()).ok()?;
|
||||
let pass = IndexBoundsPass::new(
|
||||
IndirectRef::new(0, draw.arguments_offset),
|
||||
draw.index_size,
|
||||
draw.index_offset,
|
||||
draw.index_end,
|
||||
self.alignment,
|
||||
self.max_range,
|
||||
self.pool_bytes,
|
||||
)?;
|
||||
let mut parameters = pass.parameters;
|
||||
// Its arguments and indices within the run's bound bytes: their words there.
|
||||
let arguments_end = draw.arguments_offset.checked_add(20)?;
|
||||
if draw.arguments_offset < self.arguments.offset
|
||||
|| arguments_end > self.arguments.offset + self.arguments.range
|
||||
{
|
||||
return None;
|
||||
}
|
||||
parameters[Parameter::ArgumentsWord as usize] =
|
||||
u32::try_from((draw.arguments_offset - self.arguments.offset) / 4).ok()?;
|
||||
if pass.indices_range.is_some() {
|
||||
let inside = u64::from(parameters[Parameter::Inside as usize]);
|
||||
let end = draw
|
||||
.index_offset
|
||||
.checked_add(inside.checked_mul(draw.index_size)?)?;
|
||||
let (range, bound_end) = self.indices?;
|
||||
if draw.index_offset < range.offset || end > bound_end {
|
||||
return None;
|
||||
}
|
||||
parameters[Parameter::IndicesByte as usize] =
|
||||
u32::try_from(draw.index_offset - range.offset).ok()?;
|
||||
}
|
||||
let mut words = [0; Self::SLOT_WORDS as usize];
|
||||
words[..IndexBoundsPass::PARAMETER_WORDS].copy_from_slice(¶meters);
|
||||
self.slots.push(words);
|
||||
Some(slot)
|
||||
}
|
||||
|
||||
/// The run's draws.
|
||||
pub fn len(&self) -> usize {
|
||||
self.slots.len()
|
||||
}
|
||||
|
||||
/// Whether the run has no draw.
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.slots.is_empty()
|
||||
}
|
||||
|
||||
/// The range of the indirect buffer to bind at [`IndexBoundsPlanModule::ARGUMENTS_BINDING`].
|
||||
pub fn arguments_range(&self) -> BufferRange {
|
||||
self.arguments
|
||||
}
|
||||
|
||||
/// The range of the index buffer to bind at [`IndexBoundsFillModule::INDICES_BINDING`]: the
|
||||
/// bytes [`new`](Self::new) names, aligned down, through a whole word; `None` where they are
|
||||
/// none (the fill then reads nothing).
|
||||
pub fn indices_range(&self) -> Option<BufferRange> {
|
||||
self.indices.map(|(range, _)| range)
|
||||
}
|
||||
|
||||
/// The words to upload: the header, then each draw's slot in turn.
|
||||
pub fn words(&self) -> Vec<u8> {
|
||||
let mut header = [0; Self::HEADER_WORDS as usize];
|
||||
header[0] = self.slots.len() as u32;
|
||||
header[4] = self.max_groups;
|
||||
header
|
||||
.iter()
|
||||
.chain(self.slots.iter().flatten())
|
||||
.flat_map(|w| w.to_le_bytes())
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// The bytes of the words of a run of `draws` draws.
|
||||
pub fn words_bytes(draws: u32) -> u64 {
|
||||
4 * u64::from(Self::HEADER_WORDS) + u64::from(draws) * Self::SLOT_BYTES
|
||||
}
|
||||
|
||||
/// The byte of the words at which slot `slot`'s first draw's `VkDrawIndexedIndirectCommand`
|
||||
/// lies: over the Metal index buffer, where every position lies inside it.
|
||||
pub fn first_draw_offset(slot: u32) -> u64 {
|
||||
Self::slot_offset(slot) + IndexBoundsPass::FIRST_DRAW_OFFSET
|
||||
}
|
||||
|
||||
/// The byte of the words at which slot `slot`'s second draw's `VkDrawIndexedIndirectCommand`
|
||||
/// lies: over the pool, where any position lies past the buffer.
|
||||
pub fn second_draw_offset(slot: u32) -> u64 {
|
||||
Self::slot_offset(slot) + IndexBoundsPass::SECOND_DRAW_OFFSET
|
||||
}
|
||||
|
||||
/// The byte of the words at which slot `slot` starts.
|
||||
fn slot_offset(slot: u32) -> u64 {
|
||||
4 * u64::from(Self::HEADER_WORDS) + u64::from(slot) * Self::SLOT_BYTES
|
||||
}
|
||||
}
|
||||
|
||||
/// The first word of the slot of draw `d`.
|
||||
fn slot_word(f: &mut FunctionBuilder<'_>, d: Value) -> BResult<Value> {
|
||||
let per = k(f, IndexBoundsRun::SLOT_WORDS)?;
|
||||
let header = k(f, IndexBoundsRun::HEADER_WORDS)?;
|
||||
let at = f.binary(BinOp::IMul, d, per)?;
|
||||
f.binary(BinOp::IAdd, header, at)
|
||||
}
|
||||
|
||||
/// The plan of a run: each draw's plan in turn over its slot, each draw's first fill workgroup
|
||||
/// the fill workgroups before it, then the fill's dispatch of all of them.
|
||||
pub(super) fn plan_run(
|
||||
f: &mut FunctionBuilder<'_>,
|
||||
u32_: TypeId,
|
||||
words: Value,
|
||||
sources: (Value, Value, Value),
|
||||
) -> BResult<()> {
|
||||
let zero = k(f, 0)?;
|
||||
let one = k(f, 1)?;
|
||||
let draws = load_word(f, words, 0)?;
|
||||
let total_var = f.local_var(u32_, None)?;
|
||||
let total = f.var_ptr(total_var)?;
|
||||
f.store(total, zero, MemAccess::default())?;
|
||||
for_range(f, u32_, (zero, draws, one), move |f, d| {
|
||||
let first = slot_word(f, d)?;
|
||||
let slot = Words {
|
||||
buffer: words,
|
||||
slot: Some(first),
|
||||
};
|
||||
plan_draw(f, slot, sources)?;
|
||||
let groups = slot.load(f, Output::FillDispatch as u32)?;
|
||||
let before = f.load(total, MemAccess::default())?;
|
||||
slot.store(f, FIRST_GROUP, before)?;
|
||||
let after = f.binary(BinOp::IAdd, before, groups)?;
|
||||
f.store(total, after, MemAccess::default())
|
||||
})?;
|
||||
// As few workgroups along y as hold them at most the widest along x, then as few along x
|
||||
// as they need: none of either where there are none.
|
||||
let total = f.load(total, MemAccess::default())?;
|
||||
let widest = load_word(f, words, 4)?;
|
||||
let rows = divided_up(f, total, widest)?;
|
||||
let some = f.binary(BinOp::ULessThan, zero, rows)?;
|
||||
let divisor = f.select(some, rows, one)?;
|
||||
let width = divided_up(f, total, divisor)?;
|
||||
for (at, v) in [(1, width), (2, rows), (3, one)] {
|
||||
let at = k(f, at)?;
|
||||
store_word(f, words, at, v)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `n / d` rounded up, for `d` above 0: without `n + d - 1`, which a `u32` may not hold.
|
||||
fn divided_up(f: &mut FunctionBuilder<'_>, n: Value, d: Value) -> BResult<Value> {
|
||||
let zero = k(f, 0)?;
|
||||
let one = k(f, 1)?;
|
||||
let whole = f.binary(BinOp::UDiv, n, d)?;
|
||||
let rest = f.binary(BinOp::UMod, n, d)?;
|
||||
let partial = f.binary(BinOp::INotEqual, rest, zero)?;
|
||||
let extra = f.select(partial, one, zero)?;
|
||||
f.binary(BinOp::IAdd, whole, extra)
|
||||
}
|
||||
|
||||
/// The fill of a run at global invocation `(global, row)`: its workgroup's draw, the last whose
|
||||
/// first fill workgroup is at or before it (the first's being 0), fills its word. Workgroup
|
||||
/// `(x, row)` is the run's `row · width + x`, `width` the dispatch's workgroups along x.
|
||||
pub(super) fn fill_run(
|
||||
f: &mut FunctionBuilder<'_>,
|
||||
u32_: TypeId,
|
||||
words: Value,
|
||||
sources: (Value, Value),
|
||||
(global, row): (Value, Value),
|
||||
) -> BResult<()> {
|
||||
let zero = k(f, 0)?;
|
||||
let one = k(f, 1)?;
|
||||
let local = k(f, IndexBoundsFillModule::LOCAL_SIZE)?;
|
||||
let column = f.binary(BinOp::UDiv, global, local)?;
|
||||
let width = load_word(f, words, 1)?;
|
||||
let before = f.binary(BinOp::IMul, row, width)?;
|
||||
let group = f.binary(BinOp::IAdd, before, column)?;
|
||||
let lin = f.binary(BinOp::UMod, global, local)?;
|
||||
let draws = load_word(f, words, 0)?;
|
||||
// Each step halves `[lo, hi)`; 32 steps end every search a `u32` counts.
|
||||
let lo_var = f.local_var(u32_, None)?;
|
||||
let lo = f.var_ptr(lo_var)?;
|
||||
f.store(lo, zero, MemAccess::default())?;
|
||||
let hi_var = f.local_var(u32_, None)?;
|
||||
let hi = f.var_ptr(hi_var)?;
|
||||
f.store(hi, draws, MemAccess::default())?;
|
||||
let steps = k(f, 32)?;
|
||||
for_range(f, u32_, (zero, steps, one), move |f, _| {
|
||||
let l = f.load(lo, MemAccess::default())?;
|
||||
let h = f.load(hi, MemAccess::default())?;
|
||||
let span = f.binary(BinOp::ISub, h, l)?;
|
||||
let one = k(f, 1)?;
|
||||
let wide = f.binary(BinOp::UGreaterThan, span, one)?;
|
||||
when(f, wide, move |f| {
|
||||
let sum = f.binary(BinOp::IAdd, l, h)?;
|
||||
let one = k(f, 1)?;
|
||||
let mid = f.binary(BinOp::ShiftRightLogical, sum, one)?;
|
||||
let first = slot_word(f, mid)?;
|
||||
let at = k(f, FIRST_GROUP)?;
|
||||
let at = f.binary(BinOp::IAdd, first, at)?;
|
||||
let p = word_ptr(f, words, at)?;
|
||||
let first_group = f.load(p, MemAccess::default())?;
|
||||
let before = f.binary(BinOp::ULessThanEqual, first_group, group)?;
|
||||
let l2 = f.select(before, mid, l)?;
|
||||
let h2 = f.select(before, h, mid)?;
|
||||
f.store(lo, l2, MemAccess::default())?;
|
||||
f.store(hi, h2, MemAccess::default())
|
||||
})
|
||||
})?;
|
||||
let any = f.binary(BinOp::ULessThan, zero, draws)?;
|
||||
when(f, any, move |f| {
|
||||
let found = f.load(lo, MemAccess::default())?;
|
||||
let first = slot_word(f, found)?;
|
||||
let slot = Words {
|
||||
buffer: words,
|
||||
slot: Some(first),
|
||||
};
|
||||
let first_group = slot.load(f, FIRST_GROUP)?;
|
||||
let local = k(f, IndexBoundsFillModule::LOCAL_SIZE)?;
|
||||
let groups_in = f.binary(BinOp::ISub, group, first_group)?;
|
||||
let w = f.binary(BinOp::IMul, groups_in, local)?;
|
||||
let w = f.binary(BinOp::IAdd, w, lin)?;
|
||||
fill_draw(f, slot, sources, w)
|
||||
})
|
||||
}
|
||||
|
||||
/// The index bounds plan module of a run ([`IndexBoundsRun`]) for `device`, as
|
||||
/// [`index_bounds_plan_module`](super::index_bounds_plan_module)'s is made, with its bindings.
|
||||
pub fn index_bounds_plan_run_module(device: &Device) -> Result<IndexBoundsPlanModule, Error> {
|
||||
let (spirv, requirements) = finished(
|
||||
device,
|
||||
plan_module_of(true)?,
|
||||
plan_binding_of,
|
||||
"the index bounds plan run",
|
||||
)?;
|
||||
Ok(IndexBoundsPlanModule {
|
||||
spirv,
|
||||
requirements,
|
||||
})
|
||||
}
|
||||
|
||||
/// The index bounds fill module of a run ([`IndexBoundsRun`]) for `device`, as
|
||||
/// [`index_bounds_fill_module`](super::index_bounds_fill_module)'s is made, with its bindings,
|
||||
/// dispatched indirectly from the words' [`IndexBoundsRun::DISPATCH_OFFSET`].
|
||||
pub fn index_bounds_fill_run_module(device: &Device) -> Result<IndexBoundsFillModule, Error> {
|
||||
let (spirv, requirements) = finished(
|
||||
device,
|
||||
fill_module_of(true)?,
|
||||
fill_binding_of,
|
||||
"the index bounds fill run",
|
||||
)?;
|
||||
Ok(IndexBoundsFillModule {
|
||||
spirv,
|
||||
requirements,
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -0,0 +1,310 @@
|
||||
//! A run of the index bounds pass: both run modules valid on every committed profile (L3,
|
||||
//! `G-val`), and, on the CPU interpreter, a run's one plan and one fill leave each draw the two
|
||||
//! draws, the pool and the status its own pass leaves when the passes record one after another:
|
||||
//! draws inside the buffer, past it, from an offset past it, of no position, and past the pool's
|
||||
//! room, of either index size, in either invocation order; and a run refuses what it cannot take.
|
||||
|
||||
use super::super::{fill_typed_module, plan_typed_module, POOL, SOURCE, STATUS, WORDS};
|
||||
use super::*;
|
||||
use crate::bind::status::ExecutionStatus;
|
||||
use crate::spirv::interp::{run as interpret, Buffer, Config, Order, Resources};
|
||||
use crate::spirv::ir::TypedModule;
|
||||
use crate::spirv::testing::{assert_valid, committed_profiles};
|
||||
|
||||
/// The storage buffer offset alignment of these tests.
|
||||
const ALIGNMENT: u64 = 16;
|
||||
/// The pool's index bytes in these tests.
|
||||
const POOL_BYTES: u32 = 96;
|
||||
|
||||
fn words(bytes: &[u8]) -> Vec<u32> {
|
||||
bytes
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|c| u32::from_le_bytes(*c))
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn bytes(words: &[u32]) -> Vec<u8> {
|
||||
words.iter().flat_map(|w| w.to_le_bytes()).collect()
|
||||
}
|
||||
|
||||
/// `module` over `buffers` (at `WORDS`, `SOURCE`, `POOL` and, for the plan, `STATUS`) with
|
||||
/// `workgroups` along x and y, in both invocation orders, which must agree: the buffers after.
|
||||
fn dispatch(module: &TypedModule, buffers: Vec<Vec<u8>>, workgroups: [u32; 2]) -> Vec<Vec<u8>> {
|
||||
let mut after = Vec::new();
|
||||
for order in [Order::Forward, Order::Reverse] {
|
||||
let res = Resources {
|
||||
buffers: [WORDS, SOURCE, POOL, STATUS]
|
||||
.into_iter()
|
||||
.zip(buffers.clone())
|
||||
.map(|(slot, bytes)| Buffer {
|
||||
slot: Some(slot),
|
||||
address: None,
|
||||
bytes,
|
||||
})
|
||||
.collect(),
|
||||
push: Vec::new(),
|
||||
spec: Default::default(),
|
||||
};
|
||||
let cfg = Config {
|
||||
order,
|
||||
workgroups: [workgroups[0], workgroups[1], 1],
|
||||
..Config::default()
|
||||
};
|
||||
after.push(interpret(module, &cfg, res).expect("run").buffers);
|
||||
}
|
||||
assert_eq!(after[0], after[1], "order independent");
|
||||
after.swap_remove(0)
|
||||
}
|
||||
|
||||
/// `range` of `buffer`, as Vulkan binds it.
|
||||
fn bound(buffer: &[u8], range: Option<BufferRange>) -> Vec<u8> {
|
||||
match range {
|
||||
Some(range) => {
|
||||
buffer[range.offset as usize..(range.offset + range.range) as usize].to_vec()
|
||||
}
|
||||
None => vec![0xCC; 4],
|
||||
}
|
||||
}
|
||||
|
||||
/// What the draws left: each draw's two commands, the pool's words and the status bytes.
|
||||
type Left = (Vec<[u32; 10]>, Vec<u32>, Vec<u8>);
|
||||
|
||||
/// The draws' own passes, one after another over one pool: what they left.
|
||||
fn passes(draws: &[BoundsRunDraw], arguments: &[u8], indices: &[u8]) -> Left {
|
||||
let header = (IndexBoundsPass::POOL_HEADER_BYTES / 4) as usize;
|
||||
let mut pool = bytes(&vec![0; header + (POOL_BYTES / 4) as usize]);
|
||||
let mut status = ExecutionStatus::initial().to_vec();
|
||||
let (plan, fill) = (
|
||||
plan_typed_module().expect("plan"),
|
||||
fill_typed_module().expect("fill"),
|
||||
);
|
||||
let mut commands = Vec::new();
|
||||
for draw in draws {
|
||||
let pass = IndexBoundsPass::new(
|
||||
IndirectRef::new(0, draw.arguments_offset),
|
||||
draw.index_size,
|
||||
draw.index_offset,
|
||||
draw.index_end,
|
||||
ALIGNMENT,
|
||||
u32::MAX,
|
||||
POOL_BYTES,
|
||||
)
|
||||
.expect("pass");
|
||||
let mut words_of = pass.parameters.to_vec();
|
||||
words_of.resize((IndexBoundsPass::BYTES / 4) as usize, 0);
|
||||
let after = dispatch(
|
||||
&plan,
|
||||
vec![
|
||||
bytes(&words_of),
|
||||
bound(arguments, Some(pass.arguments_range)),
|
||||
pool,
|
||||
status,
|
||||
],
|
||||
[1, 1],
|
||||
);
|
||||
let planned = words(&after[0]);
|
||||
(pool, status) = (after[2].clone(), after[3].clone());
|
||||
let groups = planned[(IndexBoundsPass::FILL_DISPATCH_OFFSET / 4) as usize];
|
||||
if groups > 0 {
|
||||
let filled = dispatch(
|
||||
&fill,
|
||||
vec![after[0].clone(), bound(indices, pass.indices_range), pool],
|
||||
[groups, 1],
|
||||
);
|
||||
pool = filled[2].clone();
|
||||
}
|
||||
let at = (IndexBoundsPass::FIRST_DRAW_OFFSET / 4) as usize;
|
||||
commands.push(planned[at..at + 10].try_into().expect("commands"));
|
||||
}
|
||||
(commands, words(&pool), status)
|
||||
}
|
||||
|
||||
/// The draws as one run whose fill takes at most `widest` workgroups along x: what its plan and
|
||||
/// fill left, and its fill's workgroups along x and y and in all.
|
||||
fn run_of(
|
||||
draws: &[BoundsRunDraw],
|
||||
(arguments, indices): (&[u8], &[u8]),
|
||||
widest: u32,
|
||||
) -> (Left, [u32; 3]) {
|
||||
let mut run = IndexBoundsRun::new(
|
||||
(0, arguments.len() as u64),
|
||||
Some((0, indices.len() as u64)),
|
||||
(ALIGNMENT, u32::MAX, widest),
|
||||
POOL_BYTES,
|
||||
)
|
||||
.expect("run");
|
||||
for (i, draw) in draws.iter().enumerate() {
|
||||
assert_eq!(run.push(*draw), Some(i as u32));
|
||||
}
|
||||
let header = (IndexBoundsPass::POOL_HEADER_BYTES / 4) as usize;
|
||||
let pool = bytes(&vec![0; header + (POOL_BYTES / 4) as usize]);
|
||||
let after = dispatch(
|
||||
&plan_module_of(true).expect("plan"),
|
||||
vec![
|
||||
run.words(),
|
||||
bound(arguments, Some(run.arguments_range())),
|
||||
pool,
|
||||
ExecutionStatus::initial().to_vec(),
|
||||
],
|
||||
[1, 1],
|
||||
);
|
||||
let planned = words(&after[0]);
|
||||
let at = (IndexBoundsRun::DISPATCH_OFFSET / 4) as usize;
|
||||
let (width, rows) = (planned[at], planned[at + 1]);
|
||||
assert_eq!(planned[at + 2], 1);
|
||||
let mut pool = after[2].clone();
|
||||
if width * rows > 0 {
|
||||
let filled = dispatch(
|
||||
&fill_module_of(true).expect("fill"),
|
||||
vec![after[0].clone(), bound(indices, run.indices_range()), pool],
|
||||
[width, rows],
|
||||
);
|
||||
pool = filled[2].clone();
|
||||
}
|
||||
// The draws' fill workgroups in all: the last draw's first, and its own.
|
||||
let last = (IndexBoundsRun::HEADER_WORDS
|
||||
+ (draws.len() as u32 - 1) * IndexBoundsRun::SLOT_WORDS) as usize;
|
||||
let total =
|
||||
planned[last + FIRST_GROUP as usize] + planned[last + Output::FillDispatch as usize];
|
||||
let commands = (0..draws.len() as u32)
|
||||
.map(|slot| {
|
||||
let at = (IndexBoundsRun::first_draw_offset(slot) / 4) as usize;
|
||||
assert_eq!(
|
||||
IndexBoundsRun::second_draw_offset(slot),
|
||||
IndexBoundsRun::first_draw_offset(slot) + 20
|
||||
);
|
||||
planned[at..at + 10].try_into().expect("commands")
|
||||
})
|
||||
.collect();
|
||||
(
|
||||
(commands, words(&pool), after[3].clone()),
|
||||
[width, rows, total],
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn both_run_modules_are_valid_on_every_committed_profile() {
|
||||
for (_, p) in committed_profiles().expect("profiles") {
|
||||
assert_valid(plan_module_of(true).expect("plan"), &p);
|
||||
assert_valid(fill_module_of(true).expect("fill"), &p);
|
||||
}
|
||||
}
|
||||
|
||||
/// A run's draws are their own passes' draws, reservations and status, in turn, its fill
|
||||
/// dispatched along x alone or spread over y.
|
||||
#[test]
|
||||
fn a_run_leaves_what_its_draws_passes_leave() {
|
||||
for size in [2u64, 4] {
|
||||
// 37 indices after 4 bytes of 0xAB, padded to whole words of 0xCC.
|
||||
let mut indices = vec![0xAB; 4];
|
||||
for i in 0..37u32 {
|
||||
let value = (i * 7 + 3) % 50 + 100 * (size as u32 - 2);
|
||||
match size {
|
||||
4 => indices.extend(value.to_le_bytes()),
|
||||
_ => indices.extend((value as u16).to_le_bytes()),
|
||||
}
|
||||
}
|
||||
let end = indices.len() as u64;
|
||||
indices.resize(indices.len().next_multiple_of(16), 0xCC);
|
||||
// Each draw's arguments: count, instances, first index, base vertex, base instance.
|
||||
let calls: [(u64, [u32; 5]); 8] = [
|
||||
// Inside the buffer.
|
||||
(4, [6, 1, 0, 3, 0]),
|
||||
// Past it, reserved and filled.
|
||||
(4, [10, 2, 30, 0, 1]),
|
||||
// From an offset past the buffer.
|
||||
(end.next_multiple_of(size) + 4 * size, [5, 1, 0, 0, 0]),
|
||||
// No position.
|
||||
(4, [0, 1, 3, 0, 0]),
|
||||
// Inside, from an offset.
|
||||
(4 + 10 * size, [9, 1, 2, 0, 0]),
|
||||
// Past the pool's room by now.
|
||||
(4, [40, 1, 0, 0, 0]),
|
||||
// Past the buffer again, after the overflow.
|
||||
(4 + 2 * size, [7, 1, 31, 5, 0]),
|
||||
// Inside, last.
|
||||
(4, [3, 1, 33, 0, 0]),
|
||||
];
|
||||
let mut arguments = vec![0xEE; 12];
|
||||
let mut draws = Vec::new();
|
||||
for (index_offset, call) in calls {
|
||||
draws.push(BoundsRunDraw {
|
||||
arguments_offset: arguments.len() as u64,
|
||||
index_size: size,
|
||||
index_offset,
|
||||
index_end: end,
|
||||
});
|
||||
arguments.extend(bytes(&call));
|
||||
}
|
||||
let want = passes(&draws, &arguments, &indices);
|
||||
let mut spread = false;
|
||||
for widest in [u32::MAX, 2, 1] {
|
||||
let (got, [width, rows, total]) = run_of(&draws, (&arguments, &indices), widest);
|
||||
let case = format!("{size}-byte indices, at most {widest} along x");
|
||||
assert_eq!(got.0, want.0, "{case}: the draws");
|
||||
assert_eq!(got.1, want.1, "{case}: the pool");
|
||||
assert_eq!(got.2, want.2, "{case}: the status");
|
||||
// The dispatch holds every workgroup within the widest, and fewer than a row more.
|
||||
assert!(width <= widest && width * rows >= total && width * (rows - 1) < total);
|
||||
spread |= rows > 1 && width * rows > total;
|
||||
// The overflow happened, and both kinds of draw are among them.
|
||||
let report = ExecutionStatus::decode(&got.2[..32].try_into().expect("status"));
|
||||
assert!(report.index_pool_overflow, "{case}: no overflow");
|
||||
assert!(got.0.iter().any(|c| c[0] > 0) && got.0.iter().any(|c| c[5] > 0));
|
||||
}
|
||||
// Some dispatch spread over y, with a workgroup past the last draw's.
|
||||
assert!(spread, "{size}-byte indices: no spread dispatch");
|
||||
}
|
||||
}
|
||||
|
||||
/// A run takes no draw whose own pass would not be made, nor one whose arguments or indices lie
|
||||
/// outside its bound bytes.
|
||||
#[test]
|
||||
fn a_run_refuses_what_it_cannot_take() {
|
||||
let draw = |arguments_offset, index_offset| BoundsRunDraw {
|
||||
arguments_offset,
|
||||
index_size: 2,
|
||||
index_offset,
|
||||
index_end: 128,
|
||||
};
|
||||
let mut run = IndexBoundsRun::new((64, 128), Some((64, 128)), (ALIGNMENT, u32::MAX, 65535), 64)
|
||||
.expect("run");
|
||||
assert_eq!(run.push(draw(64, 64)), Some(0));
|
||||
assert_eq!(run.push(draw(66, 64)), None, "arguments off a word");
|
||||
assert_eq!(
|
||||
run.push(draw(32, 64)),
|
||||
None,
|
||||
"arguments before the bound bytes"
|
||||
);
|
||||
assert_eq!(
|
||||
run.push(draw(112, 64)),
|
||||
None,
|
||||
"arguments past the bound bytes"
|
||||
);
|
||||
assert_eq!(run.push(draw(64, 65)), None, "an odd index offset");
|
||||
assert_eq!(
|
||||
run.push(draw(64, 32)),
|
||||
None,
|
||||
"indices before the bound bytes"
|
||||
);
|
||||
assert_eq!(
|
||||
run.push(BoundsRunDraw {
|
||||
index_end: 256,
|
||||
..draw(64, 64)
|
||||
}),
|
||||
None,
|
||||
"indices past the bound bytes"
|
||||
);
|
||||
assert_eq!(run.len(), 1);
|
||||
assert_eq!(
|
||||
IndexBoundsRun::new((8, 8), None, (ALIGNMENT, u32::MAX, 65535), 64),
|
||||
None
|
||||
);
|
||||
assert_eq!(
|
||||
IndexBoundsRun::new((8, 64), None, (ALIGNMENT, u32::MAX, 0), 64),
|
||||
None,
|
||||
"no workgroup along x"
|
||||
);
|
||||
}
|
||||
@@ -834,7 +834,7 @@ fn div_ceil(f: &mut FunctionBuilder<'_>, a: Value, b: Value) -> BResult<Value> {
|
||||
}
|
||||
|
||||
/// Run `each(f, i)` for `i` from `lo` below `hi`, `step` apart (`step` not 0).
|
||||
fn for_range<'a>(
|
||||
pub(crate) fn for_range<'a>(
|
||||
f: &mut FunctionBuilder<'_>,
|
||||
u32_: TypeId,
|
||||
(lo, hi, step): (Value, Value, Value),
|
||||
@@ -860,7 +860,7 @@ fn for_range<'a>(
|
||||
}
|
||||
|
||||
/// Run `then(f)` where `c` holds.
|
||||
fn when<'a>(
|
||||
pub(crate) fn when<'a>(
|
||||
f: &mut FunctionBuilder<'_>,
|
||||
c: Value,
|
||||
then: impl FnOnce(&mut FunctionBuilder<'_>) -> BResult<()> + 'a,
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
//! An indexed indirect draw whose index fetch
|
||||
//! nothing bounds (`DrawCommands::index_bounds_pass`) can bound it on the GPU instead of reading
|
||||
//! its arguments: an [`IndexBoundsPass`] of [`index_bounds_plan_module`] and
|
||||
//! [`index_bounds_fill_module`] before the render pass instance, and two indirect draws. An
|
||||
//! [`index_bounds_fill_module`] before the render pass instance, and two indirect draws (a run of
|
||||
//! such draws over one arguments buffer and one index buffer, one [`IndexBoundsRun`] plan of
|
||||
//! [`index_bounds_plan_run_module`] and one fill of [`index_bounds_fill_run_module`] for all of
|
||||
//! them instead). An
|
||||
//! indexed draw whose primitives Vulkan's input assembly does not form as Metal does (a strip
|
||||
//! restarting at another index than all-ones) can draw them as a list instead: an
|
||||
//! [`IndexRewritePass`] of three [`index_rewrite_module`] dispatches ([`RewritePhase`]) before the
|
||||
@@ -233,8 +236,9 @@ pub use heap::{
|
||||
HANDLE_TABLE_CAPACITY, NEUTRAL_HEAP_ELEMENT,
|
||||
};
|
||||
pub use index_bounds::{
|
||||
index_bounds_fill_module, index_bounds_plan_module, IndexBoundsFillModule, IndexBoundsPass,
|
||||
IndexBoundsPlanModule,
|
||||
index_bounds_fill_module, index_bounds_fill_run_module, index_bounds_plan_module,
|
||||
index_bounds_plan_run_module, BoundsRunDraw, IndexBoundsFillModule, IndexBoundsPass,
|
||||
IndexBoundsPlanModule, IndexBoundsRun,
|
||||
};
|
||||
pub use index_rewrite::{
|
||||
index_gather_module, index_gather_plan_module, index_rewrite_module, index_rewrite_run_module,
|
||||
|
||||
@@ -767,10 +767,14 @@ surface! {
|
||||
struct DepthStencilResolveModules N;
|
||||
enum ResolveWrite N;
|
||||
fn index_bounds_fill_module;
|
||||
fn index_bounds_fill_run_module;
|
||||
fn index_bounds_plan_module;
|
||||
fn index_bounds_plan_run_module;
|
||||
struct BoundsRunDraw E;
|
||||
struct IndexBoundsFillModule N;
|
||||
struct IndexBoundsPass N;
|
||||
struct IndexBoundsPlanModule N;
|
||||
struct IndexBoundsRun O;
|
||||
fn index_gather_module;
|
||||
fn index_gather_plan_module;
|
||||
fn index_rewrite_module;
|
||||
|
||||
+8
-5
@@ -1269,8 +1269,9 @@ fast forms record, and each `PrecisionNote`'s rustdoc states its bound.
|
||||
`DriverFact::RobustIndexFetchReadsZero`, or the index offset lies at or past the buffer's length)
|
||||
is bounded on the GPU before the pass. Cost: two dispatches before the pass write two draws'
|
||||
arguments and the indices past the buffer into the command buffer's index pool (a sixty-fourth of
|
||||
the device's largest device-local heap), between barriers, and the draw is two indirect draws; a
|
||||
draw the pool cannot hold fails the command buffer.
|
||||
the device's largest device-local heap), between barriers, two for a run of such draws over one
|
||||
arguments and one index buffer, and the draw is two indirect draws; a draw the pool cannot hold
|
||||
fails the command buffer.
|
||||
- `metal2vulkan-degrade-emulated-mesh-draws` (performance). `EmulatedMeshDraws`: A mesh render
|
||||
pipeline's draws on a device without `VK_EXT_mesh_shader`. Cost: the object and mesh functions run
|
||||
as compute dispatches before the pass, between barriers, writing records a synthesized vertex
|
||||
@@ -2415,9 +2416,11 @@ fast forms record, and each `PrecisionNote`'s rustdoc states its bound.
|
||||
primitive's last vertex; and a slice or viewport a vertex function selects where the pipeline
|
||||
selects it in a synthesized geometry stage (a device without `shaderOutputLayer` or
|
||||
`shaderOutputViewportIndex`, an index that differs between a primitive's vertices, or weights the
|
||||
stage writes), from each primitive's first vertex. And on every device, a mode past 1, its top bit
|
||||
set or not, which Metal draws a third way that differs between pipeline states (every line's flat
|
||||
inputs and `[[primitive_id]]` 0) and the runtime as mode 1: announced at the call. Cost: flat
|
||||
stage writes), from each primitive's first vertex. And on every device, a draw at a mode past 1,
|
||||
which Metal draws a third way and the runtime as mode 1, whose shape and pipeline state Metal draws
|
||||
otherwise than mode 1 (a strip's odd triangles, every line's flat inputs and `[[primitive_id]]` 0,
|
||||
sized points, the middle vertex of a triangle whose pipeline selects its slice or viewport, mesh
|
||||
draws unmeasured): announced at the draw. Cost: flat
|
||||
inputs or a computed primitive ID read another vertex than Metal's, or barycentric weights come in
|
||||
another order than Metal's or round otherwise.
|
||||
- `metal2vulkan-degrade-visibility-count-per-color` (precision). `VisibilityCountPerColor`: A
|
||||
|
||||
+2
-2
@@ -293,8 +293,8 @@ driver's. Each is open work.
|
||||
indexed strip of up to a few thousand positions. On MoltenVK on the M3 Max that is 0.16, 0.24,
|
||||
0.65 and 0.71 us more frame time per direct, indexed, indexed strip and indirect draw of two
|
||||
triangles than at mode 0 (1.58, 1.72, 1.73 and 1.71 us; host_ab's `provoking`, 2000 draws, 3
|
||||
rounds), and 2.6 us per indexed indirect draw against mode 0's 55 (the index bounds pass's, which
|
||||
a gathered list does not need). A draw no run takes (a longer strip, an indexed indirect strip,
|
||||
rounds), and 2.5 us per indexed indirect draw against mode 0's 4.1 (a run of the index bounds
|
||||
pass, which a gathered list does not need). A draw no run takes (a longer strip, an indexed indirect strip,
|
||||
indices an earlier draw of the encoder wrote) takes the index rewrite pass's three dispatches
|
||||
between barriers before its render pass: there 77 us per draw.
|
||||
|
||||
|
||||
+72
-70
@@ -14,14 +14,14 @@ 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 `b6ed805ec`.
|
||||
Generated at `edd12dcb5`.
|
||||
|
||||
## Totals
|
||||
|
||||
| Kind | Variants | With a site | Reach system | Reach app | Reach rare | Reach none | Unassessed |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| Translator and front-end refusals | 125 | 125 | 6 | 33 | 69 | 17 | 0 |
|
||||
| Runtime gaps | 65 | 65 | 1 | 8 | 42 | 14 | 0 |
|
||||
| Runtime gaps | 66 | 66 | 1 | 8 | 43 | 14 | 0 |
|
||||
| Apple-only calls | 5 | 5 | 0 | 0 | 0 | 5 | 0 |
|
||||
| Binder refusals at a device limit | 9 | 9 | 0 | 1 | 7 | 1 | 0 |
|
||||
| Translation caps | 14 | 14 | 0 | 0 | 7 | 7 | 0 |
|
||||
@@ -48,7 +48,7 @@ Generated at `b6ed805ec`.
|
||||
| `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: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:485` | `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:476` | `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 |
|
||||
@@ -63,9 +63,9 @@ Generated at `b6ed805ec`.
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `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:1688`, `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:3839` (+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:3795` (+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:523` (+119) | `system`: pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) |
|
||||
@@ -84,22 +84,22 @@ Generated at `b6ed805ec`.
|
||||
| `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:882`, `crates/metal2vulkan/src/bind/instantiate.rs:888` (+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) | 24: `crates/metal2vulkan-runtime/src/families/features.rs:1018`, `crates/metal2vulkan-runtime/src/render.rs:5931` (+22) | `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) |
|
||||
| `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) | 24: `crates/metal2vulkan-runtime/src/families/features.rs:1018`, `crates/metal2vulkan-runtime/src/render.rs:5913` (+22) | `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:1127`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:3211` (+1) | `rare`: primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function |
|
||||
| `PrivatePrimitives` | One of Metal's private primitive types (a line loop, a triangle fan, quads, a quad strip) drawn in the pulled list form... | - | via a helper: 1: `crates/metal2vulkan/src/lower/stage_io/plan.rs:2601` | `rare`: a private primitive type drawn in the pulled list form (a vertex function that writes memory or the primitive_id varying, a vertex start past 2^31) on a device without device addresses |
|
||||
| `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:4180`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+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:1107` (+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:960`, `crates/metal2vulkan/src/lower/mesh/mod.rs:968` | `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:387`, `crates/metal2vulkan/src/metal/state.rs:37` (+3) | `rare`: dual-source blending on a device without it |
|
||||
| `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:4136`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+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:1673`, `crates/metal2vulkan-runtime/src/render_state.rs:1107` (+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:956`, `crates/metal2vulkan/src/lower/mesh/mod.rs:964` | `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:1924` (+3) | `rare`: barycentric coordinates |
|
||||
| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1114`, `crates/metal2vulkan/src/bind/graphics.rs:2752` (+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 |
|
||||
| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1114`, `crates/metal2vulkan/src/bind/graphics.rs:2731` (+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:844`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:846` (+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:376`, `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:1663`, `crates/metal2vulkan/src/bind/graphics.rs:3131` (+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:1642`, `crates/metal2vulkan/src/bind/graphics.rs:3110` (+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) |
|
||||
| `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) |
|
||||
@@ -122,7 +122,7 @@ Generated at `b6ed805ec`.
|
||||
| `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: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:2193`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1005` | `rare`: per-attachment blending on a device without independentBlend |
|
||||
| `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:2192`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017` | `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:1063`, `crates/metal2vulkan/src/pipeline/graphics.rs:563` | `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 |
|
||||
@@ -135,12 +135,12 @@ Generated at `b6ed805ec`.
|
||||
| `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:999` (+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:1890`, `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:430`, `crates/metal2vulkan-runtime/src/host_memory.rs:470` (+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:2921` | `rare`: GPU times on a queue without timestamps |
|
||||
| `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:2876` | `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:573` | `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 | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1225`, `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 |
|
||||
| `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:1225`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:783` | `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:801` | `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 |
|
||||
| `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:1115` | `none`: a device below the runtime's floor |
|
||||
@@ -171,27 +171,27 @@ Generated at `b6ed805ec`.
|
||||
| `HeapTextureMemory` | A heap texture whose image the heap's memory type does not take | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/texture/heap.rs:1512`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1519` (+3) | `app`: a heap texture the heap's memory type does not take |
|
||||
| `FunctionTablePastMaxBufferLength` | A visible-function table of more entries than one buffer of the device's `max_buffer_length` holds words for, or than its size word holds | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/function_table.rs:622` | `none`: a function table past one buffer |
|
||||
| `IndirectCommandBufferPastMaxBufferLength` | An indirect command buffer of more commands than one buffer of the device's `max_buffer_length` holds the records of | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:523` | `none`: an ICB past one buffer |
|
||||
| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 15: `crates/metal2vulkan-runtime/src/compute.rs:1317`, `crates/metal2vulkan-runtime/src/compute.rs:1402` (+13) | `rare`: indirect render commands' remaining pieces |
|
||||
| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 15: `crates/metal2vulkan-runtime/src/compute.rs:1291`, `crates/metal2vulkan-runtime/src/compute.rs:1376` (+13) | `rare`: indirect render commands' remaining pieces |
|
||||
| `IndirectImageblockSize` | An indirect compute command's imageblock side past 65535, which Metal keeps | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3408` | `none`: an imageblock side past 65535 |
|
||||
| `CommandReplay` | The device replay of indirect command buffers | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/binding.rs:723`, `crates/metal2vulkan-runtime/src/binding.rs:726` | `rare`: the device replay of indirect command buffers |
|
||||
| `RenderAttachments` | Render attachments and their binding forms | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1794` | `rare`: render attachment forms not built |
|
||||
| `AccelerationStructures` | Acceleration structures | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1797` | `rare`: ray tracing (out of scope by ruling) |
|
||||
| `FeatureEnable` | A feature a created device would enable that the runtime's feature chain has no member for, or whose structure no enabled extension exposes | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1166` | `none`: device creation with a feature the runtime's chain lacks |
|
||||
| `ExtensionEnable` | An extension a created device would enable that the device lists under none of the names the runtime knows for it | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1157` | `none`: device creation with an extension under an unknown name |
|
||||
| `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:461` (+21) | `system`: render pass, resolve and attachment forms not built (20 sites: see the appendix) |
|
||||
| `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:1865` (+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: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:1039` (+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:1603`, `crates/metal2vulkan-runtime/src/render_state.rs:1606` (+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:564`, `crates/metal2vulkan-runtime/src/render.rs:6654` | `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:3322` (+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 |
|
||||
| `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:7425`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929` | `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:7417`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions |
|
||||
| `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:6636` | `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:3321` (+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:1615`, `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:7370`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929` | `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:7362`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796` (+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:1487`, `crates/metal2vulkan-runtime/src/families/limits.rs:1026` (+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:1017` | `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:1469`, `crates/metal2vulkan-runtime/src/families/limits.rs:1019` | `app`: residency sets (missing API) |
|
||||
@@ -204,7 +204,7 @@ Generated at `b6ed805ec`.
|
||||
| `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:1468` | `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:1472` | `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:396` | `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:928` | `rare`: layered passes needing a per-layer color resolve |
|
||||
| `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:1340` | `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:637`, `crates/metal2vulkan-runtime/src/texture/heap.rs:2743` (+3) | `none`: a runtime extension's rebind with a live texture |
|
||||
@@ -215,15 +215,16 @@ Generated at `b6ed805ec`.
|
||||
| `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) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:71` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws |
|
||||
| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:8128`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote |
|
||||
| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:8095`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote |
|
||||
| `ProvokingVertex` | A draw under Apple's last provoking vertex (`setProvokingVertexMode:` 1) on a device without `VK_EXT_provoking_vertex`'s last vertex, which the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:73` | `none`: a draw after the Apple-private setProvokingVertexMode: 1, on a device without the last provoking vertex, whose rotated list cannot draw 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:8139` | `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 |
|
||||
| `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:8106` | `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:1669`, `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:641`, `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:4986` | `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:269`, `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) |
|
||||
| `MultisampledBufferCopy` | A blit copy between a buffer and a multisampled texture (`copyFromBuffer:...toTexture:` into, or `copyFromTexture:...toBuffer:` out of, a texture... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs:536`, `crates/metal2vulkan-runtime/src/blit_texture.rs:693` | `rare`: a buffer<->multisampled-texture copy on a device without sample-rate shading, an integer multisample attachment at the count, or the copy format's storage; and, where maintenance8's depth/colour copies are missing or wrong, what the sample-rate draws cannot move: a 16-bit depth, or a depth or stencil texture they cannot sample or render to (emulated elsewhere; the consumer's Maps pans and screensaver make the copy) |
|
||||
| `MultisampledBufferLayout` | A blit copy between a buffer and a multisampled texture (as for `MultisampledBufferCopy`) in one of two buffer layouts that plain Metal copies by... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1029` | `rare`: a buffer<->multisampled-texture copy at a bytesPerRow of 0 from an offset that is a multiple of 16, or of pixels of 32 bytes or more at a pitch below a row or off the pixel: Metal copies these by rules not yet reduced, and its API validation rejects them |
|
||||
| `ColorAttachmentGroups` | What a render pass the device draws in color groups does not build | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106` | `app`: in a render pass of more color attachments than the device draws at once (five or more on a device of four), or one at an index past them: a pipeline state of other colors, a tile state, an execution of render commands, a draw reading another group's attachment |
|
||||
@@ -232,7 +233,7 @@ Generated at `b6ed805ec`.
|
||||
|
||||
| Variant | What it blocks | Where | Sites | Reach |
|
||||
|---|---|---|---|---|
|
||||
| `ProtectedContent` | Protection options whose answer on Metal is not measured (`command_buffer/protection.rs`) | every device (Apple-private, Metal's answer not measured) | 3: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2452`, `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126` (+1) | `none`: Apple-private (no public header) |
|
||||
| `ProtectedContent` | Protection options whose answer on Metal is not measured (`command_buffer/protection.rs`) | every device (Apple-private, Metal's answer not measured) | 3: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2414`, `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126` (+1) | `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:189` | `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:191` | `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:195`, `crates/metal2vulkan-runtime/src/apple_only.rs:320` | `none`: Apple-private (no public header) |
|
||||
@@ -245,9 +246,9 @@ Generated at `b6ed805ec`.
|
||||
| `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:655` | `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:894` | `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:3834` | `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:3878` | `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:3916` | `rare`: control-point indices past one storage descriptor |
|
||||
| `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:3790` | `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:3834` | `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:3872` | `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:609` | `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 |
|
||||
@@ -307,7 +308,7 @@ Each refusal's sites, with the function that builds it.
|
||||
- `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:475 (regions)`
|
||||
- `feature::IrreducibleConvergent`: `crates/metal2vulkan/src/structurize/irreducible.rs:108 (refuse_tangled)`
|
||||
- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:485 (plan_kernel)`
|
||||
- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:476 (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)`
|
||||
@@ -322,12 +323,12 @@ Each refusal's sites, with the function that builds it.
|
||||
- `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::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:900 (atomic_format)`
|
||||
- `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:1688 (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:3839 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3883 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3921 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:661 (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:3795 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3839 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3877 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:661 (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:523 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:530 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:545 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:602 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:694 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2206 (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/color_resolve.rs:172 (of_attachment)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:270 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:298 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:344 (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:1625 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1630 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:228 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:272 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:292 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:307 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:354 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:393 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:476 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:510 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:524 (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:2312 (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:418 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:620 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:176 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:303 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:673 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:680 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2084 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3633 (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:1951 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:121 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:389 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:497 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:150 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:381 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:394 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:401 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:413 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:423 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:301 (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:687 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fLine truncated
|
||||
- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:523 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:530 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:545 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:602 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:694 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2206 (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:270 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:298 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:344 (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:1625 (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:2311 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1031 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1373 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1713 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1806 (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:176 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:303 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:656 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:663 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2084 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3633 (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:1951 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:121 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:389 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:495 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:150 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:381 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:394 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:401 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:413 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:423 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:291 (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:687 (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)`
|
||||
@@ -343,22 +344,22 @@ 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:882 (texel_ranges)`; `crates/metal2vulkan/src/bind/instantiate.rs:888 (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:1018 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5931 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:120 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:147 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:518 (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:1218 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1236 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1250 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1281 (srgb8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1330 (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:1128 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1219 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1256 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1901 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:821 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)`
|
||||
- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1018 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5913 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:120 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:147 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:518 (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:1218 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1236 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1250 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1281 (srgb8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1330 (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:1128 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1219 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1256 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1901 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:821 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)`
|
||||
- `feature::PrimitiveId`: `crates/metal2vulkan-runtime/src/families/features.rs:1127 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3211 (finish)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:240 (check_primitive_id)`
|
||||
- `feature::PrivatePrimitives`: `crates/metal2vulkan/src/lower/stage_io/plan.rs:2601 (indices_feature)`
|
||||
- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:4180 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312 (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:1107 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:800 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:819 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1313 (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:960 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:968 (select)`
|
||||
- `feature::DualSourceBlending`: `crates/metal2vulkan-runtime/src/families/formats.rs:387 (answers)`; `crates/metal2vulkan/src/metal/state.rs:37 (blend_factor)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1145 (check_outputs)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:463 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:538 (rotated_blend)`
|
||||
- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:4136 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312 (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:1673 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1107 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:796 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:815 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1313 (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:956 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:964 (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:1157 (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:1924 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:745 (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:1114 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2752 (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::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1114 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2731 (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:844 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:846 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:928 (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:879 (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:376 (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:4037 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1508 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1794 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:828 (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::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:3993 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1508 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1794 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:828 (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:1642 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3110 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:517 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:556 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:590 (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:702 (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:2376 (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)`
|
||||
@@ -373,15 +374,15 @@ Each refusal's sites, with the function that builds it.
|
||||
- `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1713 (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:117 (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:153 (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:182 (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:185 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3689 (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:149 (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:182 (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:185 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3689 (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:455`; `crates/metal2vulkan/src/bind/dispatch.rs:953 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3426 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3483 (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:3405 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3460 (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:2193 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1005 (uniform_blend)`
|
||||
- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2192 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017 (uniform_blend)`
|
||||
- `feature::RasterSampleCount`: `crates/metal2vulkan-runtime/src/families/limits.rs:1063 (sample_count)`; `crates/metal2vulkan/src/pipeline/graphics.rs:563 (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)`
|
||||
@@ -394,12 +395,12 @@ Each refusal's sites, with the function that builds it.
|
||||
- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:999 (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:3415 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3762 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)`
|
||||
- `feature::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1890 (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:430 (not_importable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:470 (refuse_unwritable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:689 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:694 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:712 (new)`
|
||||
- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2921 (gpu_times)`
|
||||
- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2876 (gpu_times)`
|
||||
- `feature::CountingVisibility`: `crates/metal2vulkan-runtime/src/visibility.rs:452 (check_mode)`
|
||||
- `feature::ViewFormatReinterpretation`: `crates/metal2vulkan-runtime/src/view_plan.rs:573 (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-runtime/src/families/features.rs:1225 (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::PixelCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1225 (state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:783 (split_pixel_fragments)`
|
||||
- `feature::CentroidVarying`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:801 (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::TimelineSemaphores`: `crates/metal2vulkan-runtime/src/device/create.rs:1115 (timeline_difference)`
|
||||
@@ -425,27 +426,27 @@ Each refusal's sites, with the function that builds it.
|
||||
- `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1512 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1519 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2061 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2293 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:556 (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:4433 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7271 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7833 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8291 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8841 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1126 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2941 (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:1291 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1376 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4433 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7216 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7800 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8258 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8812 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1126 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2941 (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:3408 (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:1794 (unexpected)`
|
||||
- `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1797 (unexpected)`
|
||||
- `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1166 (of)`
|
||||
- `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1157 (of)`
|
||||
- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:461 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:685 (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:1169 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2243 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5977 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7927 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:516 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1317 (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:1039 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1107 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1154 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1171 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1236 (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:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1169 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2242 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5959 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7894 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:516 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1317 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1680 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1734 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1795 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2028 (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::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:1865 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)`
|
||||
- `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:1039`; `crates/metal2vulkan-runtime/src/render_state.rs:1208 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1575 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1594 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:527 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:755 (compensation)`
|
||||
- `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1603 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1606 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:365 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:463 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:605 (compensation)`
|
||||
- `gap::DepthNeverWithoutAttachment`: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147 (failing_draw)`
|
||||
- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:564 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6654 (hidden_depth_stencil)`
|
||||
- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3322 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7600 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7737 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7768 (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)`
|
||||
- `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:7425 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)`
|
||||
- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7417 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:921 (dispatch_tiles_resident)`
|
||||
- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6636 (hidden_depth_stencil)`
|
||||
- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:102 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3321 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7545 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7682 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7713 (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:1615 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:937`
|
||||
- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7370 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)`
|
||||
- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7362 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:921 (dispatch_tiles_resident)`
|
||||
- `gap::Metal4Api`: `crates/metal2vulkan-runtime/src/families/features.rs:1487 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1026 (state)`; `crates/metal2vulkan-runtime/src/families/mod.rs:362 (audit)`
|
||||
- `gap::CounterSampleBuffers`: `crates/metal2vulkan-runtime/src/families/limits.rs:1017 (state)`
|
||||
- `gap::ResidencySets`: `crates/metal2vulkan-runtime/src/families/features.rs:1469 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1019 (state)`
|
||||
@@ -458,7 +459,7 @@ Each refusal's sites, with the function that builds it.
|
||||
- `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1468 (state)`
|
||||
- `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1472 (state)`
|
||||
- `gap::RateMapRegions`: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:396 (refusal)`
|
||||
- `gap::LayeredPass`: `crates/metal2vulkan-runtime/src/color_resolve.rs:928 (plan)`
|
||||
- `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:1340 (texture_copies_of_bytes)`
|
||||
- `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:637 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2743 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2758 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2769 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2812 (dma_buf_heap_images_again)`
|
||||
@@ -469,19 +470,20 @@ Each refusal's sites, with the function that builds it.
|
||||
- `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/render/restart.rs:71 (gap)`
|
||||
- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:8128 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)`
|
||||
- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:8095 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)`
|
||||
- `gap::ProvokingVertex`: `crates/metal2vulkan-runtime/src/render/restart.rs:73 (gap)`
|
||||
- `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:8139 (draw_resident)`
|
||||
- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1669 (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:667 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5156 (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::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:8106 (draw_resident)`
|
||||
- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1669 (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:650 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5156 (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:641 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:622 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:172 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2952 (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:4986 (refuse_detached_texels)`
|
||||
- `gap::SurfaceDepthStencil`: `crates/metal2vulkan-runtime/src/blit_texture.rs:269 (unit)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57 (surface_depth_twin)`
|
||||
- `gap::ExtendedRangeResolve`: `crates/metal2vulkan-runtime/src/resolve.rs:604 (color)`
|
||||
- `gap::MultisampledBufferCopy`: `crates/metal2vulkan-runtime/src/blit_texture.rs:536 (copy_from_buffer_to_texture)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:693 (copy_from_texture_to_buffer)`
|
||||
- `gap::MultisampledBufferLayout`: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1029 (plan)`
|
||||
- `gap::ColorAttachmentGroups`: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106 (gap)`
|
||||
- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2452 (commit_now)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126 (refuse_protected_state_encoder)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:52 (set)`
|
||||
- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2414 (commit_now)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126 (refuse_protected_state_encoder)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:52 (set)`
|
||||
- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:189 (check)`
|
||||
- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:191 (check)`
|
||||
- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:195 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:320 (set_vertex_amplification_mode)`
|
||||
@@ -489,9 +491,9 @@ Each refusal's sites, with the function that builds it.
|
||||
- `bind::DescriptorRangeExceeded`: `crates/metal2vulkan/src/bind/instantiate.rs:655 (bind_buffers)`
|
||||
- `bind::TexelBufferTooLarge`: `crates/metal2vulkan/src/bind/instantiate.rs:894 (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:3834 (patch_binding)`
|
||||
- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3878 (patch_binding)`
|
||||
- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3916 (patch_binding)`
|
||||
- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3790 (patch_binding)`
|
||||
- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3834 (patch_binding)`
|
||||
- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3872 (patch_binding)`
|
||||
- `bind::MissingStageInRegion`: `crates/metal2vulkan/src/bind/dispatch.rs:796 (instantiate)`
|
||||
- `bind::UniformViewAliased`: `crates/metal2vulkan/src/bind/instantiate.rs:609 (check_uniform_aliasing)`
|
||||
- `bind::MissingDeviceAddress`: `crates/metal2vulkan/src/bind/plan/slots.rs:133 (plan_buffer)`
|
||||
|
||||
@@ -414,7 +414,7 @@ narrow refusal that the call's rustdoc describes.
|
||||
| `SetFrontFacingWinding` | `setFrontFacingWinding:` | `RenderCommandEncoder::set_front_facing_winding` |
|
||||
| `SetLineWidth` | `setLineWidth:` (SPI) | `RenderCommandEncoder::set_line_width`: 1 accepted; anything else refused `AppleOnly::LineWidth` *(partial)* |
|
||||
| `SetPointSize` | `setPointSize:` (SPI) | `RenderCommandEncoder::set_point_size`: a no-op, as on Metal |
|
||||
| `SetProvokingVertexMode` | `setProvokingVertexMode:` (SPI) | `RenderCommandEncoder::set_provoking_vertex_mode`: modes 0 and 1 drawn as Metal draws them; every other mode, which Metal draws a third way, drawn as 1 and announced (`provoking-vertex-unmatched`) *(partial)* |
|
||||
| `SetProvokingVertexMode` | `setProvokingVertexMode:` (SPI) | `RenderCommandEncoder::set_provoking_vertex_mode`: modes 0 and 1 drawn as Metal draws them; every other mode, which Metal draws a third way, drawn as 1 (patches as 0), each draw Metal's third way draws otherwise announced (`provoking-vertex-unmatched`) *(partial)* |
|
||||
| `SetRenderPipelineState` | `setRenderPipelineState:` | `RenderCommandEncoder::set_render_pipeline_state` |
|
||||
| `SetScissorRect` | `setScissorRect:` | `RenderCommandEncoder::set_scissor_rect` |
|
||||
| `SetScissorRects` | `setScissorRects:count:` | `RenderCommandEncoder::set_scissor_rects` |
|
||||
|
||||
Reference in new issue
Block a user