[WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
Created attachment 352519 [details] Patch
Created attachment 352521 [details] Patch
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.
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?
Created attachment 352614 [details] Patch
Created attachment 352617 [details] Patch
Created attachment 352631 [details] Patch
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.
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.
(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 :(
Created attachment 352634 [details] Patch
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
Created attachment 352657 [details] Patch for landing
Comment on attachment 352657 [details] Patch for landing Clearing flags on attachment: 352657 Committed r237239: <https://trac.webkit.org/changeset/237239>
All reviewed patches have been landed. Closing bug.
<rdar://problem/45355883>
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