Closed Bug 1873039 Opened 2 years ago Closed 11 months ago

WebGPU: ASTC formats are not supported

Categories

(Core :: Graphics: WebGPU, defect, P2)

defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: filip, Assigned: ErichDonGubler)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0

Steps to reproduce:

Called GPUDevice.createTexture with a format of 'astc-8x8-unorm'

Actual results:

Uncaught TypeError: GPUDevice.createTexture: 'astc-8x8-unorm' (value of 'format' member of GPUTextureDescriptor) is not a valid value for enumeration GPUTextureFormat.

Expected results:

ASTC formats supported if texture-compression-astc was available and enabled.

Pretty sure ASTC being missing from here is the issue: https://github.com/mozilla/gecko-dev/blob/master/dom/webidl/WebGPU.webidl#L368

Severity: -- → S3

I would consider this a blocker for Mac as well: https://bugzilla.mozilla.org/show_bug.cgi?id=1839761, since Apple Silicon app often rely on ASTC to share code with iOS due to using the same general architecture.

filip: RE: iOS: Unless something has changed very recently, the Firefox app on iOS currently uses WebKit for its browser engine, and not Gecko, due to . That specific platform's support is not something we will be able to directly resolve until that does change. 🫀

I do hope it will change soon, though! Mozilla is very interested in using Gecko on iOS.πŸ€žπŸ»πŸ’¦

Blocks: webgpu-v1
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2

Ah right I was so into this that I forgot haha. This does apply to Apple Silicon Macs though!

Is there any chance of fixing this so that GPUAdapter.features (https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/features) doesn't return texture-compression-astc on Firefox while we're waiting for this to be fixed?

I'm not sure if there's further work beyond exposing the texture format via IDL, but I just made a patch that does so. CI run: try:0743f7bf5083

🀞🏻

filip: If you download one of the Firefox builds from ☝🏻 the above try push (filtered view for convenience), is this issue resolved while running it? I don't see any significant CI regressions[^1], so I think we might be able to just land the current patch.

[^1]: Some new CTS tests fail, but that's because some tests that were expecting to fail are now succeeding unexpectedly. πŸ˜… We're using the wrong error mechanism in webgpu:api,validation,capability_checks,features,texture_formats:canvas_configuration_view_formats:* (expected to use a TypeError when the feature isn't enabled, but we currently return a validation error).

Flags: needinfo?(filip)
Assignee: nobody → egubler
Attachment #9422927 - Attachment description: WIP: Bug 1873039 - feat(webgpu): expose ASTC texture support r=#webgpu-reviewers → Bug 1873039 - feat(webgpu): expose ASTC texture support r=#webgpu-reviewers
Status: NEW → ASSIGNED

Comment on attachment 9423172 [details]
Bug 1873039 - test(webgpu): reset contradictory expected outcomes in backlog from try:c7c67882a5ee24aa234d26f680c77eb4e6340d9e r=#webgpu-reviewers

Revision D221311 was moved to bug 1917059. Setting attachment 9423172 [details] to obsolete.

Attachment #9423172 - Attachment is obsolete: true
See Also: → 1917253
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/347d2ffd901d feat(webgpu): expose ASTC texture support r=webgpu-reviewers,webidl,teoxoy,smaug https://hg.mozilla.org/integration/autoland/rev/845b7034b36b test(webgpu): reset contradictory `expected` outcomes in `backlog` from `try:0743f7bf508344a54d1f415d285ce68bc80a0726` r=webgpu-reviewers,teoxoy
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch

(In reply to Erich Gubler [:ErichDonGubler] from comment #7)

filip: If you download one of the Firefox builds from ☝🏻 the above try push (filtered view for convenience), is this issue resolved while running it? I don't see any significant CI regressions[^1], so I think we might be able to just land the current patch.

[^1]: Some new CTS tests fail, but that's because some tests that were expecting to fail are now succeeding unexpectedly. πŸ˜… We're using the wrong error mechanism in webgpu:api,validation,capability_checks,features,texture_formats:canvas_configuration_view_formats:* (expected to use a TypeError when the feature isn't enabled, but we currently return a validation error).

Sorry for the delay, just downloaded the build and can confirm it seems to work!

Status: RESOLVED → VERIFIED
Flags: needinfo?(filip)
Status: VERIFIED → REOPENED
Flags: needinfo?(egubler)
Resolution: FIXED → ---
Target Milestone: 132 Branch → ---

I've rebased onto a corrected (soft dep.) patch stack for bug 1917102; hopefully re-landing is uneventful! 🀞🏻

Flags: needinfo?(egubler)
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1f36edd33503 feat(webgpu): expose ASTC texture support r=webgpu-reviewers,webidl,teoxoy,smaug https://hg.mozilla.org/integration/autoland/rev/0c3150a96c14 test(webgpu): reset contradictory `expected` outcomes in `backlog` from `try:0743f7bf508344a54d1f415d285ce68bc80a0726` r=webgpu-reviewers,teoxoy
Status: REOPENED → RESOLVED
Closed: 11 months ago11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: