Skip to content

metal: detect BC texture support on iOS#9656

Open
bmisiak wants to merge 1 commit into
gfx-rs:trunkfrom
bmisiak:fix/ios-bc-texture-support
Open

metal: detect BC texture support on iOS#9656
bmisiak wants to merge 1 commit into
gfx-rs:trunkfrom
bmisiak:fix/ios-bc-texture-support

Conversation

@bmisiak

@bmisiak bmisiak commented Jun 10, 2026

Copy link
Copy Markdown

Description
wgpu is conservative and only allowes BC textures on macOS. On iOS, it panics:

wgpu error: Validation Error

Caused by:
  In Device::create_texture
    Texture format Bc1RgbaUnormSrgb can't be used due to missing features
      Features Features { features_wgpu: FeaturesWGPU(0x0), features_webgpu: FeaturesWebGPU(TEXTURE_COMPRESSION_BC) } are required but not enabled on the device

Apple Silicon, starting with the "Apple9" family (A17 Pro/A18 and up), actually does support BC textures on all platforms, whereas older ones only supported them on macOS.

Their docs say:

Some GPU devices in the Apple7 and Apple8 families support BC texture compression in iPadOS. You can check an individual GPU’s support for this feature by inspecting its MTLDevice.supportsBCTextureCompression property at runtime. As of Apple9 all GPUs have support.

The API is present on iOS >=16.4. I simply added the check gated on this version and it seems to be working well.

Testing
I manually tested this fork by running my Bevy app with BC textures on an iPhone 15 Pro Max (A17 Pro, Apple9), but I don't have a minimal repro. Let me know if you need more testing!

Checklist

  • I self-reviewed and fully understand this PR.
  • WebGPU implementations built with wgpu may be affected behaviorally.
  • Validation and feature gates are in place to confine behavioral changes.
  • Tests demonstrate the validation and altered logic works.
  • CHANGELOG.md entries for the user-facing effects of this change are present.
  • The PR is minimal, and doesn't make sense to land as multiple PRs.
  • Commits are logically scoped and individually reviewable.
  • The PR description has enough context to understand the motivation and solution implemented.
image

@bmisiak bmisiak force-pushed the fix/ios-bc-texture-support branch from 0170df2 to 670ee46 Compare June 10, 2026 05:21
@bmisiak bmisiak marked this pull request as ready for review June 10, 2026 05:27
@andyleiserson andyleiserson self-assigned this Jun 10, 2026

@andyleiserson andyleiserson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread wgpu-hal/src/metal/adapter.rs Outdated
@bmisiak bmisiak force-pushed the fix/ios-bc-texture-support branch from 670ee46 to 6eec147 Compare June 10, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants