Skip to content

Commit

Permalink
UB if surface is used twice simultaneously (#398)
Browse files Browse the repository at this point in the history
Fixes 325
  • Loading branch information
kainino0x authored Nov 12, 2024
1 parent a56c6fe commit bac5208
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/articles/Surfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Surfaces that can be presented to using `webgpu.h` (but not necessarily by all i
- `wl_surface` on Wayland systems with @ref WGPUSurfaceSourceWaylandSurface
- `xcb_window_t` using XCB windows with @ref WGPUSurfaceSourceXCBWindow

Note, if the same environment-specific object is used as the output of two different things simultaneously (two different `WGPUSurface`s, or one `WGPUSurface` and something else outside `webgpu.h`), the behavior is undefined.

For example, creating an @ref WGPUSurface from an `HWND` is done like so:

```c
Expand Down

0 comments on commit bac5208

Please sign in to comment.