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

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 b20b39d31e
commit f24f333161
4 files changed
+5 -7

No files matched your search

+1 -1
View File
@@ -651,7 +651,7 @@ impl Player {
})
}
wgc::pipeline::RenderPipelineVertexProcessor::Mesh(task_state, mesh_state) => {
let resolved_task = task_state.map(|task| wgc::pipeline::ResolvedTaskState {
let resolved_task = task_state.map(|task| wgc::pipeline::TaskState {
stage: wgc::pipeline::ProgrammableStageDescriptor {
module: self.resolve_shader_module_id(task.stage.module),
entry_point: task.stage.entry_point,
+2 -2
View File
@@ -12,7 +12,7 @@ use crate::{
instance::{self, Adapter, Surface},
pipeline::{
self, ProgrammableStageDescriptor, RenderPipelineVertexProcessor,
ResolvedGeneralRenderPipelineDescriptor, ResolvedMeshState, ResolvedTaskState,
ResolvedGeneralRenderPipelineDescriptor, ResolvedMeshState, TaskState,
},
present,
resource::{
@@ -923,7 +923,7 @@ impl Global {
.stage
.zero_initialize_workgroup_memory,
};
Some(ResolvedTaskState { stage: state })
Some(TaskState { stage: state })
} else {
None
};
+1 -1
View File
@@ -806,7 +806,7 @@ impl<'a> IntoTrace
}
}
impl<'a> IntoTrace for crate::pipeline::ResolvedTaskState<'a> {
impl<'a> IntoTrace for crate::pipeline::TaskState<'a> {
type Output = crate::pipeline::TaskState<'a, PointerId<markers::ShaderModule>>;
fn into_trace(self) -> Self::Output {
crate::pipeline::TaskState {
+1 -3
View File
@@ -618,13 +618,11 @@ pub struct FragmentState<'a, SM = Arc<ShaderModule>> {
/// Describes the task shader in a mesh shader pipeline.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct TaskState<'a, SM = ShaderModuleId> {
pub struct TaskState<'a, SM = Arc<ShaderModule>> {
/// The compiled task stage and its entry point.
pub stage: ProgrammableStageDescriptor<'a, SM>,
}
pub type ResolvedTaskState<'a> = TaskState<'a, Arc<ShaderModule>>;
/// Describes the mesh shader in a mesh shader pipeline.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]