Skip to content

Commit

Permalink
Bump js-sys and 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 271b918 commit c4dfe35
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 39 deletions.
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.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ glutin = "0.29.1"
# wasm32 dependencies
console_error_panic_hook = "0.1.7"
console_log = "1"
js-sys = "0.3.64"
js-sys = "0.3.65"
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.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 @@ -95,7 +95,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",
] }
4 changes: 2 additions & 2 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ 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",
"OffscreenCanvas",
] }
js-sys = "0.3.64"
js-sys = "0.3.65"

[target.'cfg(unix)'.dependencies]
libc = "0.2"
Expand Down
4 changes: 2 additions & 2 deletions wgpu-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ bitflags = "2"
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 = [
js-sys = "0.3.65"
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 @@ -159,7 +159,7 @@ web-sys = { workspace = true, features = [
"GpuCompilationMessageType",
"GpuComputePassDescriptor",
"GpuComputePassEncoder",
"GpuComputePassTimestampWrite",
"GpuComputePassTimestampWrites",
"GpuComputePipeline",
"GpuComputePipelineDescriptor",
"GpuCullMode",
Expand Down
36 changes: 21 additions & 15 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 @@ -2732,13 +2734,13 @@ impl crate::context::Context for Context {
offsets: &[wgt::DynamicOffset],
) {
if offsets.is_empty() {
pass_data.0.set_bind_group(index, &bind_group_data.0);
pass_data.0.set_bind_group(index, Some(&bind_group_data.0));
} else {
pass_data
.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 @@ -2861,13 +2863,15 @@ impl crate::context::Context for Context {
offsets: &[wgt::DynamicOffset],
) {
if offsets.is_empty() {
encoder_data.0.set_bind_group(index, &bind_group_data.0);
encoder_data
.0
.set_bind_group(index, Some(&bind_group_data.0));
} else {
encoder_data
.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 @@ -2918,15 +2922,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 @@ -3080,13 +3086,13 @@ impl crate::context::Context for Context {
offsets: &[wgt::DynamicOffset],
) {
if offsets.is_empty() {
pass_data.0.set_bind_group(index, &bind_group_data.0);
pass_data.0.set_bind_group(index, Some(&bind_group_data.0));
} else {
pass_data
.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 @@ -3137,15 +3143,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 @@ -1542,7 +1542,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 c4dfe35

Please sign in to comment.