Bug 236751 - [Cocoa] Link WebCore with WebGPU.framework 🎉
Summary: [Cocoa] Link WebCore with WebGPU.framework 🎉
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-16 21:43 PST by Myles C. Maxfield
Modified: 2022-03-30 20:25 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.80 KB, patch)
2022-02-16 21:46 PST, Myles C. Maxfield
dino: review+
mmaxfield: commit-queue-
Details | Formatted Diff | Diff
Patch for committing (109.11 KB, patch)
2022-03-29 19:47 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2022-02-16 21:43:39 PST
[Cocoa] Link WebCore with WebGPU.framework 🎉
Comment 1 Myles C. Maxfield 2022-02-16 21:46:46 PST
Created attachment 452312 [details]
Patch
Comment 2 Myles C. Maxfield 2022-02-17 11:50:27 PST
Comment on attachment 452312 [details]
Patch

I'm not supposed to land this quite yet.
Comment 3 Myles C. Maxfield 2022-02-17 19:34:53 PST
Comment on attachment 452312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452312&action=review

> Source/WTF/wtf/PlatformHave.h:1147
>  #if PLATFORM(COCOA)

This needs to be #if PLATFORM(COCOA) && !CPU(APPLE_ARMV7K)
Comment 4 Alexey Proskuryakov 2022-02-17 19:39:13 PST
Comment on attachment 452312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452312&action=review

> Source/WebCore/Configurations/WebCore.xcconfig:89
> +WK_WEBGPU_LDFLAGS = -weak_framework WebGPU;

Can we actually do this? I didn't think so, because of shared cache.
Comment 5 Myles C. Maxfield 2022-02-17 19:58:12 PST
Comment on attachment 452312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452312&action=review

>> Source/WebCore/Configurations/WebCore.xcconfig:89
>> +WK_WEBGPU_LDFLAGS = -weak_framework WebGPU;
> 
> Can we actually do this? I didn't think so, because of shared cache.

Why not? It's what ANGLE does directly above.
Comment 6 Alexey Proskuryakov 2022-02-18 12:57:43 PST
Discussed directly, seems fine, but it was worth getting on the same page as to why.
Comment 7 Myles C. Maxfield 2022-02-19 13:00:30 PST
Comment on attachment 452312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452312&action=review

>>> Source/WebCore/Configurations/WebCore.xcconfig:89
>>> +WK_WEBGPU_LDFLAGS = -weak_framework WebGPU;
>> 
>> Can we actually do this? I didn't think so, because of shared cache.
> 
> Why not? It's what ANGLE does directly above.

Instead of doing weak linking, we can use regular linking, but only do it on the relevant operating systems.
Comment 8 Alexey Proskuryakov 2022-02-19 14:01:03 PST
Except that we apparently do need weak linking on macOS.
Comment 9 Radar WebKit Bug Importer 2022-02-23 21:44:24 PST
<rdar://problem/89398482>
Comment 10 Myles C. Maxfield 2022-03-29 18:17:50 PDT
Comment on attachment 452312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452312&action=review

>> Source/WTF/wtf/PlatformHave.h:1147
>>  #if PLATFORM(COCOA)
> 
> This needs to be #if PLATFORM(COCOA) && !CPU(APPLE_ARMV7K)

Nevermind. WebGPU doesn't require a 64-bit device.

>>>> Source/WebCore/Configurations/WebCore.xcconfig:89
>>>> +WK_WEBGPU_LDFLAGS = -weak_framework WebGPU;
>>> 
>>> Can we actually do this? I didn't think so, because of shared cache.
>> 
>> Why not? It's what ANGLE does directly above.
> 
> Instead of doing weak linking, we can use regular linking, but only do it on the relevant operating systems.

Weak linking is required because of the base system.
Comment 11 Myles C. Maxfield 2022-03-29 19:47:42 PDT
Created attachment 456087 [details]
Patch for committing
Comment 12 EWS 2022-03-30 20:25:42 PDT
Committed r292138 (249045@main): <https://commits.webkit.org/249045@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 456087 [details].