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

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 b61a4ca293
commit b20b39d31e
4 files changed
+6 -8

No files matched your search

+1 -1
View File
@@ -677,7 +677,7 @@ impl Player {
let fragment = desc
.fragment
.map(|fragment_state| wgc::pipeline::ResolvedFragmentState {
.map(|fragment_state| wgc::pipeline::FragmentState {
stage: wgc::pipeline::ProgrammableStageDescriptor {
module: self.resolve_shader_module_id(fragment_state.stage.module),
entry_point: fragment_state.stage.entry_point,
+2 -2
View File
@@ -11,7 +11,7 @@ use crate::{
id::{self, AdapterId, DeviceId, QueueId, SurfaceId},
instance::{self, Adapter, Surface},
pipeline::{
self, ProgrammableStageDescriptor, RenderPipelineVertexProcessor, ResolvedFragmentState,
self, ProgrammableStageDescriptor, RenderPipelineVertexProcessor,
ResolvedGeneralRenderPipelineDescriptor, ResolvedMeshState, ResolvedTaskState,
},
present,
@@ -950,7 +950,7 @@ impl Global {
constants: state.stage.constants.clone(),
zero_initialize_workgroup_memory: state.stage.zero_initialize_workgroup_memory,
};
Some(ResolvedFragmentState {
Some(pipeline::FragmentState {
stage,
targets: state.targets.clone(),
})
+1 -1
View File
@@ -834,7 +834,7 @@ impl<'a> IntoTrace for crate::pipeline::VertexState<'a> {
}
}
impl<'a> IntoTrace for crate::pipeline::ResolvedFragmentState<'a> {
impl<'a> IntoTrace for crate::pipeline::FragmentState<'a> {
type Output = crate::pipeline::FragmentState<'a, PointerId<markers::ShaderModule>>;
fn into_trace(self) -> Self::Output {
crate::pipeline::FragmentState {
+2 -4
View File
@@ -607,16 +607,14 @@ pub struct VertexState<'a, SM = Arc<ShaderModule>> {
/// Describes fragment processing in a render pipeline.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct FragmentState<'a, SM = ShaderModuleId> {
/// cbindgen:ignore
pub struct FragmentState<'a, SM = Arc<ShaderModule>> {
/// The compiled fragment stage and its entry point.
pub stage: ProgrammableStageDescriptor<'a, SM>,
/// The effect of draw calls on the color aspect of the output target.
pub targets: Cow<'a, [Option<wgt::ColorTargetState>]>,
}
/// cbindgen:ignore
pub type ResolvedFragmentState<'a> = FragmentState<'a, Arc<ShaderModule>>;
/// Describes the task shader in a mesh shader pipeline.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]