Upgrade wgpu to 22 (#311)

This commit is contained in:
Max Ammann 2024-07-23 22:22:38 +02:00 committed by GitHub
parent 784604e0b9
commit b5f5f9712f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View File

@ -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]

View File

@ -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),
@ -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,
};
}
@ -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,
)
@ -492,6 +501,7 @@ mod tests {
label: None,
required_features: wgpu::Features::default(),
required_limits: wgpu::Limits::default(),
memory_hints: wgpu::MemoryHints::default(),
},
None,
)

View File

@ -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
@ -76,6 +77,7 @@ 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,
@ -83,6 +85,7 @@ impl RenderPipelineDescriptor {
multisample: self.multisample,
multiview: None,
cache: None,
});
pipeline