From d24127ba912be545b2e90b89c5fad842f3bb0ed0 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Thu, 6 Aug 2026 07:42:50 +0200 Subject: [PATCH] [core] Do not use IDs as default types in `MeshPipelineDescriptor` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- wgpu-core/src/device/global.rs | 9 ++++++++- wgpu-core/src/pipeline.rs | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/wgpu-core/src/device/global.rs b/wgpu-core/src/device/global.rs index d330b46cd..5aa03e3e5 100644 --- a/wgpu-core/src/device/global.rs +++ b/wgpu-core/src/device/global.rs @@ -63,6 +63,13 @@ pub type ComputePipelineDescriptor<'a> = pipeline::ComputePipelineDescriptor< pub type VertexState<'a> = pipeline::VertexState<'a, id::ShaderModuleId>; +pub type MeshPipelineDescriptor<'a> = pipeline::MeshPipelineDescriptor< + 'a, + id::PipelineLayoutId, + id::ShaderModuleId, + id::PipelineCacheId, +>; + impl Global { pub fn adapter_is_surface_supported( &self, @@ -868,7 +875,7 @@ impl Global { pub fn device_create_mesh_pipeline( &self, device_id: DeviceId, - desc: &pipeline::MeshPipelineDescriptor, + desc: &MeshPipelineDescriptor, id_in: Option, ) -> ( id::RenderPipelineId, diff --git a/wgpu-core/src/pipeline.rs b/wgpu-core/src/pipeline.rs index 323a9a6fb..7e8ea339d 100644 --- a/wgpu-core/src/pipeline.rs +++ b/wgpu-core/src/pipeline.rs @@ -682,9 +682,9 @@ pub struct RenderPipelineDescriptor< #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct MeshPipelineDescriptor< 'a, - PLL = PipelineLayoutId, - SM = ShaderModuleId, - PLC = PipelineCacheId, + PLL = Arc, + SM = Arc, + PLC = Arc, > { pub label: Label<'a>, /// The layout of bind groups for this pipeline.