From 2bb8af3765d494ede5b1451de2965dd4bb5eb900 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Thu, 6 Aug 2026 07:47:39 +0200 Subject: [PATCH] [core] Do not use IDs as default types in `GeneralRenderPipelineDescriptor` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- wgpu-core/src/device/global.rs | 9 ++++++++- wgpu-core/src/pipeline.rs | 7 +++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/wgpu-core/src/device/global.rs b/wgpu-core/src/device/global.rs index 526087af9..bf6e8a301 100644 --- a/wgpu-core/src/device/global.rs +++ b/wgpu-core/src/device/global.rs @@ -77,6 +77,13 @@ pub type RenderPipelineDescriptor<'a> = pipeline::RenderPipelineDescriptor< id::PipelineCacheId, >; +pub type GeneralRenderPipelineDescriptor<'a> = pipeline::GeneralRenderPipelineDescriptor< + 'a, + id::PipelineLayoutId, + id::ShaderModuleId, + id::PipelineCacheId, +>; + impl Global { pub fn adapter_is_surface_supported( &self, @@ -898,7 +905,7 @@ impl Global { fn device_create_general_render_pipeline( &self, - desc: pipeline::GeneralRenderPipelineDescriptor, + desc: GeneralRenderPipelineDescriptor, device: Arc, fid: crate::registry::FutureId>, ) -> ( diff --git a/wgpu-core/src/pipeline.rs b/wgpu-core/src/pipeline.rs index 7da9f656c..92524312f 100644 --- a/wgpu-core/src/pipeline.rs +++ b/wgpu-core/src/pipeline.rs @@ -24,7 +24,6 @@ use crate::{ AttachmentData, Device, DeviceError, MissingDownlevelFlags, MissingFeatures, RenderPassContext, }, - id::{PipelineCacheId, PipelineLayoutId, ShaderModuleId}, pipeline_cache, resource::{InvalidResourceError, Labeled, ResourceState, TrackingData}, resource_log, @@ -723,9 +722,9 @@ pub struct MeshPipelineDescriptor< #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct GeneralRenderPipelineDescriptor< '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.