Title: [285792] trunk/Source/WebGPU
Revision
285792
Author
mmaxfi...@apple.com
Date
2021-11-14 11:38:16 -0800 (Sun, 14 Nov 2021)

Log Message

[WebGPU] Add necessary additions to WebGPU.framework
https://bugs.webkit.org/show_bug.cgi?id=233091

Reviewed by Dean Jackson.

WebGPU.framework's header file is lagging a bit behind the official WebGPU API.
This updates a companion header, WebGPUExt.h, with the necessary additions.
I don't want to modify the primary header, WebGPU.h, because it's shared among
multiple projects, so coordination is necessary to modify it.

* WebGPU/Adapter.h:
* WebGPU/Adapter.mm:
(WebGPU::Adapter::getFeatureAtIndex):
(wgpuAdapterGetFeatureAtIndex):
* WebGPU/BindGroup.h:
* WebGPU/BindGroup.mm:
(WebGPU::BindGroup::setLabel):
(wgpuBindGroupSetLabel):
* WebGPU/BindGroupLayout.h:
* WebGPU/BindGroupLayout.mm:
(WebGPU::BindGroupLayout::setLabel):
(wgpuBindGroupLayoutSetLabel):
* WebGPU/Buffer.h:
* WebGPU/Buffer.mm:
(WebGPU::Buffer::setLabel):
(wgpuBufferSetLabel):
* WebGPU/CommandBuffer.h:
* WebGPU/CommandBuffer.mm:
(WebGPU::CommandBuffer::setLabel):
(wgpuCommandBufferSetLabel):
* WebGPU/CommandEncoder.h:
* WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::fillBuffer):
(WebGPU::CommandEncoder::setLabel):
(wgpuCommandEncoderFillBuffer):
(wgpuCommandEncoderSetLabel):
* WebGPU/ComputePassEncoder.h:
* WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::setLabel):
(wgpuComputePassEncoderSetLabel):
* WebGPU/Device.h:
* WebGPU/Device.mm:
(WebGPU::Device::setLabel):
(wgpuDeviceSetLabel):
* WebGPU/Instance.mm:
(wgpuGetProcAddress):
* WebGPU/PipelineLayout.h:
* WebGPU/PipelineLayout.mm:
(WebGPU::PipelineLayout::setLabel):
(wgpuPipelineLayoutSetLabel):
* WebGPU/QuerySet.h:
* WebGPU/QuerySet.mm:
(WebGPU::QuerySet::setLabel):
(wgpuQuerySetSetLabel):
* WebGPU/Queue.h:
* WebGPU/Queue.mm:
(WebGPU::Queue::setLabel):
(wgpuQueueSetLabel):
* WebGPU/RenderBundle.h:
* WebGPU/RenderBundle.mm:
(WebGPU::RenderBundle::setLabel):
(wgpuRenderBundleSetLabel):
* WebGPU/RenderBundleEncoder.h:
* WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::setLabel):
(wgpuRenderBundleEncoderSetLabel):
* WebGPU/RenderPassEncoder.h:
* WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::setLabel):
(wgpuRenderPassEncoderSetLabel):
* WebGPU/Sampler.h:
* WebGPU/Sampler.mm:
(WebGPU::Sampler::setLabel):
(wgpuSamplerSetLabel):
* WebGPU/Texture.h:
* WebGPU/Texture.mm:
(WebGPU::Texture::setLabel):
(wgpuTextureSetLabel):
* WebGPU/TextureView.h:
* WebGPU/TextureView.mm:
(WebGPU::TextureView::setLabel):
(wgpuTextureViewSetLabel):
* WebGPU/WebGPUExt.h:

Modified Paths

Diff

Modified: trunk/Source/WebGPU/ChangeLog (285791 => 285792)


--- trunk/Source/WebGPU/ChangeLog	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/ChangeLog	2021-11-14 19:38:16 UTC (rev 285792)
@@ -1,3 +1,89 @@
+2021-11-14  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [WebGPU] Add necessary additions to WebGPU.framework
+        https://bugs.webkit.org/show_bug.cgi?id=233091
+
+        Reviewed by Dean Jackson.
+
+        WebGPU.framework's header file is lagging a bit behind the official WebGPU API.
+        This updates a companion header, WebGPUExt.h, with the necessary additions.
+        I don't want to modify the primary header, WebGPU.h, because it's shared among
+        multiple projects, so coordination is necessary to modify it.
+
+        * WebGPU/Adapter.h:
+        * WebGPU/Adapter.mm:
+        (WebGPU::Adapter::getFeatureAtIndex):
+        (wgpuAdapterGetFeatureAtIndex):
+        * WebGPU/BindGroup.h:
+        * WebGPU/BindGroup.mm:
+        (WebGPU::BindGroup::setLabel):
+        (wgpuBindGroupSetLabel):
+        * WebGPU/BindGroupLayout.h:
+        * WebGPU/BindGroupLayout.mm:
+        (WebGPU::BindGroupLayout::setLabel):
+        (wgpuBindGroupLayoutSetLabel):
+        * WebGPU/Buffer.h:
+        * WebGPU/Buffer.mm:
+        (WebGPU::Buffer::setLabel):
+        (wgpuBufferSetLabel):
+        * WebGPU/CommandBuffer.h:
+        * WebGPU/CommandBuffer.mm:
+        (WebGPU::CommandBuffer::setLabel):
+        (wgpuCommandBufferSetLabel):
+        * WebGPU/CommandEncoder.h:
+        * WebGPU/CommandEncoder.mm:
+        (WebGPU::CommandEncoder::fillBuffer):
+        (WebGPU::CommandEncoder::setLabel):
+        (wgpuCommandEncoderFillBuffer):
+        (wgpuCommandEncoderSetLabel):
+        * WebGPU/ComputePassEncoder.h:
+        * WebGPU/ComputePassEncoder.mm:
+        (WebGPU::ComputePassEncoder::setLabel):
+        (wgpuComputePassEncoderSetLabel):
+        * WebGPU/Device.h:
+        * WebGPU/Device.mm:
+        (WebGPU::Device::setLabel):
+        (wgpuDeviceSetLabel):
+        * WebGPU/Instance.mm:
+        (wgpuGetProcAddress):
+        * WebGPU/PipelineLayout.h:
+        * WebGPU/PipelineLayout.mm:
+        (WebGPU::PipelineLayout::setLabel):
+        (wgpuPipelineLayoutSetLabel):
+        * WebGPU/QuerySet.h:
+        * WebGPU/QuerySet.mm:
+        (WebGPU::QuerySet::setLabel):
+        (wgpuQuerySetSetLabel):
+        * WebGPU/Queue.h:
+        * WebGPU/Queue.mm:
+        (WebGPU::Queue::setLabel):
+        (wgpuQueueSetLabel):
+        * WebGPU/RenderBundle.h:
+        * WebGPU/RenderBundle.mm:
+        (WebGPU::RenderBundle::setLabel):
+        (wgpuRenderBundleSetLabel):
+        * WebGPU/RenderBundleEncoder.h:
+        * WebGPU/RenderBundleEncoder.mm:
+        (WebGPU::RenderBundleEncoder::setLabel):
+        (wgpuRenderBundleEncoderSetLabel):
+        * WebGPU/RenderPassEncoder.h:
+        * WebGPU/RenderPassEncoder.mm:
+        (WebGPU::RenderPassEncoder::setLabel):
+        (wgpuRenderPassEncoderSetLabel):
+        * WebGPU/Sampler.h:
+        * WebGPU/Sampler.mm:
+        (WebGPU::Sampler::setLabel):
+        (wgpuSamplerSetLabel):
+        * WebGPU/Texture.h:
+        * WebGPU/Texture.mm:
+        (WebGPU::Texture::setLabel):
+        (wgpuTextureSetLabel):
+        * WebGPU/TextureView.h:
+        * WebGPU/TextureView.mm:
+        (WebGPU::TextureView::setLabel):
+        (wgpuTextureViewSetLabel):
+        * WebGPU/WebGPUExt.h:
+
 2021-11-09  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [WebGPU] Stub out methods in WebGPU.framework

