RESOLVED FIXED190653
[WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
https://bugs.webkit.org/show_bug.cgi?id=190653
Summary [WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
Justin Fan
Reported 2018-10-16 16:44:06 PDT
[WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
Attachments
Patch (45.04 KB, patch)
2018-10-16 16:51 PDT, Justin Fan
no flags
Patch (44.55 KB, patch)
2018-10-16 17:05 PDT, Justin Fan
no flags
Patch (44.40 KB, patch)
2018-10-17 12:47 PDT, Justin Fan
no flags
Patch (44.35 KB, patch)
2018-10-17 12:51 PDT, Justin Fan
no flags
Patch (44.26 KB, patch)
2018-10-17 13:36 PDT, Justin Fan
no flags
Patch (44.26 KB, patch)
2018-10-17 13:53 PDT, Justin Fan
no flags
Patch for landing (44.26 KB, patch)
2018-10-17 15:53 PDT, Justin Fan
no flags
Justin Fan
Comment 1 2018-10-16 16:51:55 PDT
Justin Fan
Comment 2 2018-10-16 17:05:20 PDT
Myles C. Maxfield
Comment 3 2018-10-16 17:13:48 PDT
Comment on attachment 352521 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352521&action=review > Source/WebCore/Modules/webgpu/WebGPU.cpp:46 > + promise.resolve(WebGPUAdapter::create(descriptor)); 'eyyyyyyy > Source/WebCore/Modules/webgpu/WebGPUDevice.h:42 > + WebGPUAdapter& adapter() const { return *m_adapter.get(); } // FIXME: Probably not right; possible to deref nullptr. this is definitely not right.
Dean Jackson
Comment 4 2018-10-16 17:24:37 PDT
Comment on attachment 352521 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352521&action=review > Source/WebCore/Modules/webgpu/DOMWindowWebGPU.cpp:49 > +// static Remove this. > Source/WebCore/Modules/webgpu/DOMWindowWebGPU.cpp:61 > +// static Same. > Source/WebCore/Modules/webgpu/DOMWindowWebGPU.idl:27 > +// Add a "webgpu" member to Window that contains the global instance of a "WebGPU" I don't think we need this comment. > Source/WebCore/Modules/webgpu/WebGPU.cpp:37 > +// static Remove. > Source/WebCore/Modules/webgpu/WebGPU.cpp:46 > + WebGPUAdapterPromise promise = WTFMove(deferred); > + promise.resolve(WebGPUAdapter::create(descriptor)); This is ok for now, but this will eventually keep a list of active adapters and pass out references to them. > Source/WebCore/Modules/webgpu/WebGPU.cpp:49 > +WebGPU::WebGPU() = default; I think this should go after ::create, or in the header. > Source/WebCore/Modules/webgpu/WebGPU.h:34 > +class WebGPUAdapter; Don't need this. > Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp:37 > +// static Remove. > Source/WebCore/Modules/webgpu/WebGPUDevice.h:47 > + WeakPtr<WebGPUAdapter> m_adapter; Why is this weak?
Justin Fan
Comment 5 2018-10-17 12:47:01 PDT
Justin Fan
Comment 6 2018-10-17 12:51:05 PDT
Justin Fan
Comment 7 2018-10-17 13:36:45 PDT
Dean Jackson
Comment 8 2018-10-17 13:37:56 PDT
Comment on attachment 352617 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352617&action=review > Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp:45 > + UNUSED_PARAM(m_descriptor); This is not needed. > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:41 > + UNUSED_PARAM(m_adapter); Nor this.
Dean Jackson
Comment 9 2018-10-17 13:38:45 PDT
Comment on attachment 352631 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352631&action=review > Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp:45 > + UNUSED_PARAM(m_descriptor); Remove. > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:41 > + UNUSED_PARAM(m_adapter); Remove.
Justin Fan
Comment 10 2018-10-17 13:53:38 PDT
(In reply to Dean Jackson from comment #9) > Comment on attachment 352631 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=352631&action=review > > > Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp:45 > > + UNUSED_PARAM(m_descriptor); > > Remove. > > > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:41 > > + UNUSED_PARAM(m_adapter); > > Remove. If I don't use the private member variables, I get a "Private field __ is unused" error when compiling :(
Justin Fan
Comment 11 2018-10-17 13:53:46 PDT
WebKit Commit Bot
Comment 12 2018-10-17 15:25:21 PDT
Comment on attachment 352634 [details] Patch Rejecting attachment 352634 [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-01', 'validate-changelog', '--check-oops', '--non-interactive', 352634, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output: https://webkit-queues.webkit.org/results/9643624
Justin Fan
Comment 13 2018-10-17 15:53:58 PDT
Created attachment 352657 [details] Patch for landing
WebKit Commit Bot
Comment 14 2018-10-17 16:31:05 PDT
Comment on attachment 352657 [details] Patch for landing Clearing flags on attachment: 352657 Committed r237239: <https://trac.webkit.org/changeset/237239>
WebKit Commit Bot
Comment 15 2018-10-17 16:31:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 16 2018-10-17 16:33:33 PDT
Truitt Savell
Comment 17 2018-10-18 08:15:02 PDT
the new test webgpu/webgpu-enabled.html added in https://trac.webkit.org/changeset/237239/webkit appears to have no test expectations and is showing missing test results. History: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=webgpu%2Fwebgpu-enabled.html
Note You need to log in before you can comment on or make changes to this bug.