WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
231661
Make WebGPU.xcodeproj and WebGPU.framework
https://bugs.webkit.org/show_bug.cgi?id=231661
Summary
Make WebGPU.xcodeproj and WebGPU.framework
Myles C. Maxfield
Reported
2021-10-13 01:36:55 PDT
Make WebGPU.xcodeproj and WebGPU.framework
Attachments
WIP
(139.57 KB, patch)
2021-10-13 01:44 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
WIP
(138.17 KB, patch)
2021-10-14 13:34 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Standalone .xcodeproj
(137.97 KB, patch)
2021-10-14 14:36 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(124.11 KB, patch)
2021-10-15 13:46 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
WebCore targets
(125.61 KB, patch)
2021-10-15 14:01 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(138.19 KB, patch)
2021-10-18 20:55 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(137.90 KB, patch)
2021-10-19 00:15 PDT
,
Myles C. Maxfield
dino
: review+
Details
Formatted Diff
Diff
Patch for committing
(136.53 KB, patch)
2021-10-19 13:36 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch for committing
(136.56 KB, patch)
2021-10-19 13:58 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch for committing
(136.63 KB, patch)
2021-10-19 14:02 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2021-10-13 01:44:09 PDT
Created
attachment 441044
[details]
WIP
Alexey Proskuryakov
Comment 2
2021-10-13 08:46:42 PDT
Comment on
attachment 441044
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=441044&action=review
> Source/WebGPU/ChangeLog:9 > + without requiring all of WebKit. This patch creates a new Xcode project
Is there a particular benefit of having a separate project, not just a target? Managing these adds substantial overhead.
Myles C. Maxfield
Comment 3
2021-10-13 18:55:07 PDT
Comment on
attachment 441044
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=441044&action=review
>> Source/WebGPU/ChangeLog:9 >> + without requiring all of WebKit. This patch creates a new Xcode project > > Is there a particular benefit of having a separate project, not just a target? Managing these adds substantial overhead.
I don't know! If a separate team wanted to use the WebGPU implementation, but it was a new target (actually probably 2 new targets - WebGPU & WGSL), presumably inside WebCore.xcodeproj, what would that workflow look like? Right now, we have PAL.xcodeproj as a child of WebCore.xcodeproj. Would that have the same substantial overhead? Is your concern just about the addition of a .xcodeproj file, or is it also about creating a new .framework at build time?
Myles C. Maxfield
Comment 4
2021-10-13 18:56:37 PDT
Comment on
attachment 441044
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=441044&action=review
>>> Source/WebGPU/ChangeLog:9 >>> + without requiring all of WebKit. This patch creates a new Xcode project >> >> Is there a particular benefit of having a separate project, not just a target? Managing these adds substantial overhead. > > I don't know! > > If a separate team wanted to use the WebGPU implementation, but it was a new target (actually probably 2 new targets - WebGPU & WGSL), presumably inside WebCore.xcodeproj, what would that workflow look like? > > Right now, we have PAL.xcodeproj as a child of WebCore.xcodeproj. Would that have the same substantial overhead? > > Is your concern just about the addition of a .xcodeproj file, or is it also about creating a new .framework at build time?
s/Would that have the same substantial overhead?/Would moving a new .xcodeproj to become a child of WebCore.xcodeproj instead of a sibling have the same substantial overhead?/
Alexey Proskuryakov
Comment 5
2021-10-14 08:41:39 PDT
Following up directly.
Myles C. Maxfield
Comment 6
2021-10-14 13:34:55 PDT
Created
attachment 441271
[details]
WIP
Myles C. Maxfield
Comment 7
2021-10-14 14:36:13 PDT
Created
attachment 441287
[details]
Standalone .xcodeproj
Myles C. Maxfield
Comment 8
2021-10-15 13:46:10 PDT
Created
attachment 441420
[details]
Patch
Myles C. Maxfield
Comment 9
2021-10-15 14:01:27 PDT
Created
attachment 441424
[details]
WebCore targets
Sam Weinig
Comment 10
2021-10-15 14:30:23 PDT
Comment on
attachment 441424
[details]
WebCore targets View in context:
https://bugs.webkit.org/attachment.cgi?id=441424&action=review
> Source/WebCore/ChangeLog:13 > + We've gotten some requests to be able to use WebGPU from native code, > + without requiring all of WebKit. This patch adds two new targets to > + WebCore.xcodeproj: one that builds the WGSL compiler, and one that > + builds WebGPU.framework. The WGSL compiler is built as a static library > + that is only used by WebGPU.framework. This patch implements one dummy > + function in both targets.
I think this might be better in Source/ rather than in Source/WebCore/? What do you think?
Sam Weinig
Comment 11
2021-10-15 14:33:05 PDT
(In reply to Alexey Proskuryakov from
comment #2
)
> Comment on
attachment 441044
[details]
> WIP > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=441044&action=review
> > > Source/WebGPU/ChangeLog:9 > > + without requiring all of WebKit. This patch creates a new Xcode project > > Is there a particular benefit of having a separate project, not just a > target? Managing these adds substantial overhead.
Having separate projects makes it much clearer what the lines of abstraction are and what is a layering violation.
Myles C. Maxfield
Comment 12
2021-10-15 14:36:55 PDT
(In reply to Sam Weinig from
comment #11
)
> (In reply to Alexey Proskuryakov from
comment #2
) > > Comment on
attachment 441044
[details]
> > WIP > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=441044&action=review
> > > > > Source/WebGPU/ChangeLog:9 > > > + without requiring all of WebKit. This patch creates a new Xcode project > > > > Is there a particular benefit of having a separate project, not just a > > target? Managing these adds substantial overhead. > > Having separate projects makes it much clearer what the lines of abstraction > are and what is a layering violation.
[To anyone following along, I'm following-up with Sam offline, since there are considerations here regarding Apple's internal build systems.]
Myles C. Maxfield
Comment 13
2021-10-15 15:09:10 PDT
Comment on
attachment 441287
[details]
Standalone .xcodeproj View in context:
https://bugs.webkit.org/attachment.cgi?id=441287&action=review
> Source/WebGPU/Configurations/WebGPU.xcconfig:30 > +INSTALL_PATH = $(INSTALL_PATH_$(WK_COCOA_TOUCH)); > +INSTALL_PATH_cocoatouch = $(WK_ALTERNATE_WEBKIT_SDK_PATH)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; > +INSTALL_PATH_ = $(WEBGPU_FRAMEWORKS_DIR);
This is wrong. It shouldn't be installed inside WebKit.framework.
Myles C. Maxfield
Comment 14
2021-10-18 20:54:30 PDT
Comment on
attachment 441424
[details]
WebCore targets View in context:
https://bugs.webkit.org/attachment.cgi?id=441424&action=review
> Source/WebCore/Configurations/WebCore.xcconfig:65 > +NORMAL_WEBKIT_FRAMEWORKS_DIR = $(WK_ALTERNATE_WEBKIT_SDK_PATH)$(SYSTEM_LIBRARY_DIR)/Frameworks; > + > +WEBKIT_FRAMEWORKS_DIR = $(WEBKIT_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR)); > +WEBKIT_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBKIT_FRAMEWORKS_DIR); > +WEBKIT_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR); > + > +INSTALL_PATH = $(WEBKIT_FRAMEWORKS_DIR);
Whoops
Myles C. Maxfield
Comment 15
2021-10-18 20:55:53 PDT
Created
attachment 441686
[details]
Patch
Myles C. Maxfield
Comment 16
2021-10-19 00:15:32 PDT
Created
attachment 441694
[details]
Patch
Dean Jackson
Comment 17
2021-10-19 10:55:21 PDT
Comment on
attachment 441694
[details]
Patch rs=me
Myles C. Maxfield
Comment 18
2021-10-19 13:36:02 PDT
Created
attachment 441784
[details]
Patch for committing
Myles C. Maxfield
Comment 19
2021-10-19 13:58:30 PDT
Created
attachment 441789
[details]
Patch for committing
Myles C. Maxfield
Comment 20
2021-10-19 14:02:18 PDT
Created
attachment 441791
[details]
Patch for committing
Radar WebKit Bug Importer
Comment 21
2021-10-20 01:37:21 PDT
<
rdar://problem/84452606
>
Myles C. Maxfield
Comment 22
2021-10-29 15:08:54 PDT
Comment on
attachment 441791
[details]
Patch for committing View in context:
https://bugs.webkit.org/attachment.cgi?id=441791&action=review
> Source/WebGPU/WebGPU/WebGPUObjC.mm:33 > + id<MTLDevice> device = MTLCreateSystemDefaultDevice();
https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/configure-xcode-for-embedded-development#L329
😅
EWS
Comment 23
2021-11-08 20:35:11 PST
Committed
r285480
(
244004@main
): <
https://commits.webkit.org/244004@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 441791
[details]
.
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