Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade wgpu to 22 #311

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ wasm-bindgen = "=0.2.92"
wasm-bindgen-futures = "0.4"
wasm-bindgen-test = "0.3"
web-sys = "0.3" # Individual features are customized in each crate
wgpu = "0.19.4"
wgpu = "22.0.0"
http-cache-reqwest = "0.14.0"

[profile.release]
Expand Down
10 changes: 10 additions & 0 deletions maplibre/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@ impl Renderer {
max_inter_stage_shader_components: limits
.max_inter_stage_shader_components
.min(constrained_limits.max_inter_stage_shader_components),
max_color_attachments: limits
.max_color_attachments
.min(constrained_limits.max_color_attachments),
max_color_attachment_bytes_per_sample: limits
.max_color_attachment_bytes_per_sample
.min(constrained_limits.max_color_attachment_bytes_per_sample),
max_compute_workgroup_storage_size: limits
.max_compute_workgroup_storage_size
.min(constrained_limits.max_compute_workgroup_storage_size),
Expand All @@ -390,12 +396,14 @@ impl Renderer {
max_compute_workgroups_per_dimension: limits
.max_compute_workgroups_per_dimension
.min(constrained_limits.max_compute_workgroups_per_dimension),
min_subgroup_size: 0,
max_buffer_size: limits
.max_buffer_size
.min(constrained_limits.max_buffer_size),
max_non_sampler_bindings: limits
.max_non_sampler_bindings
.min(constrained_limits.max_non_sampler_bindings),
max_subgroup_size: 0,
};
}

Expand All @@ -405,6 +413,7 @@ impl Renderer {
label: settings.device_label.as_ref().map(|a| a.as_ref()),
required_features: features,
required_limits: limits,
memory_hints: wgpu::MemoryHints::default(),
},
trace_path,
)
Expand Down Expand Up @@ -492,6 +501,7 @@ mod tests {
label: None,
required_features: wgpu::Features::default(),
required_limits: wgpu::Limits::default(),
memory_hints: wgpu::MemoryHints::default(),
maxammann marked this conversation as resolved.
Show resolved Hide resolved
},
None,
)
Expand Down
3 changes: 3 additions & 0 deletions maplibre/src/render/resource/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl RenderPipelineDescriptor {
vertex: wgpu::VertexState {
module: &vertex_shader_module,
entry_point: self.vertex.entry_point,
compilation_options: Default::default(),
buffers: self
.vertex
.buffers
Expand All @@ -76,13 +77,15 @@ impl RenderPipelineDescriptor {
fragment: Some(wgpu::FragmentState {
module: &fragment_shader_module,
entry_point: self.fragment.entry_point,
compilation_options: Default::default(),
targets: self.fragment.targets.as_slice(),
}),
primitive: self.primitive,
depth_stencil: self.depth_stencil.clone(),
multisample: self.multisample,

multiview: None,
cache: None,
});

pipeline
Expand Down
Loading