Modified: trunk/Source/WebGPU/WebGPU/Adapter.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Adapter.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Adapter.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -37,6 +37,7 @@
     bool getLimits(WGPUSupportedLimits*);
     void getProperties(WGPUAdapterProperties*);
     bool hasFeature(WGPUFeatureName);
+    WGPUFeatureName getFeatureAtIndex(size_t);
     void requestDevice(const WGPUDeviceDescriptor*, std::function<void(WGPURequestDeviceStatus, Device&&, const char*)>&& callback);
 };
 

Modified: trunk/Source/WebGPU/WebGPU/Adapter.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Adapter.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Adapter.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -49,6 +49,12 @@
     return false;
 }
 
+WGPUFeatureName Adapter::getFeatureAtIndex(size_t index)
+{
+    UNUSED_PARAM(index);
+    return WGPUFeatureName_Undefined;
+}
+
 void Adapter::requestDevice(const WGPUDeviceDescriptor* descriptor, std::function<void(WGPURequestDeviceStatus, Device&&, const char*)>&& callback)
 {
     UNUSED_PARAM(descriptor);
@@ -77,6 +83,11 @@
     return adapter->adapter.hasFeature(feature);
 }
 
+WGPUFeatureName wgpuAdapterGetFeatureAtIndex(WGPUAdapter adapter, size_t index)
+{
+    return adapter->adapter.getFeatureAtIndex(index);
+}
+
 void wgpuAdapterRequestDevice(WGPUAdapter adapter, const WGPUDeviceDescriptor* descriptor, WGPURequestDeviceCallback callback, void* userdata)
 {
     adapter->adapter.requestDevice(descriptor, [callback, userdata] (WGPURequestDeviceStatus status, WebGPU::Device&& device, const char* message) {

Modified: trunk/Source/WebGPU/WebGPU/BindGroup.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/BindGroup.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/BindGroup.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class BindGroup {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/BindGroup.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/BindGroup.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/BindGroup.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void BindGroup::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuBindGroupRelease(WGPUBindGroup bindGroup)
 {
     delete bindGroup;
 }
+
+void wgpuBindGroupSetLabel(WGPUBindGroup bindGroup, const char* label)
+{
+    bindGroup->bindGroup.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/BindGroupLayout.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/BindGroupLayout.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/BindGroupLayout.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class BindGroupLayout {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void BindGroupLayout::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuBindGroupLayoutRelease(WGPUBindGroupLayout bindGroupLayout)
 {
     delete bindGroupLayout;
 }
+
+void wgpuBindGroupLayoutSetLabel(WGPUBindGroupLayout bindGroupLayout, const char* label)
+{
+    bindGroupLayout->bindGroupLayout.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/Buffer.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Buffer.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Buffer.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -37,6 +37,7 @@
     void* getMappedRange(size_t offset, size_t);
     void mapAsync(WGPUMapModeFlags, size_t offset, size_t, std::function<void(WGPUBufferMapAsyncStatus)>&& callback);
     void unmap();
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/Buffer.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Buffer.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Buffer.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -60,6 +60,11 @@
 {
 }
 
+void Buffer::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuBufferRelease(WGPUBuffer buffer)
@@ -93,3 +98,8 @@
 {
     buffer->buffer.unmap();
 }
+
+void wgpuBufferSetLabel(WGPUBuffer buffer, const char* label)
+{
+    buffer->buffer.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/CommandBuffer.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/CommandBuffer.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/CommandBuffer.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class CommandBuffer {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/CommandBuffer.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/CommandBuffer.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/CommandBuffer.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void CommandBuffer::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuCommandBufferRelease(WGPUCommandBuffer commandBuffer)
 {
     delete commandBuffer;
 }
+
+void wgpuCommandBufferSetLabel(WGPUCommandBuffer commandBuffer, const char* label)
+{
+    commandBuffer->commandBuffer.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/CommandEncoder.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/CommandEncoder.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/CommandEncoder.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -43,6 +43,7 @@
     void copyBufferToTexture(const WGPUImageCopyBuffer* source, const WGPUImageCopyTexture* destination, const WGPUExtent3D* copySize);
     void copyTextureToBuffer(const WGPUImageCopyTexture* source, const WGPUImageCopyBuffer* destination, const WGPUExtent3D* copySize);
     void copyTextureToTexture(const WGPUImageCopyTexture* source, const WGPUImageCopyTexture* destination, const WGPUExtent3D* copySize);
+    void fillBuffer(const Buffer& destination, uint64_t destinationOffset, uint64_t size);
     CommandBuffer finish(const WGPUCommandBufferDescriptor*);
     void insertDebugMarker(const char* markerLabel);
     void popDebugGroup();
@@ -49,6 +50,7 @@
     void pushDebugGroup(const char* groupLabel);
     void resolveQuerySet(const QuerySet&, uint32_t firstQuery, uint32_t queryCount, const Buffer& destination, uint64_t destinationOffset);
     void writeTimestamp(const QuerySet&, uint32_t queryIndex);
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/CommandEncoder.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/CommandEncoder.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/CommandEncoder.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -77,6 +77,13 @@
     UNUSED_PARAM(copySize);
 }
 
+void CommandEncoder::fillBuffer(const Buffer& destination, uint64_t destinationOffset, uint64_t size)
+{
+    UNUSED_PARAM(destination);
+    UNUSED_PARAM(destinationOffset);
+    UNUSED_PARAM(size);
+}
+
 CommandBuffer CommandEncoder::finish(const WGPUCommandBufferDescriptor* descriptor)
 {
     UNUSED_PARAM(descriptor);
@@ -112,6 +119,11 @@
     UNUSED_PARAM(queryIndex);
 }
 
+void CommandEncoder::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuCommandEncoderRelease(WGPUCommandEncoder commandEncoder)
@@ -149,6 +161,11 @@
     commandEncoder->commandEncoder.copyTextureToTexture(source, destination, copySize);
 }
 
+void wgpuCommandEncoderFillBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size)
+{
+    commandEncoder->commandEncoder.fillBuffer(destination->buffer, destinationOffset, size);
+}
+
 WGPUCommandBuffer wgpuCommandEncoderFinish(WGPUCommandEncoder commandEncoder, const WGPUCommandBufferDescriptor* descriptor)
 {
     return new WGPUCommandBufferImpl { commandEncoder->commandEncoder.finish(descriptor) };
@@ -179,3 +196,8 @@
     commandEncoder->commandEncoder.writeTimestamp(querySet->querySet, queryIndex);
 }
 
+void wgpuCommandEncoderSetLabel(WGPUCommandEncoder commandEncoder, const char* label)
+{
+    commandEncoder->commandEncoder.setLabel(label);
+}
+

Modified: trunk/Source/WebGPU/WebGPU/ComputePassEncoder.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/ComputePassEncoder.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/ComputePassEncoder.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -47,6 +47,7 @@
     void setBindGroup(uint32_t groupIndex, const BindGroup&, uint32_t dynamicOffsetCount, const uint32_t* dynamicOffsets);
     void setPipeline(const ComputePipeline&);
     void writeTimestamp(const QuerySet&, uint32_t queryIndex);
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/ComputePassEncoder.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/ComputePassEncoder.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/ComputePassEncoder.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -94,6 +94,11 @@
     UNUSED_PARAM(queryIndex);
 }
 
+void ComputePassEncoder::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuComputePassEncoderRelease(WGPUComputePassEncoder computePassEncoder)
@@ -156,3 +161,7 @@
     computePassEncoder->computePassEncoder.writeTimestamp(querySet->querySet, queryIndex);
 }
 
+void wgpuComputePassEncoderSetLabel(WGPUComputePassEncoder computePassEncoder, const char* label)
+{
+    computePassEncoder->computePassEncoder.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/Device.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Device.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Device.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -70,6 +70,7 @@
     void pushErrorScope(WGPUErrorFilter);
     void setDeviceLostCallback(std::function<void(WGPUDeviceLostReason, const char*)>&&);
     void setUncapturedErrorCallback(std::function<void(WGPUErrorType, const char*)>&&);
+    void setLabel(const char*);
 };
 
 } // namespace WebGPU

Modified: trunk/Source/WebGPU/WebGPU/Device.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Device.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Device.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -173,6 +173,11 @@
     UNUSED_PARAM(callback);
 }
 
+void Device::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuDeviceRelease(WGPUDevice device)
@@ -302,3 +307,7 @@
     });
 }
 
