diff --git a/CHANGELOG.md b/CHANGELOG.md index 222581276..ae06ba4b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -254,6 +254,7 @@ By @sagudev in [#10109](https://github.com/gfx-rs/wgpu/pull/10109). - Report `DownlevelFlags::INDIRECT_EXECUTION` and a 256-byte `min_uniform_buffer_offset_alignment` on the iOS Simulator (`target_abi = "sim"`). The Simulator advertises only the Apple2 GPU family but executes indirect draw/dispatch on the host GPU, so compute renderers such as vello previously failed with "Downlevel flags DownlevelFlags(INDIRECT_EXECUTION) are required but not supported". Note that Metal API Validation still rejects indirect commands there. By @edTheGuy00 in [#10189](https://github.com/gfx-rs/wgpu/pull/10189). - Fix a crash in `Surface::configure` on iOS below 16. `wantsExtendedDynamicRangeContent` is iOS 16+ and is now only called there. By @VladasZ in [#10257](https://github.com/gfx-rs/wgpu/pull/10257). - Fix a crash when creating a declared alternate sRGB view of a render-attachment-only surface with Metal API Validation enabled. By @jinleili in [#10280](https://github.com/gfx-rs/wgpu/pull/10280). +- Fix oversaturated sRGB surface colors on wide-gamut displays by explicitly setting the layer's sRGB color space. By @jinleili in [#10286](https://github.com/gfx-rs/wgpu/pull/10286). #### GLES diff --git a/wgpu-hal/src/metal/surface.rs b/wgpu-hal/src/metal/surface.rs index ce549e6ba..13ee7a39b 100644 --- a/wgpu-hal/src/metal/surface.rs +++ b/wgpu-hal/src/metal/surface.rs @@ -297,8 +297,7 @@ impl crate::Surface for super::Surface { wgt::SurfaceColorSpace::Auto => { unreachable!("wgpu-core resolves `Auto` before configuring the surface") } - // Reset to the layer's default, which treats contents as sRGB. - wgt::SurfaceColorSpace::Srgb => None, + wgt::SurfaceColorSpace::Srgb => Some(unsafe { objc2_core_graphics::kCGColorSpaceSRGB }), wgt::SurfaceColorSpace::ExtendedSrgbLinear => { Some(unsafe { objc2_core_graphics::kCGColorSpaceExtendedLinearSRGB }) }