Skip to content

Commit

Permalink
[next/wgpu] Update wgpu usage in code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Sep 4, 2024
1 parent e299bd8 commit 2a14359
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions all-is-cubes-gpu/src/in_wgpu/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ impl BloomPipelines {
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.bloom.get(),
entry_point: "bloom_vertex",
entry_point: Some("bloom_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.bloom.get(),
entry_point: "bloom_downsample_fragment",
entry_point: Some("bloom_downsample_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: linear_scene_texture_format,
Expand All @@ -88,13 +88,13 @@ impl BloomPipelines {
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.bloom.get(),
entry_point: "bloom_vertex",
entry_point: Some("bloom_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.bloom.get(),
entry_point: "bloom_upsample_fragment",
entry_point: Some("bloom_upsample_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: linear_scene_texture_format,
Expand Down
26 changes: 13 additions & 13 deletions all-is-cubes-gpu/src/in_wgpu/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ impl Pipelines {
layout: Some(&block_render_pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "block_vertex_main",
entry_point: Some("block_vertex_main"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: vertex_buffers,
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: "block_fragment_opaque",
entry_point: Some("block_fragment_opaque"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand All @@ -219,19 +219,19 @@ impl Pipelines {
layout: Some(&block_render_pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "block_vertex_main",
entry_point: Some("block_vertex_main"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: vertex_buffers,
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: match current_graphics_options.transparency {
entry_point: Some(match current_graphics_options.transparency {
TransparencyOption::Volumetric => "block_fragment_transparent_volumetric",
TransparencyOption::Surface | TransparencyOption::Threshold(_) => {
"block_fragment_transparent_surface"
}
ref t => panic!("unimplemented transparency option {t:?}"),
},
}),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand Down Expand Up @@ -274,13 +274,13 @@ impl Pipelines {
// uses the skybox texture too.
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "skybox_vertex",
entry_point: Some("skybox_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: "skybox_fragment",
entry_point: Some("skybox_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand Down Expand Up @@ -315,13 +315,13 @@ impl Pipelines {
layout: Some(&lines_render_pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "lines_vertex",
entry_point: Some("lines_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[WgpuLinesVertex::desc()],
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: "lines_fragment",
entry_point: Some("lines_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand Down Expand Up @@ -378,13 +378,13 @@ impl Pipelines {
),
vertex: wgpu::VertexState {
module: shaders.frame_copy.get(),
entry_point: "frame_copy_vertex",
entry_point: Some("frame_copy_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.frame_copy.get(),
entry_point: "frame_copy_fragment",
entry_point: Some("frame_copy_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: wgpu::TextureFormat::Rgba16Float,
Expand Down Expand Up @@ -459,13 +459,13 @@ impl Pipelines {
),
vertex: wgpu::VertexState {
module: shaders.rerun_copy.get(),
entry_point: "rerun_frame_copy_vertex",
entry_point: Some("rerun_frame_copy_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.rerun_copy.get(),
entry_point: "rerun_frame_copy_fragment",
entry_point: Some("rerun_frame_copy_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[
Some(wgpu::ColorTargetState {
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-gpu/src/in_wgpu/postprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ pub(crate) fn create_postprocess_pipeline(
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.postprocess.get(),
entry_point: "postprocess_vertex",
entry_point: Some("postprocess_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.postprocess.get(),
entry_point: "postprocess_fragment",
entry_point: Some("postprocess_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: super::surface_view_format(surface_format),
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-gpu/src/in_wgpu/shader_testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ where
layout: Some(&pipelines.block_render_pipeline_layout),
vertex: wgpu::VertexState {
module: &shader,
entry_point: "block_vertex_main",
entry_point: Some("block_vertex_main"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[WgpuBlockVertex::desc(), WgpuInstanceData::desc()],
},
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "test_entry_point",
entry_point: Some("test_entry_point"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fbt.linear_scene_texture_format(),
Expand Down

0 comments on commit 2a14359

Please sign in to comment.