mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
fix(metal): report indirect execution and 256-byte uniform alignment … (#10189)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
1 parent
c8dc1509b9
commit
6576d41c7d
2 files changed
+9
-6
No files matched your search
@@ -244,6 +244,7 @@ By @sagudev in [#10109](https://github.com/gfx-rs/wgpu/pull/10109).
|
||||
- Report an error instead of panicking when Metal declines to create a texture view, which can occur for some views of textures with `TRANSIENT_ATTACHMENT` usage. By @matthargett in [#10145](https://github.com/gfx-rs/wgpu/pull/10145).
|
||||
- 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.
|
||||
- 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).
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ impl super::CapabilitiesQuery {
|
||||
//
|
||||
// Along with the different OSes, there is also two other modes that
|
||||
// applications can run in: the Simulator, and Mac Catalyst. This can
|
||||
// be detected using `cfg!(target_env = "sim")` or
|
||||
// be detected using `cfg!(target_abi = "sim")` or
|
||||
// `cfg!(target_env = "macabi")`.
|
||||
//
|
||||
// Finally, iOS applications can be run on macOS and visionOS directly
|
||||
@@ -799,7 +799,8 @@ impl super::CapabilitiesQuery {
|
||||
MUTABLE_COMPARISON_SAMPLER_SUPPORT,
|
||||
),
|
||||
sampler_clamp_to_border: Self::supports_any(device, SAMPLER_CLAMP_TO_BORDER_SUPPORT),
|
||||
indirect_draw_dispatch: Self::supports_any(device, INDIRECT_DRAW_DISPATCH_SUPPORT),
|
||||
indirect_draw_dispatch: Self::supports_any(device, INDIRECT_DRAW_DISPATCH_SUPPORT)
|
||||
|| cfg!(target_abi = "sim"),
|
||||
base_vertex_first_instance_drawing: Self::supports_any(
|
||||
device,
|
||||
BASE_VERTEX_FIRST_INSTANCE_SUPPORT,
|
||||
@@ -937,10 +938,11 @@ impl super::CapabilitiesQuery {
|
||||
64
|
||||
},
|
||||
// "Minimum constant buffer offset alignment"
|
||||
constant_buffer_offset_alignment: if matches!(
|
||||
os_type,
|
||||
super::OsType::Macos | super::OsType::VisionOs
|
||||
) {
|
||||
// The iOS Simulator requires 256-byte constant buffer offsets, like macOS
|
||||
// (Apple: "Developing Metal apps that run in Simulator").
|
||||
constant_buffer_offset_alignment: if cfg!(target_abi = "sim")
|
||||
|| matches!(os_type, super::OsType::Macos | super::OsType::VisionOs)
|
||||
{
|
||||
256
|
||||
} else if device.supportsFeatureSet(MTLFeatureSet::macOS_GPUFamily2_v1) {
|
||||
32
|
||||
|
||||
Reference in new issue
Block a user