Bug 236751

Summary: [Cocoa] Link WebCore with WebGPU.framework 🎉
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, cdumez, cmarcelo, dino, ews-watchlist, rmorisset, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
dino: review+, mmaxfield: commit-queue-
Patch for committing none

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].