From 55509fae0025a1e8859dfdf530aa19601a7a8661 Mon Sep 17 00:00:00 2001 From: James Price Date: Fri, 10 Mar 2023 11:06:36 +0000 Subject: [PATCH] Roll third_party/gpuweb to 1f8a05a Fixup Dawn node as necessary. Change-Id: I96b9a078adba1c8988f9bc5835e1f7645c67a57d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/123501 Kokoro: Kokoro Reviewed-by: Ben Clayton Commit-Queue: James Price Reviewed-by: Corentin Wallez --- DEPS | 2 +- src/dawn/node/binding/Converter.cpp | 3 +++ src/dawn/node/binding/GPUShaderModule.cpp | 4 ++-- src/dawn/node/binding/GPUShaderModule.h | 2 +- src/dawn/node/binding/GPUSupportedLimits.cpp | 4 ++++ src/dawn/node/binding/GPUSupportedLimits.h | 1 + src/dawn/node/interop/Browser.idl | 2 ++ webgpu-cts/test_runner.js | 2 +- 8 files changed, 15 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index a553686d3d..0cb1f40810 100644 --- a/DEPS +++ b/DEPS @@ -172,7 +172,7 @@ deps = { 'condition': 'dawn_node', }, 'third_party/gpuweb': { - 'url': '{github_git}/gpuweb/gpuweb.git@0f5fc665a0d5b281e8119f0201e9067b05cf7927', + 'url': '{github_git}/gpuweb/gpuweb.git@1f8a05afc72627d9f7f45d6067f3e373d0a81f8e', 'condition': 'dawn_node', }, diff --git a/src/dawn/node/binding/Converter.cpp b/src/dawn/node/binding/Converter.cpp index 94c91d62e8..31a293da70 100644 --- a/src/dawn/node/binding/Converter.cpp +++ b/src/dawn/node/binding/Converter.cpp @@ -1659,6 +1659,9 @@ bool Converter::Convert(wgpu::FeatureName& out, interop::GPUFeatureName in) { case interop::GPUFeatureName::kBgra8UnormStorage: out = wgpu::FeatureName::BGRA8UnormStorage; return true; + case interop::GPUFeatureName::kFloat32Filterable: + UNIMPLEMENTED("TODO(crbug.com/dawn/1687)"); + return false; } return false; } diff --git a/src/dawn/node/binding/GPUShaderModule.cpp b/src/dawn/node/binding/GPUShaderModule.cpp index 610f6c88e2..953c3e2f08 100644 --- a/src/dawn/node/binding/GPUShaderModule.cpp +++ b/src/dawn/node/binding/GPUShaderModule.cpp @@ -28,8 +28,8 @@ namespace wgpu::binding { GPUShaderModule::GPUShaderModule(wgpu::ShaderModule shader, std::shared_ptr async) : shader_(std::move(shader)), async_(std::move(async)) {} -interop::Promise> GPUShaderModule::compilationInfo( - Napi::Env env) { +interop::Promise> +GPUShaderModule::getCompilationInfo(Napi::Env env) { struct GPUCompilationMessage : public interop::GPUCompilationMessage { WGPUCompilationMessage message; diff --git a/src/dawn/node/binding/GPUShaderModule.h b/src/dawn/node/binding/GPUShaderModule.h index ccaf65c11c..dc4deca81c 100644 --- a/src/dawn/node/binding/GPUShaderModule.h +++ b/src/dawn/node/binding/GPUShaderModule.h @@ -36,7 +36,7 @@ class GPUShaderModule final : public interop::GPUShaderModule { inline operator const wgpu::ShaderModule&() const { return shader_; } // interop::GPUShaderModule interface compliance - interop::Promise> compilationInfo( + interop::Promise> getCompilationInfo( Napi::Env) override; std::string getLabel(Napi::Env) override; void setLabel(Napi::Env, std::string value) override; diff --git a/src/dawn/node/binding/GPUSupportedLimits.cpp b/src/dawn/node/binding/GPUSupportedLimits.cpp index c68e98e278..dadf11dd34 100644 --- a/src/dawn/node/binding/GPUSupportedLimits.cpp +++ b/src/dawn/node/binding/GPUSupportedLimits.cpp @@ -148,4 +148,8 @@ uint32_t GPUSupportedLimits::getMaxComputeWorkgroupsPerDimension(Napi::Env) { return limits_.limits.maxComputeWorkgroupsPerDimension; } +uint32_t GPUSupportedLimits::getMaxFragmentCombinedOutputResources(Napi::Env) { + return limits_.limits.maxFragmentCombinedOutputResources; +} + } // namespace wgpu::binding diff --git a/src/dawn/node/binding/GPUSupportedLimits.h b/src/dawn/node/binding/GPUSupportedLimits.h index 3041d61754..8cee116475 100644 --- a/src/dawn/node/binding/GPUSupportedLimits.h +++ b/src/dawn/node/binding/GPUSupportedLimits.h @@ -60,6 +60,7 @@ class GPUSupportedLimits final : public interop::GPUSupportedLimits { uint32_t getMaxComputeWorkgroupSizeY(Napi::Env) override; uint32_t getMaxComputeWorkgroupSizeZ(Napi::Env) override; uint32_t getMaxComputeWorkgroupsPerDimension(Napi::Env) override; + uint32_t getMaxFragmentCombinedOutputResources(Napi::Env) override; private: wgpu::SupportedLimits limits_; diff --git a/src/dawn/node/interop/Browser.idl b/src/dawn/node/interop/Browser.idl index 44638f62ab..438c304693 100644 --- a/src/dawn/node/interop/Browser.idl +++ b/src/dawn/node/interop/Browser.idl @@ -87,4 +87,6 @@ typedef(ArrayBufferView or ArrayBuffer) BufferSource; [LegacyNoInterfaceObject] interface EventHandler{}; +[LegacyNoInterfaceObject] interface DOMException {}; + enum PredefinedColorSpace { "srgb", "display-p3" }; diff --git a/webgpu-cts/test_runner.js b/webgpu-cts/test_runner.js index cd828bcc6d..85f303a8b4 100644 --- a/webgpu-cts/test_runner.js +++ b/webgpu-cts/test_runner.js @@ -135,7 +135,7 @@ wrapPromiseWithHeartbeat(GPUDevice.prototype, 'createComputePipelineAsync'); wrapPromiseWithHeartbeat(GPUDevice.prototype, 'popErrorScope'); wrapPromiseWithHeartbeat(GPUQueue.prototype, 'onSubmittedWorkDone'); wrapPromiseWithHeartbeat(GPUBuffer.prototype, 'mapAsync'); -wrapPromiseWithHeartbeat(GPUShaderModule.prototype, 'compilationInfo'); +wrapPromiseWithHeartbeat(GPUShaderModule.prototype, 'getCompilationInfo'); globalTestConfig.testHeartbeatCallback = sendHeartbeat; globalTestConfig.noRaceWithRejectOnTimeout = true;