Skip to content

Commit

Permalink
render: Update wgpu to 23
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Oct 30, 2024
1 parent f714172 commit 37b6ab5
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 187 deletions.
266 changes: 109 additions & 157 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ version = "0.1.0"
[workspace.dependencies]
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
naga = { version = "22.1.0", features = ["wgsl-out"] }
wgpu = "22.1.0"
egui = "0.29.1"
naga = { version = "23.0.0", features = ["wgsl-out"] }
wgpu = "23.0.0"
egui = { git = "https://github.com/emilk/egui.git", branch = "master" }
clap = { version = "4.5.20", features = ["derive"] }
cpal = "0.15.3"
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ hashbrown = { version = "0.14.5", features = ["raw"] }
scopeguard = "1.2.0"
fluent-templates = "0.11.0"
egui = { workspace = true, optional = true }
egui_extras = { version = "0.29.1", default-features = false, optional = true }
egui_extras = { git = "https://github.com/emilk/egui.git", branch = "master", default-features = false, optional = true }
png = { version = "0.17.14", optional = true }
flv-rs = { path = "../flv" }
async-channel = { workspace = true }
Expand Down
3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ unknown-git = "deny"
# github.com organizations to allow git sources for
github = [
"ruffle-rs",
# TODO: Remove once a release with https://github.com/emilk/egui/pull/5330
# in it (the bump to wgpu 23.0.0) is out.
"emilk",
]

