mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 05:51:03 +01:00
[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:
1 parent
b20b39d31e
commit
f24f333161
4 files changed
+5
-7
No files matched your search
+1
-1
@@ -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,
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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))]
|
||||
|
||||
Reference in new issue
Block a user