New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebGPU] Implement GPUAdapter.requestAdapterInfo #12923
[WebGPU] Implement GPUAdapter.requestAdapterInfo #12923
Conversation
EWS run on previous version of this PR (hash fa46428) |
fa46428
to
2dca057
Compare
EWS run on previous version of this PR (hash 2dca057) |
@@ -72,8 +73,7 @@ void GPUAdapter::requestDevice(ScriptExecutionContext&, const std::optional<GPUD | |||
|
|||
void GPUAdapter::requestAdapterInfo(const std::optional<Vector<String>>&, RequestAdapterInfoPromise&& promise) | |||
{ | |||
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=251377 - [WebGPU] Implement GPUAdapter.requestAdapterInfo | |||
promise.resolve(nullptr); | |||
promise.resolve(GPUAdapterInfo::create()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is sufficient - we will probably want this to be more complicated in the future.
I think we should have device creation automatically report this info from the GPU Process to the web process - like how limits and features are already handled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebGPUAdapter already has an adapter name, we could likely use this directly to populate at least one of the GPUAdapterInfo fields, I will do that for now. We can expand upon it as needed in the future
2dca057
to
4b42a81
Compare
EWS run on previous version of this PR (hash 4b42a81) |
4b42a81
to
a2b6895
Compare
EWS run on current version of this PR (hash a2b6895) |
https://bugs.webkit.org/show_bug.cgi?id=251377 <radar://104829439> Reviewed by Myles C. Maxfield. Minimally implement requestAdapterInfo, so https://mlc.ai/web-llm/ does not report an error about output.adapterInfo.description being undefined. * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Headers.cmake: * Source/WebCore/Modules/WebGPU/GPUAdapter.cpp: (WebCore::GPUAdapter::requestAdapterInfo): * Source/WebCore/Modules/WebGPU/GPUAdapter.h: * Source/WebCore/Modules/WebGPU/GPUAdapter.idl: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: * Source/WebCore/Modules/WebGPU/GPUAdapterInfo.h: Added. (WebCore::GPUAdapterInfo::create): (WebCore::GPUAdapterInfo::vendor const): (WebCore::GPUAdapterInfo::architecture const): (WebCore::GPUAdapterInfo::device const): (WebCore::GPUAdapterInfo::description const): (WebCore::GPUAdapterInfo::GPUAdapterInfo): * Source/WebCore/Modules/WebGPU/GPUAdapterInfo.idl: Added. Add new files. Canonical link: https://commits.webkit.org/263164@main
a2b6895
to
1e0ff03
Compare
Committed 263164@main (1e0ff03): https://commits.webkit.org/263164@main Reviewed commits have been landed. Closing PR #12923 and removing active labels. |
1e0ff03
a2b6895
π§ͺ gtk-wk2π§ͺ mac-AS-debug-wk2