Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
jinleili committed Nov 30, 2022
1 parent cea1bcb commit f4dd6fc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ Additionally `Surface::get_default_config` now returns an Option and returns Non
+ let config = surface.get_default_config(&adapter).expect("Surface unsupported by adapter");
```

#### Texture Format Reinterpretation

The `view_formats` field is used to specify formats that are compatible with the texture format to allow the creation of views with different formats, currently, only changing srgb-ness is allowed.

```diff
let texture = device.create_texture(&wgpu::TextureDescriptor {
// ...
format: TextureFormat::Rgba8UnormSrgb,
+ view_formats: &[TextureFormat::Rgba8Unorm],
});
```

### Changes

#### General
Expand All @@ -73,6 +85,7 @@ Additionally `Surface::get_default_config` now returns an Option and returns Non
- New downlevel feature `UNRESTRICTED_INDEX_BUFFER` to indicate support for using `INDEX` together with other non-copy/map usages (unsupported on WebGL). By @Wumpf in [#3157](https://github.com/gfx-rs/wgpu/pull/3157)
- Combine `Surface::get_supported_formats`, `Surface::get_supported_present_modes`, and `Surface::get_supported_alpha_modes` into `Surface::get_capabilities` and `SurfaceCapabilities`. By @cwfitzgerald in [#3157](https://github.com/gfx-rs/wgpu/pull/3157)
- Make `Surface::get_default_config` return an Option to prevent panics. By @cwfitzgerald in [#3157](https://github.com/gfx-rs/wgpu/pull/3157)
- Add `view_formats` in TextureDescriptor to match the WebGPU spec. By @jinleili in [#3237](https://github.com/gfx-rs/wgpu/pull/3237)

#### WebGPU

Expand Down

0 comments on commit f4dd6fc

Please sign in to comment.