Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 403cf88c8df73ed92e7626dd3c1e5511d9762b03 https://github.com/WebKit/WebKit/commit/403cf88c8df73ed92e7626dd3c1e5511d9762b03 Author: Mike Wyrzykowski <mwyrzykow...@apple.com> Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths: M Source/WebCore/Modules/WebGPU/GPUAdapter.cpp M Source/WebCore/Modules/WebGPU/GPUSupportedLimits.cpp M Source/WebCore/Modules/WebGPU/GPUSupportedLimits.h M Source/WebCore/Modules/WebGPU/GPUSupportedLimits.idl M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h M Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUAdapter.h M Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSupportedLimits.h M Source/WebGPU/WebGPU/Adapter.h M Source/WebGPU/WebGPU/Adapter.mm M Source/WebGPU/WebGPU/Buffer.mm M Source/WebGPU/WebGPU/ComputePipeline.mm M Source/WebGPU/WebGPU/HardwareCapabilities.mm M Source/WebGPU/WebGPU/RenderPipeline.mm M Source/WebGPU/WebGPU/ShaderModule.mm M Source/WebGPU/WebGPU/WebGPU.h M Source/WebGPU/WebGPU/WebGPUExt.h M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.cpp M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp M Source/WebKit/Shared/WebGPU/WebGPUSupportedLimits.cpp M Source/WebKit/Shared/WebGPU/WebGPUSupportedLimits.h M Source/WebKit/Shared/WebGPU/WebGPUSupportedLimits.serialization.in M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp Log Message: ----------- [WebGPU] Invalid limits do not result in device creation failure https://bugs.webkit.org/show_bug.cgi?id=252700 <radar://105751730> Reviewed by Myles C. Maxfield. The specification says we should reject the promise of GPUAdapter.requestDevice when the specified limits are invalid. Achieve this by returning null on failure from requestDevice and rejecting the promise in the GPUAdapter layer. Also update WebGPU.h as maxColorAttachmentBytesPerSample was missing from WGPULimits. * Source/WebCore/Modules/WebGPU/GPUAdapter.cpp: (WebCore::GPUAdapter::requestDevice): * Source/WebCore/Modules/WebGPU/GPUSupportedLimits.cpp: (WebCore::GPUSupportedLimits::maxBindingsPerBindGroup const): (WebCore::GPUSupportedLimits::maxBufferSize const): (WebCore::GPUSupportedLimits::maxInterStageShaderVariables const): (WebCore::GPUSupportedLimits::maxColorAttachments const): (WebCore::GPUSupportedLimits::maxColorAttachmentBytesPerSample const): * Source/WebCore/Modules/WebGPU/GPUSupportedLimits.h: * Source/WebCore/Modules/WebGPU/GPUSupportedLimits.idl: * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp: (PAL::WebGPU::supportedFeatures): (PAL::WebGPU::supportedLimits): (PAL::WebGPU::AdapterImpl::requestDevice): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h: * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUAdapter.h: * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSupportedLimits.h: * Source/WebGPU/WGSL/Overload.cpp: (WGSL::OverloadResolver::materialize const): * Source/WebGPU/WebGPU/Adapter.mm: (WebGPU::Adapter::requestInvalidDevice): * Source/WebGPU/WebGPU/Buffer.mm: (wgpuBufferGetMapState): * Source/WebGPU/WebGPU/ComputePipeline.mm: (WebGPU::Device::createComputePipelineAsync): * Source/WebGPU/WebGPU/HardwareCapabilities.mm: (WebGPU::apple3): (WebGPU::apple4): (WebGPU::apple5): (WebGPU::apple6): (WebGPU::apple7): (WebGPU::mac2): (WebGPU::mergeLimits): (WebGPU::anyLimitIsBetterThan): (WebGPU::defaultLimits): * Source/WebGPU/WebGPU/RenderPipeline.mm: (WebGPU::Device::createRenderPipelineAsync): * Source/WebGPU/WebGPU/ShaderModule.mm: (WebGPU::convertMessages): * Source/WebGPU/WebGPU/WebGPU.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.cpp: (WebKit::RemoteAdapter::requestDevice): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp: (WebKit::RemoteGPU::requestAdapter): * Source/WebKit/Shared/WebGPU/WebGPUSupportedLimits.cpp: (WebKit::WebGPU::ConvertToBackingContext::convertToBacking): (WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking): * Source/WebKit/Shared/WebGPU/WebGPUSupportedLimits.h: * Source/WebKit/Shared/WebGPU/WebGPUSupportedLimits.serialization.in: * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp: (WebKit::WebGPU::RemoteAdapterProxy::requestDevice): * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h: * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp: (WebKit::RemoteGPUProxy::requestAdapter): Canonical link: https://commits.webkit.org/260777@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes