Bug 217725 - [WebGPU] Centralize Platform Defines
Summary: [WebGPU] Centralize Platform Defines
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-14 12:37 PDT by Don Olmstead
Modified: 2020-10-16 12:33 PDT (History)
7 users (show)

See Also:


Attachments
WIP Patch (18.56 KB, patch)
2020-10-15 07:29 PDT, Don Olmstead
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
WIP Patch (18.58 KB, patch)
2020-10-15 07:38 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
WIP Patch (21.12 KB, patch)
2020-10-15 10:39 PDT, Don Olmstead
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
WIP Patch (21.51 KB, patch)
2020-10-15 10:46 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (23.43 KB, patch)
2020-10-15 12:40 PDT, Don Olmstead
mmaxfield: review+
Details | Formatted Diff | Diff
Check build (23.28 KB, patch)
2020-10-16 08:14 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Check build (22.79 KB, patch)
2020-10-16 08:18 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (25.46 KB, patch)
2020-10-16 11:31 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2020-10-14 12:37:58 PDT
On platforms supporting Metal each Platform* definition points to an ObjC construct which is wrapped in a RetainPtr. For Dawn clients more code is required for smart pointers to function properly.

Idea is to include a GPUPlatformTypes.h with all the Platform* and Platform*SmartPtr definitions. Then when Dawn is added it'll just have that file to include which will contain its definitions.
Comment 1 Don Olmstead 2020-10-15 07:29:15 PDT Comment hidden (obsolete)
Comment 2 Don Olmstead 2020-10-15 07:38:01 PDT Comment hidden (obsolete)
Comment 3 Don Olmstead 2020-10-15 10:39:36 PDT Comment hidden (obsolete)
Comment 4 Don Olmstead 2020-10-15 10:46:00 PDT Comment hidden (obsolete)
Comment 5 Don Olmstead 2020-10-15 12:40:56 PDT
Created attachment 411473 [details]
Patch
Comment 6 Myles C. Maxfield 2020-10-15 17:06:32 PDT
Comment on attachment 411473 [details]
Patch

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

Good cleanup.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUPlatformTypes.h:1
> +/*

IIRC it's impossible (or maybe just error-prone?) to have two files with the same name in different directories. If that's true, then this will have to be moved out of cocoa/ and have PLATFORM guards inside the file.
Comment 7 Myles C. Maxfield 2020-10-15 17:14:48 PDT
Comment on attachment 411473 [details]
Patch

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

>> Source/WebCore/platform/graphics/gpu/cocoa/GPUPlatformTypes.h:1
>> +/*
> 
> IIRC it's impossible (or maybe just error-prone?) to have two files with the same name in different directories. If that's true, then this will have to be moved out of cocoa/ and have PLATFORM guards inside the file.

Oh, PLATFORM isn't right. It should be the same check that is used in the rest of the code.
Comment 8 Don Olmstead 2020-10-16 08:14:14 PDT Comment hidden (obsolete)
Comment 9 Don Olmstead 2020-10-16 08:18:54 PDT Comment hidden (obsolete)
Comment 10 Don Olmstead 2020-10-16 11:31:27 PDT
Created attachment 411600 [details]
Patch
Comment 11 EWS 2020-10-16 12:32:44 PDT
Committed r268603: <https://trac.webkit.org/changeset/268603>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411600 [details].
Comment 12 Radar WebKit Bug Importer 2020-10-16 12:33:18 PDT
<rdar://problem/70387909>