Skip to content

Commit

Permalink
Bump web-sys to 0.3.65
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Nov 26, 2023
1 parent 12ee31d commit 02e30bd
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.38"
wasm-bindgen-test = "0.3"
web-time = "0.2.3"
web-sys = "0.3.64"
web-sys = "0.3.65"

# deno dependencies
deno_console = "0.119.0"
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ version = "0.18.0"
default_features = false

[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
web-sys = { version = "0.3.64", features = [
web-sys = { version = "0.3.65", features = [
"HtmlCanvasElement",
"OffscreenCanvas",
] }
2 changes: 1 addition & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ core-graphics-types = "0.1"

[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
wasm-bindgen = "0.2.87"
web-sys = { version = "0.3.64", features = [
web-sys = { version = "0.3.65", features = [
"Window",
"HtmlCanvasElement",
"WebGl2RenderingContext",
Expand Down
2 changes: 1 addition & 1 deletion wgpu-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ serde = { version = "1", features = ["serde_derive"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.65"
web-sys = { version = "0.3.64", features = [
web-sys = { version = "0.3.65", features = [
"ImageBitmap",
"HtmlVideoElement",
"HtmlCanvasElement",
Expand Down
2 changes: 1 addition & 1 deletion wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ web-sys = { workspace = true, features = [
"GpuCompilationMessageType",
"GpuComputePassDescriptor",
"GpuComputePassEncoder",
"GpuComputePassTimestampWrite",
"GpuComputePassTimestampWrites",
"GpuComputePipeline",
"GpuComputePipelineDescriptor",
"GpuCullMode",
Expand Down
28 changes: 16 additions & 12 deletions wgpu/src/backend/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,14 @@ fn map_stencil_state_face(desc: &wgt::StencilFaceState) -> web_sys::GpuStencilFa
}

fn map_depth_stencil_state(desc: &wgt::DepthStencilState) -> web_sys::GpuDepthStencilState {
let mut mapped = web_sys::GpuDepthStencilState::new(map_texture_format(desc.format));
let mut mapped = web_sys::GpuDepthStencilState::new(
map_compare_function(desc.depth_compare),
desc.depth_write_enabled,
map_texture_format(desc.format),
);
mapped.depth_bias(desc.bias.constant);
mapped.depth_bias_clamp(desc.bias.clamp);
mapped.depth_bias_slope_scale(desc.bias.slope_scale);
mapped.depth_compare(map_compare_function(desc.depth_compare));
mapped.depth_write_enabled(desc.depth_write_enabled);
mapped.stencil_back(&map_stencil_state_face(&desc.stencil.back));
mapped.stencil_front(&map_stencil_state_face(&desc.stencil.front));
mapped.stencil_read_mask(desc.stencil.read_mask);
Expand Down Expand Up @@ -2756,7 +2758,7 @@ impl crate::context::Context for Context {
.0
.set_bind_group_with_u32_array_and_f64_and_dynamic_offsets_data_length(
index,
&bind_group_data.0,
Some(&bind_group_data.0),
offsets,
0f64,
offsets.len() as u32,
Expand Down Expand Up @@ -2885,7 +2887,7 @@ impl crate::context::Context for Context {
.0
.set_bind_group_with_u32_array_and_f64_and_dynamic_offsets_data_length(
index,
&bind_group_data.0,
Some(&bind_group_data.0),
offsets,
0f64,
offsets.len() as u32,
Expand Down Expand Up @@ -2936,15 +2938,17 @@ impl crate::context::Context for Context {
Some(s) => {
encoder_data.0.set_vertex_buffer_with_f64_and_f64(
slot,
&buffer_data.0,
Some(&buffer_data.0),
offset as f64,
s.get() as f64,
);
}
None => {
encoder_data
.0
.set_vertex_buffer_with_f64(slot, &buffer_data.0, offset as f64);
encoder_data.0.set_vertex_buffer_with_f64(
slot,
Some(&buffer_data.0),
offset as f64,
);
}
};
}
Expand Down Expand Up @@ -3104,7 +3108,7 @@ impl crate::context::Context for Context {
.0
.set_bind_group_with_u32_array_and_f64_and_dynamic_offsets_data_length(
index,
&bind_group_data.0,
Some(&bind_group_data.0),
offsets,
0f64,
offsets.len() as u32,
Expand Down Expand Up @@ -3155,15 +3159,15 @@ impl crate::context::Context for Context {
Some(s) => {
pass_data.0.set_vertex_buffer_with_f64_and_f64(
slot,
&buffer_data.0,
Some(&buffer_data.0),
offset as f64,
s.get() as f64,
);
}
None => {
pass_data
.0
.set_vertex_buffer_with_f64(slot, &buffer_data.0, offset as f64);
.set_vertex_buffer_with_f64(slot, Some(&buffer_data.0), offset as f64);
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ static_assertions::assert_impl_all!(RenderPipelineDescriptor<'_>: Send, Sync);
/// For use with [`ComputePassDescriptor`].
/// At least one of `beginning_of_pass_write_index` and `end_of_pass_write_index` must be `Some`.
///
/// Corresponds to [WebGPU `GPUComputePassTimestampWrite`](
/// Corresponds to [WebGPU `GPUComputePassTimestampWrites`](
/// https://gpuweb.github.io/gpuweb/#dictdef-gpucomputepasstimestampwrites).
#[derive(Clone, Debug)]
pub struct ComputePassTimestampWrites<'a> {
Expand Down

0 comments on commit 02e30bd

Please sign in to comment.