mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 15:31:03 +01:00
fix(metal): Disable framebuffer-only for alternate surface views (#10280)
This commit is contained in:
1 parent
760862747b
commit
aa468606d1
2 files changed
+7
-1
No files matched your search
@@ -213,6 +213,7 @@ By @sagudev in [#10109](https://github.com/gfx-rs/wgpu/pull/10109).
|
||||
- Fix bind group resources for the task, mesh, fragment, and compute shader stages being bound from the wrong offsets whenever a bind group contained resources visible to the task or mesh stages, which could bind the wrong buffer, texture, or sampler to a shader slot. By @teoxoy in [#10043](https://github.com/gfx-rs/wgpu/issues/10043).
|
||||
- BREAKING: Advertise `CompositeAlphaMode::PreMultiplied` instead of `PostMultiplied`, matching the premultiplied alpha compositing that Core Animation actually performs for a non-opaque `CAMetalLayer`. By @nicoburns in [#9922](https://github.com/gfx-rs/wgpu/pull/9922).
|
||||
- If you previously hard-coded `PostMultiplied` to get a transparent macOS window, you will start receiving `UnsupportedAlphaMode` validation errors for this. Those affected should migrate to `PreMultiplied` instead.
|
||||
- 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).
|
||||
|
||||
#### GLES
|
||||
|
||||
|
||||
@@ -257,7 +257,12 @@ impl crate::Surface for super::Surface {
|
||||
*self.extent.write() = config.extent;
|
||||
|
||||
let render_layer = self.render_layer.lock();
|
||||
let framebuffer_only = config.usage == wgt::TextureUses::COLOR_TARGET;
|
||||
// Metal forbids creating alternate-format views of framebuffer-only textures.
|
||||
let framebuffer_only = config.usage == wgt::TextureUses::COLOR_TARGET
|
||||
&& config
|
||||
.view_formats
|
||||
.iter()
|
||||
.all(|format| *format == config.format);
|
||||
let display_sync = match config.present_mode {
|
||||
wgt::PresentMode::Fifo => true,
|
||||
wgt::PresentMode::Immediate => false,
|
||||
|
||||
Reference in new issue
Block a user