+void wgpuDeviceSetLabel(WGPUDevice device, const char* label)
+{
+    device->device.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/Instance.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Instance.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Instance.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -67,10 +67,8 @@
 {
     UNUSED_PARAM(device);
     // FIXME: Use gperf to make this faster.
-    if (!strcmp(procName, "wgpuCreateInstance"))
-        return reinterpret_cast<WGPUProc>(&wgpuCreateInstance);
-    if (!strcmp(procName, "wgpuGetProcAddress"))
-        return reinterpret_cast<WGPUProc>(&wgpuGetProcAddress);
+    if (!strcmp(procName, "wgpuAdapterGetFeatureAtIndex"))
+        return reinterpret_cast<WGPUProc>(&wgpuAdapterGetFeatureAtIndex);
     if (!strcmp(procName, "wgpuAdapterGetLimits"))
         return reinterpret_cast<WGPUProc>(&wgpuAdapterGetLimits);
     if (!strcmp(procName, "wgpuAdapterGetProperties"))
@@ -77,8 +75,18 @@
         return reinterpret_cast<WGPUProc>(&wgpuAdapterGetProperties);
     if (!strcmp(procName, "wgpuAdapterHasFeature"))
         return reinterpret_cast<WGPUProc>(&wgpuAdapterHasFeature);
+    if (!strcmp(procName, "wgpuAdapterRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuAdapterRelease);
     if (!strcmp(procName, "wgpuAdapterRequestDevice"))
         return reinterpret_cast<WGPUProc>(&wgpuAdapterRequestDevice);
+    if (!strcmp(procName, "wgpuBindGroupLayoutRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuBindGroupLayoutRelease);
+    if (!strcmp(procName, "wgpuBindGroupLayoutSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuBindGroupLayoutSetLabel);
+    if (!strcmp(procName, "wgpuBindGroupRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuBindGroupRelease);
+    if (!strcmp(procName, "wgpuBindGroupSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuBindGroupSetLabel);
     if (!strcmp(procName, "wgpuBufferDestroy"))
         return reinterpret_cast<WGPUProc>(&wgpuBufferDestroy);
     if (!strcmp(procName, "wgpuBufferGetConstMappedRange"))
@@ -87,8 +95,16 @@
         return reinterpret_cast<WGPUProc>(&wgpuBufferGetMappedRange);
     if (!strcmp(procName, "wgpuBufferMapAsync"))
         return reinterpret_cast<WGPUProc>(&wgpuBufferMapAsync);
+    if (!strcmp(procName, "wgpuBufferRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuBufferRelease);
+    if (!strcmp(procName, "wgpuBufferSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuBufferSetLabel);
     if (!strcmp(procName, "wgpuBufferUnmap"))
         return reinterpret_cast<WGPUProc>(&wgpuBufferUnmap);
+    if (!strcmp(procName, "wgpuCommandBufferRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuCommandBufferRelease);
+    if (!strcmp(procName, "wgpuCommandBufferSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuCommandBufferSetLabel);
     if (!strcmp(procName, "wgpuCommandEncoderBeginComputePass"))
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderBeginComputePass);
     if (!strcmp(procName, "wgpuCommandEncoderBeginRenderPass"))
@@ -101,6 +117,8 @@
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderCopyTextureToBuffer);
     if (!strcmp(procName, "wgpuCommandEncoderCopyTextureToTexture"))
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderCopyTextureToTexture);
+    if (!strcmp(procName, "wgpuCommandEncoderFillBuffer"))
+        return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderFillBuffer);
     if (!strcmp(procName, "wgpuCommandEncoderFinish"))
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderFinish);
     if (!strcmp(procName, "wgpuCommandEncoderInsertDebugMarker"))
@@ -109,8 +127,12 @@
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderPopDebugGroup);
     if (!strcmp(procName, "wgpuCommandEncoderPushDebugGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderPushDebugGroup);
+    if (!strcmp(procName, "wgpuCommandEncoderRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderRelease);
     if (!strcmp(procName, "wgpuCommandEncoderResolveQuerySet"))
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderResolveQuerySet);
+    if (!strcmp(procName, "wgpuCommandEncoderSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderSetLabel);
     if (!strcmp(procName, "wgpuCommandEncoderWriteTimestamp"))
         return reinterpret_cast<WGPUProc>(&wgpuCommandEncoderWriteTimestamp);
     if (!strcmp(procName, "wgpuComputePassEncoderBeginPipelineStatisticsQuery"))
@@ -129,8 +151,12 @@
         return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderPopDebugGroup);
     if (!strcmp(procName, "wgpuComputePassEncoderPushDebugGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderPushDebugGroup);
+    if (!strcmp(procName, "wgpuComputePassEncoderRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderRelease);
     if (!strcmp(procName, "wgpuComputePassEncoderSetBindGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderSetBindGroup);
+    if (!strcmp(procName, "wgpuComputePassEncoderSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderSetLabel);
     if (!strcmp(procName, "wgpuComputePassEncoderSetPipeline"))
         return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderSetPipeline);
     if (!strcmp(procName, "wgpuComputePassEncoderWriteTimestamp"))
@@ -137,8 +163,12 @@
         return reinterpret_cast<WGPUProc>(&wgpuComputePassEncoderWriteTimestamp);
     if (!strcmp(procName, "wgpuComputePipelineGetBindGroupLayout"))
         return reinterpret_cast<WGPUProc>(&wgpuComputePipelineGetBindGroupLayout);
+    if (!strcmp(procName, "wgpuComputePipelineRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuComputePipelineRelease);
     if (!strcmp(procName, "wgpuComputePipelineSetLabel"))
         return reinterpret_cast<WGPUProc>(&wgpuComputePipelineSetLabel);
+    if (!strcmp(procName, "wgpuCreateInstance"))
+        return reinterpret_cast<WGPUProc>(&wgpuCreateInstance);
     if (!strcmp(procName, "wgpuDeviceCreateBindGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuDeviceCreateBindGroup);
     if (!strcmp(procName, "wgpuDeviceCreateBindGroupLayout"))
@@ -179,20 +209,40 @@
         return reinterpret_cast<WGPUProc>(&wgpuDevicePopErrorScope);
     if (!strcmp(procName, "wgpuDevicePushErrorScope"))
         return reinterpret_cast<WGPUProc>(&wgpuDevicePushErrorScope);
+    if (!strcmp(procName, "wgpuDeviceRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuDeviceRelease);
     if (!strcmp(procName, "wgpuDeviceSetDeviceLostCallback"))
         return reinterpret_cast<WGPUProc>(&wgpuDeviceSetDeviceLostCallback);
+    if (!strcmp(procName, "wgpuDeviceSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuDeviceSetLabel);
     if (!strcmp(procName, "wgpuDeviceSetUncapturedErrorCallback"))
         return reinterpret_cast<WGPUProc>(&wgpuDeviceSetUncapturedErrorCallback);
+    if (!strcmp(procName, "wgpuGetProcAddress"))
+        return reinterpret_cast<WGPUProc>(&wgpuGetProcAddress);
     if (!strcmp(procName, "wgpuInstanceCreateSurface"))
         return reinterpret_cast<WGPUProc>(&wgpuInstanceCreateSurface);
     if (!strcmp(procName, "wgpuInstanceProcessEvents"))
         return reinterpret_cast<WGPUProc>(&wgpuInstanceProcessEvents);
+    if (!strcmp(procName, "wgpuInstanceRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuInstanceRelease);
     if (!strcmp(procName, "wgpuInstanceRequestAdapter"))
         return reinterpret_cast<WGPUProc>(&wgpuInstanceRequestAdapter);
+    if (!strcmp(procName, "wgpuPipelineLayoutRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuPipelineLayoutRelease);
+    if (!strcmp(procName, "wgpuPipelineLayoutSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuPipelineLayoutSetLabel);
     if (!strcmp(procName, "wgpuQuerySetDestroy"))
         return reinterpret_cast<WGPUProc>(&wgpuQuerySetDestroy);
+    if (!strcmp(procName, "wgpuQuerySetRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuQuerySetRelease);
+    if (!strcmp(procName, "wgpuQuerySetSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuQuerySetSetLabel);
     if (!strcmp(procName, "wgpuQueueOnSubmittedWorkDone"))
         return reinterpret_cast<WGPUProc>(&wgpuQueueOnSubmittedWorkDone);
+    if (!strcmp(procName, "wgpuQueueRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuQueueRelease);
+    if (!strcmp(procName, "wgpuQueueSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuQueueSetLabel);
     if (!strcmp(procName, "wgpuQueueSubmit"))
         return reinterpret_cast<WGPUProc>(&wgpuQueueSubmit);
     if (!strcmp(procName, "wgpuQueueWriteBuffer"))
@@ -215,14 +265,22 @@
         return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderPopDebugGroup);
     if (!strcmp(procName, "wgpuRenderBundleEncoderPushDebugGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderPushDebugGroup);
+    if (!strcmp(procName, "wgpuRenderBundleEncoderRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderRelease);
     if (!strcmp(procName, "wgpuRenderBundleEncoderSetBindGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderSetBindGroup);
     if (!strcmp(procName, "wgpuRenderBundleEncoderSetIndexBuffer"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderSetIndexBuffer);
+    if (!strcmp(procName, "wgpuRenderBundleEncoderSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderSetLabel);
     if (!strcmp(procName, "wgpuRenderBundleEncoderSetPipeline"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderSetPipeline);
     if (!strcmp(procName, "wgpuRenderBundleEncoderSetVertexBuffer"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderBundleEncoderSetVertexBuffer);
+    if (!strcmp(procName, "wgpuRenderBundleRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderBundleRelease);
+    if (!strcmp(procName, "wgpuRenderBundleSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderBundleSetLabel);
     if (!strcmp(procName, "wgpuRenderPassEncoderBeginOcclusionQuery"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderBeginOcclusionQuery);
     if (!strcmp(procName, "wgpuRenderPassEncoderBeginPipelineStatisticsQuery"))
@@ -249,6 +307,8 @@
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderPopDebugGroup);
     if (!strcmp(procName, "wgpuRenderPassEncoderPushDebugGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderPushDebugGroup);
+    if (!strcmp(procName, "wgpuRenderPassEncoderRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderRelease);
     if (!strcmp(procName, "wgpuRenderPassEncoderSetBindGroup"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderSetBindGroup);
     if (!strcmp(procName, "wgpuRenderPassEncoderSetBlendConstant"))
@@ -255,6 +315,8 @@
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderSetBlendConstant);
     if (!strcmp(procName, "wgpuRenderPassEncoderSetIndexBuffer"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderSetIndexBuffer);
+    if (!strcmp(procName, "wgpuRenderPassEncoderSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderSetLabel);
     if (!strcmp(procName, "wgpuRenderPassEncoderSetPipeline"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderSetPipeline);
     if (!strcmp(procName, "wgpuRenderPassEncoderSetScissorRect"))
@@ -269,20 +331,40 @@
         return reinterpret_cast<WGPUProc>(&wgpuRenderPassEncoderWriteTimestamp);
     if (!strcmp(procName, "wgpuRenderPipelineGetBindGroupLayout"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPipelineGetBindGroupLayout);
+    if (!strcmp(procName, "wgpuRenderPipelineRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuRenderPipelineRelease);
     if (!strcmp(procName, "wgpuRenderPipelineSetLabel"))
         return reinterpret_cast<WGPUProc>(&wgpuRenderPipelineSetLabel);
+    if (!strcmp(procName, "wgpuSamplerRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuSamplerRelease);
+    if (!strcmp(procName, "wgpuSamplerSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuSamplerSetLabel);
+    if (!strcmp(procName, "wgpuShaderModuleRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuShaderModuleRelease);
     if (!strcmp(procName, "wgpuShaderModuleSetLabel"))
         return reinterpret_cast<WGPUProc>(&wgpuShaderModuleSetLabel);
     if (!strcmp(procName, "wgpuSurfaceGetPreferredFormat"))
         return reinterpret_cast<WGPUProc>(&wgpuSurfaceGetPreferredFormat);
+    if (!strcmp(procName, "wgpuSurfaceRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuSurfaceRelease);
     if (!strcmp(procName, "wgpuSwapChainGetCurrentTextureView"))
         return reinterpret_cast<WGPUProc>(&wgpuSwapChainGetCurrentTextureView);
     if (!strcmp(procName, "wgpuSwapChainPresent"))
         return reinterpret_cast<WGPUProc>(&wgpuSwapChainPresent);
+    if (!strcmp(procName, "wgpuSwapChainRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuSwapChainRelease);
     if (!strcmp(procName, "wgpuTextureCreateView"))
         return reinterpret_cast<WGPUProc>(&wgpuTextureCreateView);
     if (!strcmp(procName, "wgpuTextureDestroy"))
         return reinterpret_cast<WGPUProc>(&wgpuTextureDestroy);
+    if (!strcmp(procName, "wgpuTextureRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuTextureRelease);
+    if (!strcmp(procName, "wgpuTextureSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuTextureSetLabel);
+    if (!strcmp(procName, "wgpuTextureViewRelease"))
+        return reinterpret_cast<WGPUProc>(&wgpuTextureViewRelease);
+    if (!strcmp(procName, "wgpuTextureViewSetLabel"))
+        return reinterpret_cast<WGPUProc>(&wgpuTextureViewSetLabel);
     return nullptr;
 }
 

Modified: trunk/Source/WebGPU/WebGPU/PipelineLayout.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/PipelineLayout.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/PipelineLayout.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class PipelineLayout {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/PipelineLayout.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/PipelineLayout.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/PipelineLayout.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void PipelineLayout::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuPipelineLayoutRelease(WGPUPipelineLayout pipelineLayout)
 {
     delete pipelineLayout;
 }
+
+void wgpuPipelineLayoutSetLabel(WGPUPipelineLayout pipelineLayout, const char* label)
+{
+    pipelineLayout->pipelineLayout.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/QuerySet.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/QuerySet.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/QuerySet.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -32,6 +32,7 @@
 class QuerySet {
 public:
     void destroy();
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/QuerySet.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/QuerySet.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/QuerySet.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -34,6 +34,11 @@
 {
 }
 
+void QuerySet::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuQuerySetRelease(WGPUQuerySet querySet)
@@ -46,3 +51,7 @@
     querySet->querySet.destroy();
 }
 
+void wgpuQuerySetSetLabel(WGPUQuerySet querySet, const char* label)
+{
+    querySet->querySet.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/Queue.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Queue.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Queue.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -40,6 +40,7 @@
     void submit(Vector<std::reference_wrapper<const CommandBuffer>>&& commands);
     void writeBuffer(const Buffer&, uint64_t bufferOffset, const void* data, size_t);
     void writeTexture(const WGPUImageCopyTexture* destination, const void* data, size_t dataSize, const WGPUTextureDataLayout*, const WGPUExtent3D* writeSize);
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/Queue.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Queue.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Queue.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -60,6 +60,11 @@
     UNUSED_PARAM(writeSize);
 }
 
+void Queue::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuQueueRelease(WGPUQueue queue)
@@ -92,3 +97,8 @@
     queue->queue.writeTexture(destination, data, dataSize, dataLayout, writeSize);
 }
 
+void wgpuQueueSetLabel(WGPUQueue queue, const char* label)
+{
+    queue->queue.setLabel(label);
+}
+

Modified: trunk/Source/WebGPU/WebGPU/RenderBundle.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/RenderBundle.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/RenderBundle.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class RenderBundle {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/RenderBundle.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/RenderBundle.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/RenderBundle.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void RenderBundle::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuRenderBundleRelease(WGPURenderBundle renderBundle)
 {
     delete renderBundle;
 }
+
+void wgpuRenderBundleSetLabel(WGPURenderBundle renderBundle, const char* label)
+{
+    renderBundle->renderBundle.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -48,6 +48,7 @@
     void setIndexBuffer(const Buffer&, WGPUIndexFormat, uint64_t offset, uint64_t size);
     void setPipeline(const RenderPipeline&);
     void setVertexBuffer(uint32_t slot, const Buffer&, uint64_t offset, uint64_t size);
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -112,6 +112,11 @@
     UNUSED_PARAM(size);
 }
 
+void RenderBundleEncoder::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuRenderBundleEncoderRelease(WGPURenderBundleEncoder renderBundleEncoder)
@@ -179,3 +184,7 @@
     renderBundleEncoder->renderBundleEncoder.setVertexBuffer(slot, buffer->buffer, offset, size);
 }
 
+void wgpuRenderBundleEncoderSetLabel(WGPURenderBundleEncoder renderBundleEncoder, const char* label)
+{
+    renderBundleEncoder->renderBundleEncoder.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/RenderPassEncoder.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/RenderPassEncoder.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/RenderPassEncoder.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -61,6 +61,7 @@
     void setVertexBuffer(uint32_t slot, const Buffer&, uint64_t offset, uint64_t size);
     void setViewport(float x, float y, float width, float height, float minDepth, float maxDepth);
     void writeTimestamp(const QuerySet&, uint32_t queryIndex);
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/RenderPassEncoder.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/RenderPassEncoder.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/RenderPassEncoder.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -173,6 +173,11 @@
     UNUSED_PARAM(queryIndex);
 }
 
+void RenderPassEncoder::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuRenderPassEncoderRelease(WGPURenderPassEncoder renderPassEncoder)
@@ -293,3 +298,7 @@
     renderPassEncoder->renderPassEncoder.writeTimestamp(querySet->querySet, queryIndex);
 }
 
+void wgpuRenderPassEncoderSetLabel(WGPURenderPassEncoder renderPassEncoder, const char* label)
+{
+    renderPassEncoder->renderPassEncoder.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/Sampler.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Sampler.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Sampler.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class Sampler {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/Sampler.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Sampler.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Sampler.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void Sampler::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuSamplerRelease(WGPUSampler sampler)
 {
     delete sampler;
 }
+
+void wgpuSamplerSetLabel(WGPUSampler sampler, const char* label)
+{
+    sampler->sampler.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/Texture.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Texture.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Texture.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -35,6 +35,7 @@
 public:
     TextureView createView(const WGPUTextureViewDescriptor*);
     void destroy();
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/Texture.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/Texture.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/Texture.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -41,6 +41,11 @@
 {
 }
 
+void Texture::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
+}
+
 } // namespace WebGPU
 
 void wgpuTextureRelease(WGPUTexture texture)
@@ -58,3 +63,7 @@
     texture->texture.destroy();
 }
 
+void wgpuTextureSetLabel(WGPUTexture texture, const char* label)
+{
+    texture->texture.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/TextureView.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/TextureView.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/TextureView.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,7 +30,8 @@
 namespace WebGPU {
 
 class TextureView {
-
+public:
+    void setLabel(const char*);
 };
 
 }

Modified: trunk/Source/WebGPU/WebGPU/TextureView.mm (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/TextureView.mm	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/TextureView.mm	2021-11-14 19:38:16 UTC (rev 285792)
@@ -30,9 +30,19 @@
 
 namespace WebGPU {
 
+void TextureView::setLabel(const char* label)
+{
+    UNUSED_PARAM(label);
 }
 
+}
+
 void wgpuTextureViewRelease(WGPUTextureView textureView)
 {
     UNUSED_PARAM(textureView);
 }
+
+void wgpuTextureViewSetLabel(WGPUTextureView textureView, const char* label)
+{
+    textureView->textureView.setLabel(label);
+}

Modified: trunk/Source/WebGPU/WebGPU/WebGPUExt.h (285791 => 285792)


--- trunk/Source/WebGPU/WebGPU/WebGPUExt.h	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/WebGPU/WebGPUExt.h	2021-11-14 19:38:16 UTC (rev 285792)
@@ -26,13 +26,129 @@
 #ifndef WEBGPUEXT_H_
 #define WEBGPUEXT_H_
 
+typedef enum WGPUSTypeExtended {
+    WGPUSType_DeviceDescriptorLabel = 0x242A99E0, // Random
+} WGPUSTypeExtended;
+
+typedef enum WGPUTextureFormatExtended {
+    WGPUTextureFormat_ETC2RGB8Unorm = 0x28C25C67, // Random
+    WGPUTextureFormat_ETC2RGB8unormSrgb = 0x566AAFEE, // Random
+    WGPUTextureFormat_ETC2RGB8a1Unorm = 0x2F794348, // Random
+    WGPUTextureFormat_ETC2RGB8a1unormSrgb = 0x5EF38ABA, // Random
+    WGPUTextureFormat_ETC2RGBA8Unorm = 0x5A4E6480, // Random
+    WGPUTextureFormat_ETC2RGBA8UnormSrgb = 0x780968EB, // Random
+    WGPUTextureFormat_EACR11Unorm = 0x69863090, // Random
+    WGPUTextureFormat_EACR11Snorm = 0x25E5428A, // Random
+    WGPUTextureFormat_EACRG11Unorm = 0x1B0969B3, // Random
+    WGPUTextureFormat_EACRG11Snorm = 0x16F4BB6D, // Random
+
+    WGPUTextureFormat_ASTC4x4Unorm = 0x39F60F6E, // Random
+    WGPUTextureFormat_ASTC4x4UnormSrgb = 0x24472700, // Random
+    WGPUTextureFormat_ASTC5x4Unorm = 0x67D32B0E, // Random
+    WGPUTextureFormat_ASTC5x4UnormSrgb = 0x313DA1BE, // Random
+    WGPUTextureFormat_ASTC5x5Unorm = 0x15AB8DFD, // Random
+    WGPUTextureFormat_ASTC5x5UnormSrgb = 0x7B00EB57, // Random
+    WGPUTextureFormat_ASTC6x5Unorm = 0x653E80C3, // Random
+    WGPUTextureFormat_ASTC6x5UnormSrgb = 0x50AE869A, // Random
+    WGPUTextureFormat_ASTC6x6Unorm = 0x579AF598, // Random
+    WGPUTextureFormat_ASTC6x6UnormSrgb = 0x73B69732, // Random
+    WGPUTextureFormat_ASTC8x5Unorm = 0x06F70308, // Random
+    WGPUTextureFormat_ASTC8x5UnormSrgb = 0x420EA946, // Random
+    WGPUTextureFormat_ASTC8x6Unorm = 0x61086AC8, // Random
+    WGPUTextureFormat_ASTC8x6UnormSrgb = 0x0E17D39A, // Random
+    WGPUTextureFormat_ASTC8x8Unorm = 0x569BF2E8, // Random
+    WGPUTextureFormat_ASTC8x8UnormSrgb = 0x572A4849, // Random
+    WGPUTextureFormat_ASTC10x5Unorm = 0x63ABE432, // Random
+    WGPUTextureFormat_ASTC10x5UnormSrgb = 0x3BC3AA4C, // Random
+    WGPUTextureFormat_ASTC10x6Unorm = 0x6FE19499, // Random
+    WGPUTextureFormat_ASTC10x6UnormSrgb = 0x7FF0B5C0, // Random
+    WGPUTextureFormat_ASTC10x8Unorm = 0x2015F4C3, // Random
+    WGPUTextureFormat_ASTC10x8UnormSrgb = 0x7D51DC6F, // Random
+    WGPUTextureFormat_ASTC10x10Unorm = 0x67F10173, // Random
+    WGPUTextureFormat_ASTC10x10UnormSrgb = 0x35D74D21, // Random
+    WGPUTextureFormat_ASTC12x10Unorm = 0x09DAD0A7, // Random
+    WGPUTextureFormat_ASTC12x10UnormSrgb = 0x3560C93A, // Random
+    WGPUTextureFormat_ASTC12x12Unorm = 0x26CC3050, // Random
+    WGPUTextureFormat_ASTC12x12UnormSrgb = 0x3EF578A0, // Random
+
+    WGPUTextureFormat_Depth32FloatStencil8 = 0x53DC2307, // Random
+} WGPUTextureFormatExtended;
+
+typedef enum WGPUFeatureNameExtended {
+    WGPUFeatureName_DepthClipControl = 0x55ABC13D, // Random
+    WGPUFeatureName_IndirectFirstInstance = 0x2A7084F5, // Random
+    WGPUFeatureName_TextureCompressionETC2 = 0x7BF66F69, // Random
+    WGPUFeatureName_TextureCompressionASTC = 0x26173399, // Random
+} WGPUFeatureNameExtended;
+
+typedef enum WGPUPowerPreferenceExtended {
+    WGPUPowerPreference_NoPreference = 0x4748336F,
+} WGPUPowerPreferenceExtended;
+
+typedef struct WGPUDeviceDescriptorLabel {
+    WGPUChainedStruct header;
+    WGPUChainedStruct const * nextInChain;
+    char const * label;
+} WGPUDeviceDescriptorLabel;
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#if !defined(WGPU_SKIP_PROCS)
+
+typedef void (*WGPUProcAdapterRelease)(WGPUAdapter adapter);
+typedef void (*WGPUProcBindGroupLayoutRelease)(WGPUBindGroupLayout bindGroupLayout);
+typedef void (*WGPUProcBindGroupRelease)(WGPUBindGroup bindGroup);
+typedef void (*WGPUProcBufferRelease)(WGPUBuffer buffer);
+typedef void (*WGPUProcCommandBufferRelease)(WGPUCommandBuffer commandBuffer);
+typedef void (*WGPUProcCommandEncoderRelease)(WGPUCommandEncoder commandEncoder);
+typedef void (*WGPUProcComputePassEncoderRelease)(WGPUComputePassEncoder computePassEncoder);
+typedef void (*WGPUProcComputePipelineRelease)(WGPUComputePipeline computePipeline);
+typedef void (*WGPUProcDeviceRelease)(WGPUDevice device);
+typedef void (*WGPUProcInstanceRelease)(WGPUInstance instance);
+typedef void (*WGPUProcPipelineLayoutRelease)(WGPUPipelineLayout pipelineLayout);
+typedef void (*WGPUProcQuerySetRelease)(WGPUQuerySet querySet);
+typedef void (*WGPUProcQueueRelease)(WGPUQueue queue);
+typedef void (*WGPUProcRenderBundleEncoderRelease)(WGPURenderBundleEncoder renderBundleEncoder);
+typedef void (*WGPUProcRenderBundleRelease)(WGPURenderBundle renderBundle);
+typedef void (*WGPUProcRenderPassEncoderRelease)(WGPURenderPassEncoder renderPassEncoder);
+typedef void (*WGPUProcRenderPipelineRelease)(WGPURenderPipeline renderPipeline);
+typedef void (*WGPUProcSamplerRelease)(WGPUSampler sampler);
+typedef void (*WGPUProcShaderModuleRelease)(WGPUShaderModule shaderModule);
+typedef void (*WGPUProcSurfaceRelease)(WGPUSurface surface);
+typedef void (*WGPUProcSwapChainRelease)(WGPUSwapChain swapChain);
+typedef void (*WGPUProcTextureRelease)(WGPUTexture texture);
+typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView);
+
+typedef void (*WGPUProcBindGroupLayoutSetLabel)(WGPUBindGroupLayout bindGroupLayout, char const * label);
+typedef void (*WGPUProcBindGroupSetLabel)(WGPUBindGroup bindGroup, char const * label);
+typedef void (*WGPUProcBufferSetLabel)(WGPUBuffer buffer, char const * label);
+typedef void (*WGPUProcCommandBufferSetLabel)(WGPUCommandBuffer commandBuffer, char const * label);
+typedef void (*WGPUProcCommandEncoderSetLabel)(WGPUCommandEncoder commandEncoder, char const * label);
+typedef void (*WGPUProcComputePassEncoderSetLabel)(WGPUComputePassEncoder computePassEncoder, char const * label);
+typedef void (*WGPUProcDeviceSetLabel)(WGPUDevice queue, char const * label);
+typedef void (*WGPUProcPipelineLayoutSetLabel)(WGPUPipelineLayout pipelineLayout, char const * label);
+typedef void (*WGPUProcQuerySetSetLabel)(WGPUQuerySet querySet, char const * label);
+typedef void (*WGPUProcQueueSetLabel)(WGPUQueue queue, char const * label);
+typedef void (*WGPUProcRenderBundleEncoderSetLabel)(WGPURenderBundleEncoder renderBundleEncoder, char const * label);
+typedef void (*WGPUProcRenderBundleSetLabel)(WGPURenderBundle renderBundle, char const * label);
+typedef void (*WGPUProcRenderPassEncoderSetLabel)(WGPURenderPassEncoder renderBundleEncoder, char const * label);
+typedef void (*WGPUProcSamplerSetLabel)(WGPUSampler sampler, char const * label);
+typedef void (*WGPUProcTextureSetLabel)(WGPUTexture sampler, char const * label);
+typedef void (*WGPUProcTextureViewSetLabel)(WGPUTextureView sampler, char const * label);
+
+typedef WGPUFeatureName (*WGPUProcAdapterGetFeatureAtIndex)(WGPUAdapter adapter, size_t index);
+
+typedef void (*WGPUProcCommandEncoderFillBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size);
+
+#endif  // !defined(WGPU_SKIP_PROCS)
+
+#if !defined(WGPU_SKIP_DECLARATIONS)
+
 WGPU_EXPORT void wgpuAdapterRelease(WGPUAdapter adapter);
+WGPU_EXPORT void wgpuBindGroupLayoutRelease(WGPUBindGroupLayout bindGroupLayout);
 WGPU_EXPORT void wgpuBindGroupRelease(WGPUBindGroup bindGroup);
-WGPU_EXPORT void wgpuBindGroupLayoutRelease(WGPUBindGroupLayout bindGroupLayout);
 WGPU_EXPORT void wgpuBufferRelease(WGPUBuffer buffer);
 WGPU_EXPORT void wgpuCommandBufferRelease(WGPUCommandBuffer commandBuffer);
 WGPU_EXPORT void wgpuCommandEncoderRelease(WGPUCommandEncoder commandEncoder);
@@ -43,8 +159,8 @@
 WGPU_EXPORT void wgpuPipelineLayoutRelease(WGPUPipelineLayout pipelineLayout);
 WGPU_EXPORT void wgpuQuerySetRelease(WGPUQuerySet querySet);
 WGPU_EXPORT void wgpuQueueRelease(WGPUQueue queue);
+WGPU_EXPORT void wgpuRenderBundleEncoderRelease(WGPURenderBundleEncoder renderBundleEncoder);
 WGPU_EXPORT void wgpuRenderBundleRelease(WGPURenderBundle renderBundle);
-WGPU_EXPORT void wgpuRenderBundleEncoderRelease(WGPURenderBundleEncoder renderBundleEncoder);
 WGPU_EXPORT void wgpuRenderPassEncoderRelease(WGPURenderPassEncoder renderPassEncoder);
 WGPU_EXPORT void wgpuRenderPipelineRelease(WGPURenderPipeline renderPipeline);
 WGPU_EXPORT void wgpuSamplerRelease(WGPUSampler sampler);
@@ -54,8 +170,31 @@
 WGPU_EXPORT void wgpuTextureRelease(WGPUTexture texture);
 WGPU_EXPORT void wgpuTextureViewRelease(WGPUTextureView textureView);
 
+WGPU_EXPORT void wgpuBindGroupLayoutSetLabel(WGPUBindGroupLayout bindGroupLayout, char const * label);
+WGPU_EXPORT void wgpuBindGroupSetLabel(WGPUBindGroup bindGroup, char const * label);
+WGPU_EXPORT void wgpuBufferSetLabel(WGPUBuffer buffer, char const * label);
+WGPU_EXPORT void wgpuCommandBufferSetLabel(WGPUCommandBuffer commandBuffer, char const * label);
+WGPU_EXPORT void wgpuCommandEncoderSetLabel(WGPUCommandEncoder commandEncoder, char const * label);
+WGPU_EXPORT void wgpuComputePassEncoderSetLabel(WGPUComputePassEncoder computePassEncoder, char const * label);
+WGPU_EXPORT void wgpuDeviceSetLabel(WGPUDevice queue, char const * label);
+WGPU_EXPORT void wgpuPipelineLayoutSetLabel(WGPUPipelineLayout pipelineLayout, char const * label);
+WGPU_EXPORT void wgpuQuerySetSetLabel(WGPUQuerySet querySet, char const * label);
+WGPU_EXPORT void wgpuQueueSetLabel(WGPUQueue queue, char const * label);
+WGPU_EXPORT void wgpuRenderBundleEncoderSetLabel(WGPURenderBundleEncoder renderBundleEncoder, char const * label);
+WGPU_EXPORT void wgpuRenderBundleSetLabel(WGPURenderBundle renderBundle, char const * label);
+WGPU_EXPORT void wgpuRenderPassEncoderSetLabel(WGPURenderPassEncoder renderBundleEncoder, char const * label);
+WGPU_EXPORT void wgpuSamplerSetLabel(WGPUSampler sampler, char const * label);
+WGPU_EXPORT void wgpuTextureSetLabel(WGPUTexture sampler, char const * label);
+WGPU_EXPORT void wgpuTextureViewSetLabel(WGPUTextureView sampler, char const * label);
+
+WGPU_EXPORT WGPUFeatureName wgpuAdapterGetFeatureAtIndex(WGPUAdapter adapter, size_t index);
+
+WGPU_EXPORT void wgpuCommandEncoderFillBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size);
+
+#endif  // !defined(WGPU_SKIP_DECLARATIONS)
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
 
-#endif
+#endif // WEBGPUEXT_H_
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to