Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cb87e94afed226f346682c06f9b19b0f9d4562f8 https://github.com/WebKit/WebKit/commit/cb87e94afed226f346682c06f9b19b0f9d4562f8 Author: Mike Wyrzykowski <mwyrzykow...@apple.com> Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths: M Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.cpp M Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.h M Source/WebCore/Modules/WebGPU/GPURenderEncoderBase.idl M Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.cpp M Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.h M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderBundleEncoderImpl.cpp M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderBundleEncoderImpl.h M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderPassEncoderImpl.cpp M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPURenderPassEncoderImpl.h M Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderBundleEncoder.h M Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassEncoder.h M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.cpp M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.messages.in M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.cpp M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.messages.in M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.h M Websites/webkit.org/demos/webgpu/scripts/textured-cube.js Log Message: ----------- 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 _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes