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] createRender/ComputePipelineAsync are unimplemented #11118
[WebGPU] createRender/ComputePipelineAsync are unimplemented #11118
Conversation
EWS run on previous version of this PR (hash d861fb9) |
@@ -29,9 +29,11 @@ | |||
|
|||
ALLOW_UNUSED_PARAMETERS_BEGIN | |||
ALLOW_DEPRECATED_DECLARATIONS_BEGIN | |||
ALLOW_COMMA_BEGIN |
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.
unified build fixes
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.
Really? Usually unified build fixes are just #include
s....
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.
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/memory/memory.h:33:
/Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/base/macros.h:134:37: note: expanded from macro 'ABSL_HARDENING_ASSERT'
#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
/Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/base/macros.h:98:3: note: expanded from macro 'ABSL_ASSERT'
(ABSL_PREDICT_TRUE((expr)) ? static_cast<void>(0) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource56.cpp:1:
In file included from /Volumes/Data/OpenSource/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp:33:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/api/frame_transformer_interface.h:18:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/api/video/encoded_frame.h:18:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/api/units/timestamp.h:21:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/api/units/time_delta.h:22:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/rtc_base/units/unit_base.h:20:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/rtc_base/checks.h:58:
/Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/strings/string_view.h:320:43: error: possible misuse of comma operator here [-Werror,-Wcomma]
return ABSL_HARDENING_ASSERT(!empty()), ptr_[size() - 1];
/Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/strings/string_view.h:320:12: note: cast expression to void to silence warning
return ABSL_HARDENING_ASSERT(!empty()), ptr_[size() - 1];
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource56.cpp:1:
In file included from /Volumes/Data/OpenSource/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp:33:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/api/frame_transformer_interface.h:18:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/webrtc/api/video/encoded_frame.h:17:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/types/optional.h:67:
In file included from /Volumes/Data/OpenSource/WebKitBuild/Debug/usr/local/include/absl/types/internal/optional.h:24:
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.
It depends on who includes Debug/usr/local/include/absl/strings/string_view.h
first with the warning ignored
d861fb9
to
37f1adc
Compare
EWS run on previous version of this PR (hash 37f1adc) |
37f1adc
to
f895641
Compare
EWS run on previous version of this PR (hash f895641) |
f895641
to
2bf8c24
Compare
EWS run on previous version of this PR (hash 2bf8c24) |
2bf8c24
to
cbb4078
Compare
EWS run on previous version of this PR (hash cbb4078) |
cbb4078
to
bd0c564
Compare
EWS run on previous version of this PR (hash bd0c564) |
bd0c564
to
e4656bf
Compare
EWS run on previous version of this PR (hash e4656bf) |
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.
Thanks for keeping the patch fairly mechanical π
@@ -29,9 +29,11 @@ | |||
|
|||
ALLOW_UNUSED_PARAMETERS_BEGIN | |||
ALLOW_DEPRECATED_DECLARATIONS_BEGIN | |||
ALLOW_COMMA_BEGIN |
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.
Really? Usually unified build fixes are just #include
s....
UNUSED_PARAM(descriptor); | ||
instance().scheduleWork([strongThis = Ref { *this }, callback = WTFMove(callback)]() mutable { | ||
callback(WGPUCreatePipelineAsyncStatus_InternalError, ComputePipeline::createInvalid(strongThis), { }); | ||
auto pipeline = createComputePipeline(descriptor); |
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 think this is fine for now, but we should at least file a bug and add a FIXME with a link to the bug about doing this actually asynchronously
UNUSED_PARAM(descriptor); | ||
instance().scheduleWork([strongThis = Ref { *this }, callback = WTFMove(callback)]() mutable { | ||
callback(WGPUCreatePipelineAsyncStatus_InternalError, RenderPipeline::createInvalid(strongThis), { }); | ||
auto pipeline = createRenderPipeline(descriptor); |
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.
Ditto.
objectHeap->addObject(identifier, remoteComputePipeline); | ||
callback(); | ||
m_backing->createComputePipelineAsync(*convertedDescriptor, [callback = WTFMove(callback), objectHeap = Ref { m_objectHeap }, streamConnection = m_streamConnection.copyRef(), identifier] (RefPtr<PAL::WebGPU::ComputePipeline>&& computePipeline) mutable { | ||
bool result = computePipeline.get(); |
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.
This is so we know whether or not to reject the promise, I assume?
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.
that's correct
e4656bf
to
cdf1a4c
Compare
EWS run on previous version of this PR (hash cdf1a4c) |
cdf1a4c
to
ba9f13b
Compare
EWS run on current version of this PR (hash ba9f13b) |
@@ -45,6 +46,23 @@ ExceptionOr<Ref<WritableStream>> WritableStream::create(JSC::JSGlobalObject& glo | |||
return create(globalObject, underlyingSinkValue, strategyValue); | |||
} | |||
|
|||
WritableStream::~WritableStream() = default; |
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.
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.
This seems fine, JSDOMGlobalObject.h is now included in WritableStream.h so no need to include it in WritableStream.cpp
https://bugs.webkit.org/show_bug.cgi?id=253404 <radar://106244188> Reviewed by Myles C. Maxfield. Add GPUPipelineError and use it to implement createRenderPipelineAsync and createComputePipelineAsync. * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Headers.cmake: Add files. * Source/WebCore/Modules/WebGPU/GPUDevice.cpp: (WebCore::GPUDevice::createComputePipelineAsync): (WebCore::GPUDevice::createRenderPipelineAsync): Reject the promise on failure as specified in the specification. * Source/WebCore/Modules/WebGPU/GPUPipelineError.cpp: Added. (WebCore::GPUPipelineError::GPUPipelineError): * Source/WebCore/Modules/WebGPU/GPUPipelineError.h: Added. * Source/WebCore/Modules/WebGPU/GPUPipelineError.idl: Added. * Source/WebCore/Modules/WebGPU/GPUPipelineErrorInit.h: Added. * Source/WebCore/Modules/WebGPU/GPUPipelineErrorInit.idl: Added. * Source/WebCore/Modules/WebGPU/GPUPipelineErrorReason.h: Added. * Source/WebCore/Modules/WebGPU/GPUPipelineErrorReason.idl: Added. New files. * Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp: Unified build fix. * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp: (PAL::WebGPU::DeviceImpl::createComputePipelineAsync): (PAL::WebGPU::DeviceImpl::createRenderPipelineAsync): Return nullptr on failure. * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h: * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDevice.h: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: New files. * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: New IDLInterface type. * Source/WebGPU/WebGPU/ComputePipeline.mm: (WebGPU::Device::createComputePipelineAsync): * Source/WebGPU/WebGPU/RenderPipeline.mm: (WebGPU::Device::createRenderPipelineAsync): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp: (WebKit::RemoteDevice::createComputePipelineAsync): (WebKit::RemoteDevice::createRenderPipelineAsync): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.messages.in: * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp: (WebKit::WebGPU::RemoteDeviceProxy::createComputePipelineAsync): (WebKit::WebGPU::RemoteDeviceProxy::createRenderPipelineAsync): * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h: Return false or nullptr on failure from the callback. * Source/WebCore/Modules/streams/WritableStream.cpp: (WebCore::WritableStream::lock): (WebCore::WritableStream::locked const): (WebCore::WritableStream::internalWritableStream): * Source/WebCore/Modules/streams/WritableStream.h: (WebCore::WritableStream::lock): Deleted. (WebCore::WritableStream::locked const): Deleted. (WebCore::WritableStream::internalWritableStream): Deleted. Unified build fixes. Canonical link: https://commits.webkit.org/261415@main
ba9f13b
to
b794bac
Compare
Committed 261415@main (b794bac): https://commits.webkit.org/261415@main Reviewed commits have been landed. Closing PR #11118 and removing active labels. |
b794bac
ba9f13b
π§ͺ wpe-wk2