Summary: | [WebGPU] Move error scopes out of GPUDevice for more portable error generation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Justin Fan <justin_fan> | ||||||
Component: | New Bugs | Assignee: | Justin Fan <justin_fan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | dino, ews-watchlist, graouts, kondapallykalyan, mmaxfield, ryanhaddad, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Justin Fan
2019-07-11 17:39:49 PDT
Created attachment 373984 [details]
Patch
Comment on attachment 373984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373984&action=review > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:90 > + auto buffer = m_device->tryCreateBuffer(descriptor, false, m_errorGenerator.copyRef()); It's not obvious what "false" means here. Usually we use two-value enums to make this more readable. > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:189 > -void WebGPUDevice::pushErrorScope(GPUErrorFilter filter) const > +void WebGPUDevice::popErrorScope(ErrorPromise&& promise) wat > Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm:105 > + errorGenerator->generateError("", GPUErrorFilter::OutOfMemory); "generator" isn't really the best name. It doesn't actually generate errors... Comment on attachment 373984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373984&action=review >> Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:189 >> +void WebGPUDevice::popErrorScope(ErrorPromise&& promise) > > wat Moved implementation of pushErrorScope to header since it's trivial and we need to include GPUErrorGenerator anyway. Created attachment 374030 [details]
Patch
Comment on attachment 374030 [details] Patch Clearing flags on attachment: 374030 Committed r247397: <https://trac.webkit.org/changeset/247397> All reviewed patches have been landed. Closing bug. Rolled out in https://trac.webkit.org/r247442 because it conflicted with the rollout of https://bugs.webkit.org/show_bug.cgi?id=199655, which broke the watchOS build. Reopening. Re-landed in https://trac.webkit.org/changeset/247500/webkit. |