Bug 190509 - Add WebGPU 2018 feature flag and experimental feature flag
Summary: Add WebGPU 2018 feature flag and experimental feature flag
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-11 19:56 PDT by Justin Fan
Modified: 2018-10-15 21:58 PDT (History)
3 users (show)

See Also:


Attachments
Patch (63.31 KB, patch)
2018-10-11 20:05 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (60.86 KB, patch)
2018-10-12 15:49 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (59.16 KB, patch)
2018-10-12 18:26 PDT, Justin Fan
commit-queue: commit-queue-
Details | Formatted Diff | Diff
poach (57.26 KB, patch)
2018-10-15 14:41 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Splotch (74.84 KB, patch)
2018-10-15 17:41 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Poncho (57.53 KB, patch)
2018-10-15 17:54 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (58.99 KB, patch)
2018-10-15 21:18 PDT, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2018-10-11 19:56:50 PDT
Add WebGPU 2018 feature flag and experimental feature flag
Comment 1 Justin Fan 2018-10-11 20:05:30 PDT
Created attachment 352128 [details]
Patch
Comment 2 Dean Jackson 2018-10-12 14:35:45 PDT
Comment on attachment 352128 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        Re-add ENABLE_WEBGPU, an experimental feature flag, a RuntimeEnabledFeature,
> +        and an InternalSetting for the 2018 WebGPU prototype.

Instead of InternalSettings, you should make a category: experimental feature in Source/WebKit/Shared/WebPreferences.yaml. As long as it has webcoreBinding: RuntimeEnabledFeatures then it will automatically talk to WebCore.

> Source/WebCore/ChangeLog:20
> +        * testing/InternalSettings.cpp:
> +        (WebCore::InternalSettings::Backup::Backup):
> +        (WebCore::InternalSettings::Backup::restoreTo):
> +        (WebCore::InternalSettings::setWebGPUEnabled):
> +        * testing/InternalSettings.h:
> +        * testing/InternalSettings.idl:

I don't think we need the flags in InternalSettings. Instead, we should use the WebKit preference to toggle WebGPU on or off (using the <!-- webkit-test-runner --> header). I don't see a reason to toggle it during a test.

> Tools/DumpRenderTree/mac/DumpRenderTree.mm:857
> +    [preferences setWebGPUEnabled:YES];

Similar to InternalSettings, I think the better way to do this would be to look for the header in the test file. At the moment in WK1/DRT this is a bit of a hack, but you can copy the logic for experimental:WebAnimationsCSSIntegrationEnabled (just search for that in the project and it will show you what to do). Thankfully, WK2/WKTR gets this automatically.

> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:499
> +    m_testRunner->setWebGPUEnabled(true);

You can then remove this. We'll enable WebGPU via the header in the test files.
Comment 3 Justin Fan 2018-10-12 15:49:29 PDT
Created attachment 352220 [details]
Patch
Comment 4 Dean Jackson 2018-10-12 16:35:38 PDT
Comment on attachment 352220 [details]
Patch

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

> Source/WebKit/Shared/WebPreferences.yaml:1245
> +  humanReadableDescription: "WebGPU 2018 prototype"

How about WebGPU Sketch Prototype?

> Tools/DumpRenderTree/TestOptions.cpp:111
> +        else if (key == "enableWebGPU")
> +            enableWebGPU = parseBooleanTestHeaderValue(value);

This should be experimental:WebGPUEnabled so that it matches what WKTR is looking for.

> Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:480
> +void TestRunner::setWebGPUEnabled(bool enabled)
> +{
> +    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitWebGPUEnabled"));
> +    auto& injectedBundle = InjectedBundle::singleton();
> +    WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
> +}

I don't think you need this any more.

> Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:107
> +    void setWebGPUEnabled(bool);

Or this.

> ChangeLog:13
> +        * Source/cmake/OptionsMac.cmake:
> +        * Source/cmake/tools/vsprops/FeatureDefines.props:
> +        * Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Technically here you were adding the Metal stuff back in :)
Comment 5 Justin Fan 2018-10-12 18:26:46 PDT
Created attachment 352248 [details]
Patch
Comment 6 WebKit Commit Bot 2018-10-15 12:46:48 PDT
Comment on attachment 352248 [details]
Patch

