diff --git a/crates/metal2vulkan-runtime/src/mesh_draw.rs b/crates/metal2vulkan-runtime/src/mesh_draw.rs index 66216d748..a58b13732 100644 --- a/crates/metal2vulkan-runtime/src/mesh_draw.rs +++ b/crates/metal2vulkan-runtime/src/mesh_draw.rs @@ -218,8 +218,8 @@ pub(crate) fn records(piece: [u32; 3], pieces: u32) -> Vec { /// The group counts' bytes, as the object function or the launcher reads them. pub(crate) fn count_bytes(counts: [u32; 3]) -> [u8; 12] { let mut out = [0; 12]; - for (at, axis) in out.chunks_exact_mut(4).zip(counts) { - at.copy_from_slice(&axis.to_le_bytes()); + for (at, axis) in out.as_chunks_mut::<4>().0.iter_mut().zip(counts) { + *at = axis.to_le_bytes(); } out } diff --git a/crates/metal2vulkan-runtime/src/render.rs b/crates/metal2vulkan-runtime/src/render.rs index 8a227ba47..b64a0b41a 100644 --- a/crates/metal2vulkan-runtime/src/render.rs +++ b/crates/metal2vulkan-runtime/src/render.rs @@ -149,7 +149,7 @@ impl RenderPipelineState { function(Some(&descriptor.vertex)), function(descriptor.fragment.as_ref()), ], - Made::Mesh(descriptor) => [None, function(descriptor.fragment.as_ref())], + Made::Mesh => [None, None], } } @@ -183,8 +183,9 @@ pub(crate) struct RenderInner { enum Made { /// `newRenderPipelineStateWithDescriptor:error:`'s. Vertex(RenderPipelineDescriptor), - /// `newRenderPipelineStateWithMeshDescriptor:options:reflection:error:`'s. - Mesh(MeshPipelineDescriptor), + /// `newRenderPipelineStateWithMeshDescriptor:options:reflection:error:`'s, of which the state + /// keeps nothing: no pass makes its content again. + Mesh, } /// The vertex function's index in a draw's tables, and the fragment function's. @@ -1020,7 +1021,7 @@ impl crate::Device { inner: Arc::new(RenderInner { compiled, numbered, - descriptor: Made::Mesh(descriptor.clone()), + descriptor: Made::Mesh, folded: OnceLock::new(), }), }) @@ -2714,7 +2715,7 @@ impl RenderPipelineState { false, false, ], - Made::Mesh(_) => [false; TABLES], + Made::Mesh => [false; TABLES], } }