[core] Do not use IDs as default types in MeshState

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev authored and Teodor Tanasoaia committed 2026-08-11 14:04:27 +02:00
1 parent f24f333161
commit 2a3bfd351e
4 files changed
+6 -11

No files matched your search

+1 -1
View File
@@ -661,7 +661,7 @@ impl Player {
.zero_initialize_workgroup_memory,
},
});
let resolved_mesh = wgc::pipeline::ResolvedMeshState {
let resolved_mesh = wgc::pipeline::MeshState {
stage: wgc::pipeline::ProgrammableStageDescriptor {
module: self.resolve_shader_module_id(mesh_state.stage.module),
entry_point: mesh_state.stage.entry_point,
+3 -6
View File
@@ -11,8 +11,8 @@ use crate::{
id::{self, AdapterId, DeviceId, QueueId, SurfaceId},
instance::{self, Adapter, Surface},
pipeline::{
self, ProgrammableStageDescriptor, RenderPipelineVertexProcessor,
ResolvedGeneralRenderPipelineDescriptor, ResolvedMeshState, TaskState,
self, MeshState, ProgrammableStageDescriptor, RenderPipelineVertexProcessor,
ResolvedGeneralRenderPipelineDescriptor, TaskState,
},
present,
resource::{
@@ -934,10 +934,7 @@ impl Global {
constants: mesh.stage.constants.clone(),
zero_initialize_workgroup_memory: mesh.stage.zero_initialize_workgroup_memory,
};
RenderPipelineVertexProcessor::Mesh(
task_module,
ResolvedMeshState { stage: mesh_stage },
)
RenderPipelineVertexProcessor::Mesh(task_module, MeshState { stage: mesh_stage })
}
};
+1 -1
View File
@@ -815,7 +815,7 @@ impl<'a> IntoTrace for crate::pipeline::TaskState<'a> {
}
}
impl<'a> IntoTrace for crate::pipeline::ResolvedMeshState<'a> {
impl<'a> IntoTrace for crate::pipeline::MeshState<'a> {
type Output = crate::pipeline::MeshState<'a, PointerId<markers::ShaderModule>>;
fn into_trace(self) -> Self::Output {
crate::pipeline::MeshState {
+1 -3
View File
@@ -626,13 +626,11 @@ pub struct TaskState<'a, SM = Arc<ShaderModule>> {
/// Describes the mesh shader in a mesh shader pipeline.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MeshState<'a, SM = ShaderModuleId> {
pub struct MeshState<'a, SM = Arc<ShaderModule>> {
/// The compiled mesh stage and its entry point.
pub stage: ProgrammableStageDescriptor<'a, SM>,
}
pub type ResolvedMeshState<'a> = MeshState<'a, Arc<ShaderModule>>;
/// Describes a vertex processor for either a conventional or mesh shading
/// pipeline architecture.
///