Skip to content
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Bottom level categories:

- Fixed signed integer `%` (and `%=`) returning the wrong result for negative operands in the GLSL (OpenGL/GLES) backend, e.g. `-1 % 768` yielding `255` instead of `-1`. GLSL's `%` is undefined when either operand is negative, so signed remainder is now lowered as `a - b * (a / b)`, matching the SPIR-V, HLSL, and Metal backends. By @mstampfli in [#9687](https://github.com/gfx-rs/wgpu/pull/9687).

#### WebGPU

- Recognize `GPUInternalError` when converting a WebGPU error, mapping it to `Error::Internal` instead of panicking with "Unexpected error". By @evilpies in [#9919](https://github.com/gfx-rs/wgpu/pull/9919).

### Dependency Updates

#### General
Expand Down
5 changes: 5 additions & 0 deletions wgpu/src/backend/webgpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ impl crate::Error {
source,
description: js_error.message(),
}
} else if let Some(js_error) = js_error.dyn_ref::<webgpu_sys::GpuInternalError>() {
crate::Error::Internal {
source,
description: js_error.message(),
}
} else if js_error.has_type::<webgpu_sys::GpuOutOfMemoryError>() {
crate::Error::OutOfMemory { source }
} else {
Expand Down
51 changes: 51 additions & 0 deletions wgpu/src/backend/webgpu/webgpu_sys/gen_GpuInternalError.rs

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

2 changes: 2 additions & 0 deletions wgpu/src/backend/webgpu/webgpu_sys/mod.rs

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

1 change: 1 addition & 0 deletions xtask/src/vendor_web_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const WEB_SYS_FEATURES_NEEDED: &[&str] = &[
"gpu_map_mode",
"GpuMipmapFilterMode",
"GpuMultisampleState",
"GpuInternalError",
"GpuObjectDescriptorBase",
"GpuOrigin2dDict",
"GpuOrigin3dDict",
Expand Down