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

Update web sys 0.3.65 on branch 0.17 #4631

Merged
merged 2 commits into from
Nov 15, 2023
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
30 changes: 15 additions & 15 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 @@ -132,7 +132,7 @@ js-sys = "0.3.64"
wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.34"
wasm-bindgen-test = "0.3"
web-sys = "0.3.64"
web-sys = "0.3.65"

# deno dependencies
deno_console = "0.106.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 @@ -91,7 +91,7 @@ version = "0.17"
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 @@ -109,7 +109,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 = ["Window", "HtmlCanvasElement", "WebGl2RenderingContext", "OffscreenCanvas"] }
web-sys = { version = "0.3.65", features = ["Window", "HtmlCanvasElement", "WebGl2RenderingContext", "OffscreenCanvas"] }
js-sys = "0.3.64"

[target.'cfg(unix)'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion wgpu-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ serde = { version = "1", features = ["serde_derive"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.64"
web-sys = { version = "0.3.64", features = [
web-sys = { version = "0.3.65", features = [
"ImageBitmap",
"HtmlVideoElement",
"HtmlCanvasElement",
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 @@ -383,12 +383,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 @@ -2607,7 +2609,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 @@ -2732,7 +2734,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 @@ -2782,15 +2784,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 @@ -2947,7 +2951,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 @@ -2997,15 +3001,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
Loading
Loading