Inline redundant method

This commit is contained in:
Hanno Braun 2024-11-22 19:19:41 +01:00
parent 761f27c111
commit 4d45b72045
2 changed files with 7 additions and 12 deletions

View File

@ -128,7 +128,13 @@ impl<V> Pipeline<V> {
attributes: V::ATTRIBUTES,
}],
},
fragment: Some(shaders.fragment_state()),
fragment: Some(wgpu::FragmentState {
module: &shaders.shader_module,
entry_point: Some("fragment"),
compilation_options:
wgpu::PipelineCompilationOptions::default(),
targets: &shaders.fragment_targets,
}),
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None,

View File

@ -9,17 +9,6 @@ pub struct Shaders<V> {
pub _vertex: PhantomData<V>,
}
impl<V> Shaders<V> {
pub fn fragment_state(&self) -> wgpu::FragmentState {
wgpu::FragmentState {
module: &self.shader_module,
entry_point: Some("fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &self.fragment_targets,
}
}
}
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
#[repr(C)]
pub struct Uniforms {