Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support optional parameters in several GPURenderPassEncoder functions
https://bugs.webkit.org/show_bug.cgi?id=249374 <radar://61518858> Reviewed by Dean Jackson. As noted in https://bugs.webkit.org/show_bug.cgi?id=240219 it is currently problematic to have an optional Size32 with a default value. Workaround is to remove the default value and add the default value when calling .value_or(default_value) Pipe std::optional throughout the Web and GPU process member function declarations and definitions as we do for other optional parameters. * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.cpp: (WebCore::GPURenderBundleEncoder::setIndexBuffer): (WebCore::GPURenderBundleEncoder::setVertexBuffer): (WebCore::GPURenderBundleEncoder::draw): (WebCore::GPURenderBundleEncoder::drawIndexed): * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.h: * Source/WebCore/Modules/WebGPU/GPURenderEncoderBase.idl: * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.cpp: (WebCore::GPURenderPassEncoder::setIndexBuffer): (WebCore::GPURenderPassEncoder::setVertexBuffer): (WebCore::GPURenderPassEncoder::draw): (WebCore::GPURenderPassEncoder::drawIndexed): * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.h: * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderBundleEncoderImpl.cpp: (PAL::WebGPU::RenderBundleEncoderImpl::setIndexBuffer): (PAL::WebGPU::RenderBundleEncoderImpl::setVertexBuffer): (PAL::WebGPU::RenderBundleEncoderImpl::draw): (PAL::WebGPU::RenderBundleEncoderImpl::drawIndexed): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderBundleEncoderImpl.h: * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderPassEncoderImpl.cpp: (PAL::WebGPU::RenderPassEncoderImpl::setIndexBuffer): (PAL::WebGPU::RenderPassEncoderImpl::setVertexBuffer): (PAL::WebGPU::RenderPassEncoderImpl::draw): (PAL::WebGPU::RenderPassEncoderImpl::drawIndexed): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderPassEncoderImpl.h: * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderBundleEncoder.h: * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassEncoder.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.cpp: (WebKit::RemoteRenderBundleEncoder::setIndexBuffer): (WebKit::RemoteRenderBundleEncoder::setVertexBuffer): (WebKit::RemoteRenderBundleEncoder::draw): (WebKit::RemoteRenderBundleEncoder::drawIndexed): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.messages.in: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.cpp: (WebKit::RemoteRenderPassEncoder::setIndexBuffer): (WebKit::RemoteRenderPassEncoder::setVertexBuffer): (WebKit::RemoteRenderPassEncoder::draw): (WebKit::RemoteRenderPassEncoder::drawIndexed): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.messages.in: * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp: (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setIndexBuffer): (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setVertexBuffer): (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::draw): (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndexed): * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h: * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp: (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setIndexBuffer): (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setVertexBuffer): (WebKit::WebGPU::RemoteRenderPassEncoderProxy::draw): (WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndexed): * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.h: Pipe std::optional throughout the Web and GPU process member function declarations and definitions as we do for other optional parameters. * Websites/webkit.org/demos/webgpu/scripts/textured-cube.js: (async helloCube.frameUpdate): (async helloCube): Update textured-cube to use the default values. Canonical link: https://commits.webkit.org/258176@main
- Loading branch information
1 parent
20f6bef
commit cb87e94
Showing
22 changed files
with
188 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.