From eff9a362bea9a8ad8b7c533bf34dd181c8097045 Mon Sep 17 00:00:00 2001 From: Michael Palmos Date: Sun, 10 Dec 2023 19:32:36 +1100 Subject: [PATCH] Add `COPY_SRC` to Metal's surface usage bits. (#4852) --- CHANGELOG.md | 4 ++++ wgpu-hal/src/metal/adapter.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00d53de0c2..4c33eef76b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -189,6 +189,10 @@ Passing an owned value `window` to `Surface` will return a `Surface<'static>`. S - Record the names of WGSL `alias` declarations in Naga IR `Type`s. By @jimblandy in [#4733](https://github.com/gfx-rs/wgpu/pull/4733). +#### Metal + +- Allow the `COPY_SRC` usage flag in surface configuration. By @Toqozz in [#4852](https://github.com/gfx-rs/wgpu/pull/4852). + ### Examples - remove winit dependency from hello-compute example by @psvri in [#4699](https://github.com/gfx-rs/wgpu/pull/4699) diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index c398b28583..3d8f6f3e57 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -339,7 +339,9 @@ impl crate::Adapter for super::Adapter { ], current_extent, - usage: crate::TextureUses::COLOR_TARGET | crate::TextureUses::COPY_DST, //TODO: expose more + usage: crate::TextureUses::COLOR_TARGET + | crate::TextureUses::COPY_SRC + | crate::TextureUses::COPY_DST, }) }