Rejecting attachment 352248 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 352248, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=352248&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=190509&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Processing patch 352248 from bug 190509.
Fetching: https://bugs.webkit.org/attachment.cgi?id=352248
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 26 diffs from patch file(s).
patching file Source/JavaScriptCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/PAL/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKitLegacy/mac/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Hunk #1 succeeded at 348 (offset -2 lines).
Hunk #2 FAILED at 372.
1 out of 2 hunks FAILED -- saving rejects to file Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig.rej
patching file Source/WebCore/Configurations/FeatureDefines.xcconfig
Hunk #1 succeeded at 348 (offset -2 lines).
Hunk #2 FAILED at 372.
1 out of 2 hunks FAILED -- saving rejects to file Source/WebCore/Configurations/FeatureDefines.xcconfig.rej
patching file Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Hunk #1 succeeded at 348 (offset -2 lines).
Hunk #2 FAILED at 372.
1 out of 2 hunks FAILED -- saving rejects to file Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig.rej
patching file Source/WebCore/page/RuntimeEnabledFeatures.h
patching file Source/WebKit/Configurations/FeatureDefines.xcconfig
Hunk #1 succeeded at 348 (offset -2 lines).
Hunk #2 FAILED at 372.
1 out of 2 hunks FAILED -- saving rejects to file Source/WebKit/Configurations/FeatureDefines.xcconfig.rej
patching file Source/WebKit/Shared/WebPreferences.yaml
Hunk #1 succeeded at 1243 (offset 5 lines).
patching file Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
patching file Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Hunk #1 succeeded at 348 (offset -2 lines).
Hunk #2 FAILED at 372.
1 out of 2 hunks FAILED -- saving rejects to file Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig.rej
patching file Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
patching file Source/WebKitLegacy/mac/WebView/WebPreferences.mm
patching file Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
patching file Source/WebKitLegacy/mac/WebView/WebView.mm
patching file Source/cmake/OptionsMac.cmake
patching file Source/cmake/tools/vsprops/FeatureDefines.props
patching file Source/cmake/tools/vsprops/FeatureDefinesCairo.props
patching file Tools/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Tools/DumpRenderTree/TestOptions.cpp
patching file Tools/DumpRenderTree/TestOptions.h
patching file Tools/DumpRenderTree/mac/DumpRenderTree.mm
patching file Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig
Hunk #1 succeeded at 348 (offset -2 lines).
Hunk #2 FAILED at 372.
1 out of 2 hunks FAILED -- saving rejects to file Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig.rej
patching file ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: https://webkit-queues.webkit.org/results/9593304
Comment 7 Justin Fan 2018-10-15 14:41:02 PDT
Created attachment 352383 [details]
poach
Comment 8 Justin Fan 2018-10-15 17:41:30 PDT
Created attachment 352411 [details]
Splotch
Comment 9 Justin Fan 2018-10-15 17:54:26 PDT
Created attachment 352415 [details]
Poncho
Comment 10 WebKit Commit Bot 2018-10-15 20:52:21 PDT
Comment on attachment 352415 [details]
Poncho

Rejecting attachment 352415 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 352415, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Traceback (most recent call last):
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 84, in <module>
    main()
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch", line 79, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
    self._sequence.run_and_handle_errors(tool, options, state)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
    self._run(tool, options, state)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 54, in run
    if changelog_entry.has_valid_reviewer():
AttributeError: 'NoneType' object has no attribute 'has_valid_reviewer'

Full output: https://webkit-queues.webkit.org/results/9609887
Comment 11 Justin Fan 2018-10-15 21:18:13 PDT
Created attachment 352435 [details]
Patch
Comment 12 WebKit Commit Bot 2018-10-15 21:57:55 PDT
Comment on attachment 352435 [details]
Patch

Clearing flags on attachment: 352435

Committed r237170: <https://trac.webkit.org/changeset/237170>
Comment 13 WebKit Commit Bot 2018-10-15 21:57:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2018-10-15 21:58:25 PDT
<rdar://problem/45296230>