[advisories]
Expand Down
6 changes: 3 additions & 3 deletions desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ workspace = true
clap = { workspace = true }
cpal = { workspace = true }
egui = { workspace = true }
egui_extras = { version = "0.29.1", default-features = false, features = ["image"] }
egui-wgpu = { version = "0.29.1", features = ["winit"] }
egui_extras = { git = "https://github.com/emilk/egui.git", branch = "master", default-features = false, features = ["image"] }
egui-wgpu = { git = "https://github.com/emilk/egui.git", branch = "master", features = ["winit"] }
image = { workspace = true, features = ["png"] }
egui-winit = "0.29.1"
egui-winit = { git = "https://github.com/emilk/egui.git", branch = "master" }
fontdb = "0.23"
ruffle_core = { path = "../core", features = ["audio", "clap", "mp3", "nellymoser", "default_compatibility_rules", "egui"] }
ruffle_render = { path = "../render", features = ["clap"] }
Expand Down
6 changes: 3 additions & 3 deletions desktop/src/gui/movie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl MovieViewRenderer {
label: None,
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
entry_point: "vs_main",
entry_point: Some("vs_main"),
module: &module,
buffers: &[wgpu::VertexBufferLayout {
array_stride: 4 * 4,
Expand Down Expand Up @@ -107,11 +107,11 @@ impl MovieViewRenderer {

fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: if surface_format.is_srgb() {
entry_point: Some(if surface_format.is_srgb() {
"fs_main_srgb_framebuffer"
} else {
"fs_main_linear_framebuffer"
},
}),
targets: &[Some(wgpu::ColorTargetState {
format: surface_format,
blend: Some(wgpu::BlendState::REPLACE),
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/context3d/current_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@ impl CurrentPipeline {
layout: Some(&pipeline_layout),
vertex: VertexState {
module: &compiled_shaders.vertex_module,
entry_point: naga_agal::SHADER_ENTRY_POINT,
entry_point: Some(naga_agal::SHADER_ENTRY_POINT),
buffers: &wgpu_vertex_buffers,
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
module: &compiled_shaders.fragment_module,
entry_point: naga_agal::SHADER_ENTRY_POINT,
entry_point: Some(naga_agal::SHADER_ENTRY_POINT),
targets: &[Some(ColorTargetState {
format: self.target_format,
blend: Some(wgpu::BlendState {
Expand Down
8 changes: 4 additions & 4 deletions render/wgpu/src/descriptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ impl Descriptors {
layout: Some(copy_texture_pipeline_layout),
vertex: wgpu::VertexState {
module: &self.shaders.copy_srgb_shader,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_POS,
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
module: &self.shaders.copy_srgb_shader,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::ColorTargetState {
format,
// All of our blending has been done by now, so we want
Expand Down Expand Up @@ -168,13 +168,13 @@ impl Descriptors {
layout: Some(copy_texture_pipeline_layout),
vertex: wgpu::VertexState {
module: &self.shaders.copy_shader,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_POS,
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
module: &self.shaders.copy_shader,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::ColorTargetState {
format,
// All of our blending has been done by now, so we want
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/filters/bevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl BevelFilter {
layout: Some(&self.pipeline_layout),
vertex: wgpu::VertexState {
module: &descriptors.shaders.bevel_filter,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_FILTERS_WITH_DOUBLE_BLUR,
compilation_options: Default::default(),
},
Expand All @@ -141,7 +141,7 @@ impl BevelFilter {
},
fragment: Some(wgpu::FragmentState {
module: &descriptors.shaders.bevel_filter,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
compilation_options: Default::default(),
}),
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/filters/blur.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl BlurFilter {
layout: Some(&self.pipeline_layout),
vertex: wgpu::VertexState {
module: &descriptors.shaders.blur_filter,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_FILTERS,
compilation_options: Default::default(),
},
Expand All @@ -136,7 +136,7 @@ impl BlurFilter {
},
fragment: Some(wgpu::FragmentState {
module: &descriptors.shaders.blur_filter,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
compilation_options: Default::default(),
}),
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/filters/color_matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl ColorMatrixFilter {
layout: Some(&self.pipeline_layout),
vertex: wgpu::VertexState {
module: &descriptors.shaders.color_matrix_filter,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_FILTERS,
compilation_options: Default::default(),
},
Expand All @@ -117,7 +117,7 @@ impl ColorMatrixFilter {
},
fragment: Some(wgpu::FragmentState {
module: &descriptors.shaders.color_matrix_filter,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
compilation_options: Default::default(),
}),
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/filters/displacement_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl DisplacementMapFilter {
layout: Some(&self.pipeline_layout),
vertex: wgpu::VertexState {
module: &descriptors.shaders.displacement_map_filter,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_FILTERS,
compilation_options: Default::default(),
},
Expand All @@ -154,7 +154,7 @@ impl DisplacementMapFilter {
},
fragment: Some(wgpu::FragmentState {
module: &descriptors.shaders.displacement_map_filter,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
compilation_options: Default::default(),
}),
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/filters/glow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl GlowFilter {
layout: Some(&self.pipeline_layout),
vertex: wgpu::VertexState {
module: &descriptors.shaders.glow_filter,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: &VERTEX_BUFFERS_DESCRIPTION_FILTERS_WITH_BLUR,
compilation_options: Default::default(),
},
Expand All @@ -140,7 +140,7 @@ impl GlowFilter {
},
fragment: Some(wgpu::FragmentState {
module: &descriptors.shaders.glow_filter,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
compilation_options: Default::default(),
}),
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ fn create_pipeline_descriptor<'a>(
layout: Some(pipeline_layout),
vertex: wgpu::VertexState {
module: vertex_shader,
entry_point: "main_vertex",
entry_point: Some("main_vertex"),
buffers: vertex_buffer_layout,
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
module: fragment_shader,
entry_point: "main_fragment",
entry_point: Some("main_fragment"),
targets: color_target_state,
compilation_options: wgpu::PipelineCompilationOptions {
constants: fragment_constants,
Expand Down
4 changes: 2 additions & 2 deletions render/wgpu/src/pixel_bender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ impl PixelBenderWgpuShader {
layout: Some(&self.pipeline_layout),
vertex: VertexState {
module: &self.vertex_shader,
entry_point: naga_pixelbender::VERTEX_SHADER_ENTRYPOINT,
entry_point: Some(naga_pixelbender::VERTEX_SHADER_ENTRYPOINT),
buffers: &VERTEX_BUFFERS_DESCRIPTION_FILTERS,
compilation_options: Default::default(),
},
fragment: Some(wgpu::FragmentState {
module: &self.fragment_shader,
entry_point: naga_pixelbender::FRAGMENT_SHADER_ENTRYPOINT,
entry_point: Some(naga_pixelbender::FRAGMENT_SHADER_ENTRYPOINT),
targets: &[Some(ColorTargetState {
format,
// FIXME - what should this be?
Expand Down

0 comments on commit 37b6ab5

Please sign in to comment.