From 2829922ab00f7ad88f0744e4866b0a99befd04ed Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 3 May 2022 20:02:53 +0000 Subject: [PATCH] dawn/node: Roll to latest IDL Bug: dawn:1123 Change-Id: I430d6b980dc34e37578fc26d3e0e126e75e11d97 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88667 Reviewed-by: Antonio Maiorano Commit-Queue: Antonio Maiorano Auto-Submit: Ben Clayton --- DEPS | 2 +- src/dawn/node/binding/Converter.cpp | 14 +++++++++++ src/dawn/node/binding/Converter.h | 2 ++ src/dawn/node/binding/GPUBindGroup.cpp | 4 ++-- src/dawn/node/binding/GPUBindGroup.h | 4 ++-- src/dawn/node/binding/GPUBindGroupLayout.cpp | 5 ++-- src/dawn/node/binding/GPUBindGroupLayout.h | 4 ++-- src/dawn/node/binding/GPUBuffer.cpp | 4 ++-- src/dawn/node/binding/GPUBuffer.h | 4 ++-- src/dawn/node/binding/GPUCommandBuffer.cpp | 5 ++-- src/dawn/node/binding/GPUCommandBuffer.h | 4 ++-- src/dawn/node/binding/GPUCommandEncoder.cpp | 5 ++-- src/dawn/node/binding/GPUCommandEncoder.h | 4 ++-- .../node/binding/GPUComputePassEncoder.cpp | 24 +++++++++---------- src/dawn/node/binding/GPUComputePassEncoder.h | 18 +++++++------- src/dawn/node/binding/GPUComputePipeline.cpp | 5 ++-- src/dawn/node/binding/GPUComputePipeline.h | 4 ++-- src/dawn/node/binding/GPUDevice.cpp | 4 ++-- src/dawn/node/binding/GPUDevice.h | 4 ++-- src/dawn/node/binding/GPUPipelineLayout.cpp | 5 ++-- src/dawn/node/binding/GPUPipelineLayout.h | 4 ++-- src/dawn/node/binding/GPUQuerySet.cpp | 4 ++-- src/dawn/node/binding/GPUQuerySet.h | 4 ++-- src/dawn/node/binding/GPUQueue.cpp | 4 ++-- src/dawn/node/binding/GPUQueue.h | 4 ++-- src/dawn/node/binding/GPURenderBundle.cpp | 4 ++-- src/dawn/node/binding/GPURenderBundle.h | 4 ++-- .../node/binding/GPURenderBundleEncoder.cpp | 5 ++-- .../node/binding/GPURenderBundleEncoder.h | 4 ++-- .../node/binding/GPURenderPassEncoder.cpp | 5 ++-- src/dawn/node/binding/GPURenderPassEncoder.h | 4 ++-- src/dawn/node/binding/GPURenderPipeline.cpp | 5 ++-- src/dawn/node/binding/GPURenderPipeline.h | 4 ++-- src/dawn/node/binding/GPUSampler.cpp | 4 ++-- src/dawn/node/binding/GPUSampler.h | 4 ++-- src/dawn/node/binding/GPUShaderModule.cpp | 4 ++-- src/dawn/node/binding/GPUShaderModule.h | 4 ++-- src/dawn/node/binding/GPUTexture.cpp | 4 ++-- src/dawn/node/binding/GPUTexture.h | 4 ++-- src/dawn/node/binding/GPUTextureView.cpp | 4 ++-- src/dawn/node/binding/GPUTextureView.h | 4 ++-- 41 files changed, 110 insertions(+), 102 deletions(-) diff --git a/DEPS b/DEPS index 4fa7e3a6d2..698d9105d2 100644 --- a/DEPS +++ b/DEPS @@ -167,7 +167,7 @@ deps = { 'condition': 'dawn_node', }, 'third_party/gpuweb': { - 'url': '{github_git}/gpuweb/gpuweb.git@881403b5fda2d9ac9ffc5daa24e34738205bf155', + 'url': '{github_git}/gpuweb/gpuweb.git@16df823c91c9045b7cdf9bd0f2c0ef6d43ac95e7', 'condition': 'dawn_node', }, 'third_party/gpuweb-cts': { diff --git a/src/dawn/node/binding/Converter.cpp b/src/dawn/node/binding/Converter.cpp index 2d1ae29e64..65c59a5bde 100644 --- a/src/dawn/node/binding/Converter.cpp +++ b/src/dawn/node/binding/Converter.cpp @@ -1184,6 +1184,20 @@ bool Converter::Convert(wgpu::FilterMode& out, const interop::GPUFilterMode& in) return false; } +bool Converter::Convert(wgpu::FilterMode& out, const interop::GPUMipmapFilterMode& in) { + out = wgpu::FilterMode::Nearest; + switch (in) { + case interop::GPUMipmapFilterMode::kNearest: + out = wgpu::FilterMode::Nearest; + return true; + case interop::GPUMipmapFilterMode::kLinear: + out = wgpu::FilterMode::Linear; + return true; + } + Napi::Error::New(env, "invalid value for GPUFilterMode").ThrowAsJavaScriptException(); + return false; +} + bool Converter::Convert(wgpu::ComputePipelineDescriptor& out, const interop::GPUComputePipelineDescriptor& in) { return Convert(out.label, in.label) && // diff --git a/src/dawn/node/binding/Converter.h b/src/dawn/node/binding/Converter.h index 2e46f0daaf..fb94598376 100644 --- a/src/dawn/node/binding/Converter.h +++ b/src/dawn/node/binding/Converter.h @@ -235,6 +235,8 @@ class Converter { [[nodiscard]] bool Convert(wgpu::FilterMode& out, const interop::GPUFilterMode& in); + [[nodiscard]] bool Convert(wgpu::FilterMode& out, const interop::GPUMipmapFilterMode& in); + [[nodiscard]] bool Convert(wgpu::ComputePipelineDescriptor& out, const interop::GPUComputePipelineDescriptor& in); diff --git a/src/dawn/node/binding/GPUBindGroup.cpp b/src/dawn/node/binding/GPUBindGroup.cpp index 7b379b64e2..eef344fd8c 100644 --- a/src/dawn/node/binding/GPUBindGroup.cpp +++ b/src/dawn/node/binding/GPUBindGroup.cpp @@ -25,11 +25,11 @@ namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// GPUBindGroup::GPUBindGroup(wgpu::BindGroup group) : group_(std::move(group)) {} -std::variant GPUBindGroup::getLabel(Napi::Env) { +std::string GPUBindGroup::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUBindGroup::setLabel(Napi::Env, std::variant value) { +void GPUBindGroup::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUBindGroup.h b/src/dawn/node/binding/GPUBindGroup.h index a8e4c0f1a2..92d9ed7ed1 100644 --- a/src/dawn/node/binding/GPUBindGroup.h +++ b/src/dawn/node/binding/GPUBindGroup.h @@ -33,8 +33,8 @@ class GPUBindGroup final : public interop::GPUBindGroup { inline operator const wgpu::BindGroup&() const { return group_; } // interop::GPUBindGroup interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::BindGroup group_; diff --git a/src/dawn/node/binding/GPUBindGroupLayout.cpp b/src/dawn/node/binding/GPUBindGroupLayout.cpp index 84c519a2f1..9538737137 100644 --- a/src/dawn/node/binding/GPUBindGroupLayout.cpp +++ b/src/dawn/node/binding/GPUBindGroupLayout.cpp @@ -25,12 +25,11 @@ namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// GPUBindGroupLayout::GPUBindGroupLayout(wgpu::BindGroupLayout layout) : layout_(std::move(layout)) {} -std::variant GPUBindGroupLayout::getLabel(Napi::Env) { +std::string GPUBindGroupLayout::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUBindGroupLayout::setLabel(Napi::Env, - std::variant value) { +void GPUBindGroupLayout::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUBindGroupLayout.h b/src/dawn/node/binding/GPUBindGroupLayout.h index 484b1bde89..919acd1acc 100644 --- a/src/dawn/node/binding/GPUBindGroupLayout.h +++ b/src/dawn/node/binding/GPUBindGroupLayout.h @@ -34,8 +34,8 @@ class GPUBindGroupLayout final : public interop::GPUBindGroupLayout { inline operator const wgpu::BindGroupLayout&() const { return layout_; } // interop::GPUBindGroupLayout interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::BindGroupLayout layout_; diff --git a/src/dawn/node/binding/GPUBuffer.cpp b/src/dawn/node/binding/GPUBuffer.cpp index d9054a533a..4c2a90e54c 100644 --- a/src/dawn/node/binding/GPUBuffer.cpp +++ b/src/dawn/node/binding/GPUBuffer.cpp @@ -169,11 +169,11 @@ void GPUBuffer::DetachMappings() { mapped_.clear(); } -std::variant GPUBuffer::getLabel(Napi::Env) { +std::string GPUBuffer::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUBuffer::setLabel(Napi::Env, std::variant value) { +void GPUBuffer::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUBuffer.h b/src/dawn/node/binding/GPUBuffer.h index 7f96eeb39f..f4e1b30e38 100644 --- a/src/dawn/node/binding/GPUBuffer.h +++ b/src/dawn/node/binding/GPUBuffer.h @@ -51,8 +51,8 @@ class GPUBuffer final : public interop::GPUBuffer { std::optional size) override; void unmap(Napi::Env) override; void destroy(Napi::Env) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: void DetachMappings(); diff --git a/src/dawn/node/binding/GPUCommandBuffer.cpp b/src/dawn/node/binding/GPUCommandBuffer.cpp index 7aa58bd4ec..4e7794edff 100644 --- a/src/dawn/node/binding/GPUCommandBuffer.cpp +++ b/src/dawn/node/binding/GPUCommandBuffer.cpp @@ -26,12 +26,11 @@ namespace wgpu::binding { GPUCommandBuffer::GPUCommandBuffer(wgpu::CommandBuffer cmd_buf) : cmd_buf_(std::move(cmd_buf)) {} -std::variant GPUCommandBuffer::getLabel(Napi::Env) { +std::string GPUCommandBuffer::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUCommandBuffer::setLabel(Napi::Env, - std::variant value) { +void GPUCommandBuffer::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUCommandBuffer.h b/src/dawn/node/binding/GPUCommandBuffer.h index febb2afcfc..b8ab08e0b0 100644 --- a/src/dawn/node/binding/GPUCommandBuffer.h +++ b/src/dawn/node/binding/GPUCommandBuffer.h @@ -34,8 +34,8 @@ class GPUCommandBuffer final : public interop::GPUCommandBuffer { inline operator const wgpu::CommandBuffer&() const { return cmd_buf_; } // interop::GPUCommandBuffer interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::CommandBuffer cmd_buf_; diff --git a/src/dawn/node/binding/GPUCommandEncoder.cpp b/src/dawn/node/binding/GPUCommandEncoder.cpp index 6d403bcac7..99ea8e07d7 100644 --- a/src/dawn/node/binding/GPUCommandEncoder.cpp +++ b/src/dawn/node/binding/GPUCommandEncoder.cpp @@ -205,12 +205,11 @@ interop::Interface GPUCommandEncoder::finish( return interop::GPUCommandBuffer::Create(env, enc_.Finish(&desc)); } -std::variant GPUCommandEncoder::getLabel(Napi::Env) { +std::string GPUCommandEncoder::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUCommandEncoder::setLabel(Napi::Env, - std::variant value) { +void GPUCommandEncoder::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUCommandEncoder.h b/src/dawn/node/binding/GPUCommandEncoder.h index d33882e854..a3878c62bc 100644 --- a/src/dawn/node/binding/GPUCommandEncoder.h +++ b/src/dawn/node/binding/GPUCommandEncoder.h @@ -74,8 +74,8 @@ class GPUCommandEncoder final : public interop::GPUCommandEncoder { interop::Interface finish( Napi::Env env, interop::GPUCommandBufferDescriptor descriptor) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::CommandEncoder enc_; diff --git a/src/dawn/node/binding/GPUComputePassEncoder.cpp b/src/dawn/node/binding/GPUComputePassEncoder.cpp index b8ce0f5f14..0fc30ae469 100644 --- a/src/dawn/node/binding/GPUComputePassEncoder.cpp +++ b/src/dawn/node/binding/GPUComputePassEncoder.cpp @@ -35,17 +35,18 @@ void GPUComputePassEncoder::setPipeline(Napi::Env, enc_.SetPipeline(*pipeline.As()); } -void GPUComputePassEncoder::dispatch(Napi::Env, - interop::GPUSize32 workgroupCountX, - interop::GPUSize32 workgroupCountY, - interop::GPUSize32 workgroupCountZ) { - enc_.Dispatch(workgroupCountX, workgroupCountY, workgroupCountZ); +void GPUComputePassEncoder::dispatchWorkgroups(Napi::Env, + interop::GPUSize32 workgroupCountX, + interop::GPUSize32 workgroupCountY, + interop::GPUSize32 workgroupCountZ) { + enc_.DispatchWorkgroups(workgroupCountX, workgroupCountY, workgroupCountZ); } -void GPUComputePassEncoder::dispatchIndirect(Napi::Env, - interop::Interface indirectBuffer, - interop::GPUSize64 indirectOffset) { - enc_.DispatchIndirect(*indirectBuffer.As(), indirectOffset); +void GPUComputePassEncoder::dispatchWorkgroupsIndirect( + Napi::Env, + interop::Interface indirectBuffer, + interop::GPUSize64 indirectOffset) { + enc_.DispatchWorkgroupsIndirect(*indirectBuffer.As(), indirectOffset); } void GPUComputePassEncoder::end(Napi::Env) { @@ -112,12 +113,11 @@ void GPUComputePassEncoder::insertDebugMarker(Napi::Env, std::string markerLabel enc_.InsertDebugMarker(markerLabel.c_str()); } -std::variant GPUComputePassEncoder::getLabel(Napi::Env) { +std::string GPUComputePassEncoder::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUComputePassEncoder::setLabel(Napi::Env, - std::variant value) { +void GPUComputePassEncoder::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUComputePassEncoder.h b/src/dawn/node/binding/GPUComputePassEncoder.h index ab9a9e5a5d..6f82a46115 100644 --- a/src/dawn/node/binding/GPUComputePassEncoder.h +++ b/src/dawn/node/binding/GPUComputePassEncoder.h @@ -36,13 +36,13 @@ class GPUComputePassEncoder final : public interop::GPUComputePassEncoder { // interop::GPUComputePassEncoder interface compliance void setPipeline(Napi::Env, interop::Interface pipeline) override; - void dispatch(Napi::Env, - interop::GPUSize32 workgroupCountX, - interop::GPUSize32 workgroupCountY, - interop::GPUSize32 workgroupCountZ) override; - void dispatchIndirect(Napi::Env, - interop::Interface indirectBuffer, - interop::GPUSize64 indirectOffset) override; + void dispatchWorkgroups(Napi::Env, + interop::GPUSize32 workgroupCountX, + interop::GPUSize32 workgroupCountY, + interop::GPUSize32 workgroupCountZ) override; + void dispatchWorkgroupsIndirect(Napi::Env, + interop::Interface indirectBuffer, + interop::GPUSize64 indirectOffset) override; void end(Napi::Env) override; void setBindGroup(Napi::Env, interop::GPUIndex32 index, @@ -57,8 +57,8 @@ class GPUComputePassEncoder final : public interop::GPUComputePassEncoder { void pushDebugGroup(Napi::Env, std::string groupLabel) override; void popDebugGroup(Napi::Env) override; void insertDebugMarker(Napi::Env, std::string markerLabel) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::ComputePassEncoder enc_; diff --git a/src/dawn/node/binding/GPUComputePipeline.cpp b/src/dawn/node/binding/GPUComputePipeline.cpp index 8883aba260..c2bfedf1e7 100644 --- a/src/dawn/node/binding/GPUComputePipeline.cpp +++ b/src/dawn/node/binding/GPUComputePipeline.cpp @@ -35,12 +35,11 @@ interop::Interface GPUComputePipeline::getBindGroup env, pipeline_.GetBindGroupLayout(index)); } -std::variant GPUComputePipeline::getLabel(Napi::Env) { +std::string GPUComputePipeline::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUComputePipeline::setLabel(Napi::Env, - std::variant value) { +void GPUComputePipeline::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUComputePipeline.h b/src/dawn/node/binding/GPUComputePipeline.h index 0afb1ac3d9..45af9f787c 100644 --- a/src/dawn/node/binding/GPUComputePipeline.h +++ b/src/dawn/node/binding/GPUComputePipeline.h @@ -36,8 +36,8 @@ class GPUComputePipeline final : public interop::GPUComputePipeline { // interop::GPUComputePipeline interface compliance interop::Interface getBindGroupLayout(Napi::Env, uint32_t index) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::ComputePipeline pipeline_; diff --git a/src/dawn/node/binding/GPUDevice.cpp b/src/dawn/node/binding/GPUDevice.cpp index c1aba64768..163acd829e 100644 --- a/src/dawn/node/binding/GPUDevice.cpp +++ b/src/dawn/node/binding/GPUDevice.cpp @@ -474,11 +474,11 @@ interop::Promise> GPUDevice::popErrorScope(Napi return promise; } -std::variant GPUDevice::getLabel(Napi::Env) { +std::string GPUDevice::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUDevice::setLabel(Napi::Env, std::variant value) { +void GPUDevice::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUDevice.h b/src/dawn/node/binding/GPUDevice.h index 3e04855860..57a4c2ca51 100644 --- a/src/dawn/node/binding/GPUDevice.h +++ b/src/dawn/node/binding/GPUDevice.h @@ -84,8 +84,8 @@ class GPUDevice final : public interop::GPUDevice { Napi::Env env) override; void pushErrorScope(Napi::Env, interop::GPUErrorFilter filter) override; interop::Promise> popErrorScope(Napi::Env env) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; interop::Interface getOnuncapturederror(Napi::Env) override; void setOnuncapturederror(Napi::Env, interop::Interface value) override; void addEventListener( diff --git a/src/dawn/node/binding/GPUPipelineLayout.cpp b/src/dawn/node/binding/GPUPipelineLayout.cpp index 4d6027cd7d..e6f1c1a19b 100644 --- a/src/dawn/node/binding/GPUPipelineLayout.cpp +++ b/src/dawn/node/binding/GPUPipelineLayout.cpp @@ -25,12 +25,11 @@ namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// GPUPipelineLayout::GPUPipelineLayout(wgpu::PipelineLayout layout) : layout_(std::move(layout)) {} -std::variant GPUPipelineLayout::getLabel(Napi::Env) { +std::string GPUPipelineLayout::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUPipelineLayout::setLabel(Napi::Env, - std::variant value) { +void GPUPipelineLayout::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUPipelineLayout.h b/src/dawn/node/binding/GPUPipelineLayout.h index acdd4048f3..f432e7afa6 100644 --- a/src/dawn/node/binding/GPUPipelineLayout.h +++ b/src/dawn/node/binding/GPUPipelineLayout.h @@ -34,8 +34,8 @@ class GPUPipelineLayout final : public interop::GPUPipelineLayout { inline operator const wgpu::PipelineLayout&() const { return layout_; } // interop::GPUPipelineLayout interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::PipelineLayout layout_; diff --git a/src/dawn/node/binding/GPUQuerySet.cpp b/src/dawn/node/binding/GPUQuerySet.cpp index 8f1e9350fe..3197d987e4 100644 --- a/src/dawn/node/binding/GPUQuerySet.cpp +++ b/src/dawn/node/binding/GPUQuerySet.cpp @@ -29,11 +29,11 @@ void GPUQuerySet::destroy(Napi::Env) { query_set_.Destroy(); } -std::variant GPUQuerySet::getLabel(Napi::Env) { +std::string GPUQuerySet::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUQuerySet::setLabel(Napi::Env, std::variant value) { +void GPUQuerySet::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUQuerySet.h b/src/dawn/node/binding/GPUQuerySet.h index 27944d1900..7c0e9dd163 100644 --- a/src/dawn/node/binding/GPUQuerySet.h +++ b/src/dawn/node/binding/GPUQuerySet.h @@ -34,8 +34,8 @@ class GPUQuerySet final : public interop::GPUQuerySet { // interop::GPUQuerySet interface compliance void destroy(Napi::Env) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::QuerySet query_set_; diff --git a/src/dawn/node/binding/GPUQueue.cpp b/src/dawn/node/binding/GPUQueue.cpp index 7650f721a3..d2ab9126f5 100644 --- a/src/dawn/node/binding/GPUQueue.cpp +++ b/src/dawn/node/binding/GPUQueue.cpp @@ -148,11 +148,11 @@ void GPUQueue::copyExternalImageToTexture(Napi::Env, UNIMPLEMENTED(); } -std::variant GPUQueue::getLabel(Napi::Env) { +std::string GPUQueue::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUQueue::setLabel(Napi::Env, std::variant value) { +void GPUQueue::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUQueue.h b/src/dawn/node/binding/GPUQueue.h index cffb491c20..58e5209109 100644 --- a/src/dawn/node/binding/GPUQueue.h +++ b/src/dawn/node/binding/GPUQueue.h @@ -51,8 +51,8 @@ class GPUQueue final : public interop::GPUQueue { interop::GPUImageCopyExternalImage source, interop::GPUImageCopyTextureTagged destination, interop::GPUExtent3D copySize) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::Queue queue_; diff --git a/src/dawn/node/binding/GPURenderBundle.cpp b/src/dawn/node/binding/GPURenderBundle.cpp index ef3a0da73c..5c0ff2edfe 100644 --- a/src/dawn/node/binding/GPURenderBundle.cpp +++ b/src/dawn/node/binding/GPURenderBundle.cpp @@ -28,11 +28,11 @@ namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// GPURenderBundle::GPURenderBundle(wgpu::RenderBundle bundle) : bundle_(std::move(bundle)) {} -std::variant GPURenderBundle::getLabel(Napi::Env) { +std::string GPURenderBundle::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPURenderBundle::setLabel(Napi::Env, std::variant value) { +void GPURenderBundle::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPURenderBundle.h b/src/dawn/node/binding/GPURenderBundle.h index bd31f6b9e9..23d0ad267e 100644 --- a/src/dawn/node/binding/GPURenderBundle.h +++ b/src/dawn/node/binding/GPURenderBundle.h @@ -34,8 +34,8 @@ class GPURenderBundle final : public interop::GPURenderBundle { inline operator const wgpu::RenderBundle&() const { return bundle_; } // interop::GPURenderBundle interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::RenderBundle bundle_; diff --git a/src/dawn/node/binding/GPURenderBundleEncoder.cpp b/src/dawn/node/binding/GPURenderBundleEncoder.cpp index f07db2f086..801eaa2c96 100644 --- a/src/dawn/node/binding/GPURenderBundleEncoder.cpp +++ b/src/dawn/node/binding/GPURenderBundleEncoder.cpp @@ -181,12 +181,11 @@ void GPURenderBundleEncoder::drawIndexedIndirect( enc_.DrawIndexedIndirect(b, o); } -std::variant GPURenderBundleEncoder::getLabel(Napi::Env) { +std::string GPURenderBundleEncoder::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPURenderBundleEncoder::setLabel(Napi::Env, - std::variant value) { +void GPURenderBundleEncoder::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPURenderBundleEncoder.h b/src/dawn/node/binding/GPURenderBundleEncoder.h index c65e60ab02..130a5bdd06 100644 --- a/src/dawn/node/binding/GPURenderBundleEncoder.h +++ b/src/dawn/node/binding/GPURenderBundleEncoder.h @@ -76,8 +76,8 @@ class GPURenderBundleEncoder final : public interop::GPURenderBundleEncoder { void drawIndexedIndirect(Napi::Env, interop::Interface indirectBuffer, interop::GPUSize64 indirectOffset) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::RenderBundleEncoder enc_; diff --git a/src/dawn/node/binding/GPURenderPassEncoder.cpp b/src/dawn/node/binding/GPURenderPassEncoder.cpp index 46997dce87..ec686bcb69 100644 --- a/src/dawn/node/binding/GPURenderPassEncoder.cpp +++ b/src/dawn/node/binding/GPURenderPassEncoder.cpp @@ -241,12 +241,11 @@ void GPURenderPassEncoder::drawIndexedIndirect( enc_.DrawIndexedIndirect(b, o); } -std::variant GPURenderPassEncoder::getLabel(Napi::Env) { +std::string GPURenderPassEncoder::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPURenderPassEncoder::setLabel(Napi::Env, - std::variant value) { +void GPURenderPassEncoder::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPURenderPassEncoder.h b/src/dawn/node/binding/GPURenderPassEncoder.h index 7fed340477..a7cfb8eb81 100644 --- a/src/dawn/node/binding/GPURenderPassEncoder.h +++ b/src/dawn/node/binding/GPURenderPassEncoder.h @@ -95,8 +95,8 @@ class GPURenderPassEncoder final : public interop::GPURenderPassEncoder { void drawIndexedIndirect(Napi::Env, interop::Interface indirectBuffer, interop::GPUSize64 indirectOffset) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::RenderPassEncoder enc_; diff --git a/src/dawn/node/binding/GPURenderPipeline.cpp b/src/dawn/node/binding/GPURenderPipeline.cpp index d45386e52d..cd236c08a5 100644 --- a/src/dawn/node/binding/GPURenderPipeline.cpp +++ b/src/dawn/node/binding/GPURenderPipeline.cpp @@ -35,12 +35,11 @@ interop::Interface GPURenderPipeline::getBindGroupL env, pipeline_.GetBindGroupLayout(index)); } -std::variant GPURenderPipeline::getLabel(Napi::Env) { +std::string GPURenderPipeline::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPURenderPipeline::setLabel(Napi::Env, - std::variant value) { +void GPURenderPipeline::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPURenderPipeline.h b/src/dawn/node/binding/GPURenderPipeline.h index b37f435de0..26f8ad6e1f 100644 --- a/src/dawn/node/binding/GPURenderPipeline.h +++ b/src/dawn/node/binding/GPURenderPipeline.h @@ -36,8 +36,8 @@ class GPURenderPipeline final : public interop::GPURenderPipeline { // interop::GPURenderPipeline interface compliance interop::Interface getBindGroupLayout(Napi::Env, uint32_t index) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::RenderPipeline pipeline_; diff --git a/src/dawn/node/binding/GPUSampler.cpp b/src/dawn/node/binding/GPUSampler.cpp index a2f95b7246..77f395d6ae 100644 --- a/src/dawn/node/binding/GPUSampler.cpp +++ b/src/dawn/node/binding/GPUSampler.cpp @@ -26,11 +26,11 @@ namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// GPUSampler::GPUSampler(wgpu::Sampler sampler) : sampler_(std::move(sampler)) {} -std::variant GPUSampler::getLabel(Napi::Env) { +std::string GPUSampler::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUSampler::setLabel(Napi::Env, std::variant value) { +void GPUSampler::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUSampler.h b/src/dawn/node/binding/GPUSampler.h index a15897c921..578469d805 100644 --- a/src/dawn/node/binding/GPUSampler.h +++ b/src/dawn/node/binding/GPUSampler.h @@ -32,8 +32,8 @@ class GPUSampler final : public interop::GPUSampler { inline operator const wgpu::Sampler&() const { return sampler_; } // interop::GPUSampler interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::Sampler sampler_; diff --git a/src/dawn/node/binding/GPUShaderModule.cpp b/src/dawn/node/binding/GPUShaderModule.cpp index 8f44982ce4..610f6c88e2 100644 --- a/src/dawn/node/binding/GPUShaderModule.cpp +++ b/src/dawn/node/binding/GPUShaderModule.cpp @@ -104,11 +104,11 @@ interop::Promise> GPUShaderModul return promise; } -std::variant GPUShaderModule::getLabel(Napi::Env) { +std::string GPUShaderModule::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUShaderModule::setLabel(Napi::Env, std::variant value) { +void GPUShaderModule::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUShaderModule.h b/src/dawn/node/binding/GPUShaderModule.h index de4c2580b1..ccaf65c11c 100644 --- a/src/dawn/node/binding/GPUShaderModule.h +++ b/src/dawn/node/binding/GPUShaderModule.h @@ -38,8 +38,8 @@ class GPUShaderModule final : public interop::GPUShaderModule { // interop::GPUShaderModule interface compliance interop::Promise> compilationInfo( Napi::Env) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::ShaderModule shader_; diff --git a/src/dawn/node/binding/GPUTexture.cpp b/src/dawn/node/binding/GPUTexture.cpp index 26f354ad42..61ca716b35 100644 --- a/src/dawn/node/binding/GPUTexture.cpp +++ b/src/dawn/node/binding/GPUTexture.cpp @@ -54,11 +54,11 @@ void GPUTexture::destroy(Napi::Env) { texture_.Destroy(); } -std::variant GPUTexture::getLabel(Napi::Env) { +std::string GPUTexture::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUTexture::setLabel(Napi::Env, std::variant value) { +void GPUTexture::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUTexture.h b/src/dawn/node/binding/GPUTexture.h index 95d2a1da7e..edc96d103a 100644 --- a/src/dawn/node/binding/GPUTexture.h +++ b/src/dawn/node/binding/GPUTexture.h @@ -37,8 +37,8 @@ class GPUTexture final : public interop::GPUTexture { Napi::Env, interop::GPUTextureViewDescriptor descriptor) override; void destroy(Napi::Env) override; - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::Texture texture_; diff --git a/src/dawn/node/binding/GPUTextureView.cpp b/src/dawn/node/binding/GPUTextureView.cpp index df7514a83d..98ce3a046d 100644 --- a/src/dawn/node/binding/GPUTextureView.cpp +++ b/src/dawn/node/binding/GPUTextureView.cpp @@ -25,11 +25,11 @@ namespace wgpu::binding { //////////////////////////////////////////////////////////////////////////////// GPUTextureView::GPUTextureView(wgpu::TextureView view) : view_(std::move(view)) {} -std::variant GPUTextureView::getLabel(Napi::Env) { +std::string GPUTextureView::getLabel(Napi::Env) { UNIMPLEMENTED(); } -void GPUTextureView::setLabel(Napi::Env, std::variant value) { +void GPUTextureView::setLabel(Napi::Env, std::string value) { UNIMPLEMENTED(); } diff --git a/src/dawn/node/binding/GPUTextureView.h b/src/dawn/node/binding/GPUTextureView.h index 93917bcbef..494c307499 100644 --- a/src/dawn/node/binding/GPUTextureView.h +++ b/src/dawn/node/binding/GPUTextureView.h @@ -34,8 +34,8 @@ class GPUTextureView final : public interop::GPUTextureView { inline operator const wgpu::TextureView&() const { return view_; } // interop::GPUTextureView interface compliance - std::variant getLabel(Napi::Env) override; - void setLabel(Napi::Env, std::variant value) override; + std::string getLabel(Napi::Env) override; + void setLabel(Napi::Env, std::string value) override; private: wgpu::TextureView view_;