Write Metal's bytes in texture fills and two-plane buffer blits

The steps this packet landed as, in order:
- Hold RGB10A2Unorm_sRGB textures with Metal's conversions
- Name the runtime's gap, not a missing feature, for fetch on interlock devices
- Take clippy's forms in the RGB10A2Unorm_sRGB tests
- Fill multisample textures' samples as Metal's private fills write them
- Check fill units only for the formats the crate holds textures of
- Hold a two-plane texture's bytes between rows, which Metal's buffer blits read back
- Fill texture buffers as Metal does: bytes of the buffer, the pattern streamed
- Drop the multisample fill from apple_only's refusals, which fills it
- Meet the rows of a two-plane buffer blit into the texture in Metal's order
- Announce narrow two-plane row meetings across groups of 32 rows as one of Metal's

Content: the tree of `development` at 9d3447dec9, unchanged.
This commit is contained in:
Anees Iqbal committed 2026-10-26 13:19:05 +02:00
1 parent 9516e41497
commit ee21fca2f4
57 files changed
+5206 -515

No files matched your search

@@ -219,6 +219,10 @@ pub(super) struct CommandBufferShared {
/// from `UNDEFINED` to `GENERAL` (`texture/first_move.rs`). Apart from the state, so a texture
/// is made under no lock of the command buffer's.
own_textures: Mutex<Vec<Texture>>,
/// The bytes a color fill of a color Metal packs no color in writes (`blit_fill.rs`): the
/// last color fill's packed texel over the ones before, from zeros. Apart from the state,
/// as `own_textures`.
fill_slot: Mutex<[u8; 16]>,
/// Rebinds since its commit, of buffers its replayable encoders named, whose encoders are
/// not yet encoded again (`reencode.rs`): its first submission waits until none is. Raised
/// under the device's lock of its buffers over host pages (`Rebinds::replace`), which its
@@ -1677,6 +1681,7 @@ impl CommandBuffer {
relayed: Arc::default(),
step_numbers: OnceLock::new(),
own_textures: Mutex::new(Vec::new()),
fill_slot: Mutex::new([0; 16]),
reencode: AtomicU64::new(0),
reencoding: Mutex::new(()),
raws_ended: AtomicU64::new(0),
@@ -1692,6 +1697,17 @@ impl CommandBuffer {
&self.0.device
}
/// The color fill slot (`fill_slot`), after a color fill packed `packed` (`None` for one
/// that packs nothing): its first bytes become the texel's.
pub(super) fn fill_slot(&self, packed: Option<&[u8]>) -> [u8; 16] {
let mut slot = lock(&self.0.fill_slot);
if let Some(texel) = packed {
let n = texel.len().min(slot.len());
slot[..n].copy_from_slice(&texel[..n]);
}
*slot
}
/// Hold `texture`, which one of its encoders made for its own commands, as its
/// `own_textures` says.
pub(super) fn hold_own_texture(&self, texture: Texture) {