From f4dd6fce9f2f115c11ff367e428b8d5f460e7bf5 Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Wed, 30 Nov 2022 11:14:29 +0800 Subject: [PATCH] Update CHANGELOG --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 416bc11a66a..87b312d0336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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