WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
295566
Safari in iOS reports support for texture-compression-bc feature
https://bugs.webkit.org/show_bug.cgi?id=295566
Summary
Safari in iOS reports support for texture-compression-bc feature
castano
Reported
2025-07-07 19:43:46 PDT
The following code: if (adapter.features.has("texture-compression-bc")) { features.push("texture-compression-bc"); } const device = await adapter.requestDevice({ requiredFeatures: features }); ends up requesting the 'texture-compression-bc' feature, which iOS devices do not support. As a result, application tries to load textures with BC formats and this fails silently without creating a valid resource.
Attachments
Add attachment
proposed patch, testcase, etc.
Mike Wyrzykowski
Comment 1
2025-07-07 21:00:48 PDT
Apple9 iOS devices support it, see
https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
Mike Wyrzykowski
Comment 2
2025-07-07 21:03:06 PDT
Do you have a repro case? It looks like we only report it supported when the MTLDevice says its supported:
https://github.com/WebKit/WebKit/blob/3637869868d64861362d2cf84c63ad771996de2e/Source/WebGPU/WebGPU/HardwareCapabilities.mm#L127
if (device.supportsBCTextureCompression) { features.append(WGPUFeatureName_TextureCompressionBC); features.append(WGPUFeatureName_TextureCompressionBCSliced3D); }
Mike Wyrzykowski
Comment 3
2025-07-07 21:04:16 PDT
It's also supported by all M-chip iPads, see the the footnote from the feature set link: 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 GPU’s have support.
Mike Wyrzykowski
Comment 4
2025-07-07 21:08:52 PDT
If you can indicate which iPhone or iPad is failing, that would be appreciated and I can take a look. It's possible the root cause is a different issue. iPhone 15 (non-Pro) and iPhone 14 (Pro) and lower phones should not be reporting support for BC textures. If that is not the case then certainly there is an issue.
castano
Comment 5
2025-07-07 21:56:38 PDT
I had no idea this had been added to to the Apple9 family and was present in iOS also. Thanks for correcting me. The problem must be something else. Here's a simple repro case:
https://ludicon.com/webspark/
This loads a regular texture and converts it to a block compression format in a compute shader. When using BC1 or BC7 no error is produced, but the output is blank. When using ASTC the example works as expected and shows the compressed texture. Is there any way to enable more verbose error logging?
Mike Wyrzykowski
Comment 6
2025-07-07 22:27:06 PDT
Reopening given the repro, thank you
Radar WebKit Bug Importer
Comment 7
2025-07-07 22:27:14 PDT
<
rdar://problem/155293617
>
Mike Wyrzykowski
Comment 8
2025-07-08 10:56:32 PDT
Adding pushErrorScope / popErrorScope,
https://www.w3.org/TR/webgpu/#dom-gpudevice-pusherrorscope
, says: An error occurred while creating sampler: setBindGroup: invalid bind group
Mike Wyrzykowski
Comment 9
2025-07-08 11:02:46 PDT
oh that is because the texture is not getting created: GPUTexture.createView: texture is not valid
Mike Wyrzykowski
Comment 10
2025-07-08 11:18:25 PDT
Well that would do it: #if PLATFORM(MAC) || PLATFORM(MACCATALYST) case WGPUTextureFormat_BC1RGBAUnorm: return MTLPixelFormatBC1_RGBA;
Mike Wyrzykowski
Comment 11
2025-07-08 11:19:39 PDT
thanks for reporting this!
Mike Wyrzykowski
Comment 12
2025-07-08 11:23:34 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/47725
castano
Comment 13
2025-07-08 11:31:58 PDT
Thanks for the quick fix! And for pointing me to the error scope documentation.
EWS
Comment 14
2025-07-08 15:51:24 PDT
Committed
297133@main
(f8ccf55729a1): <
https://commits.webkit.org/297133@main
> Reviewed commits have been landed. Closing PR #47725 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug