Title: [292673] trunk/Source/WebGPU
Revision
292673
Author
[email protected]
Date
2022-04-08 19:56:18 -0700 (Fri, 08 Apr 2022)

Log Message

[WebGPU] Make callbacks in unimplemented functions execute
https://bugs.webkit.org/show_bug.cgi?id=238727

Reviewed by Dean Jackson.

CompletionHandler ASSERT()s that it has been executed in its destructor. We have some
functions which we haven't implemented yet which take CompletionHandlers, so let's
temporarily just call the completion handlers just to make tests stop ASSERT()ing.

* WebGPU/ComputePipeline.mm:
(WebGPU::Device::createComputePipelineAsync):
* WebGPU/RenderPipeline.mm:
(WebGPU::Device::createRenderPipelineAsync):

Modified Paths

Diff

Modified: trunk/Source/WebGPU/ChangeLog (292672 => 292673)


--- trunk/Source/WebGPU/ChangeLog	2022-04-09 02:28:13 UTC (rev 292672)
+++ trunk/Source/WebGPU/ChangeLog	2022-04-09 02:56:18 UTC (rev 292673)
@@ -1,5 +1,21 @@
 2022-04-08  Myles C. Maxfield  <[email protected]>
 
+        [WebGPU] Make callbacks in unimplemented functions execute
+        https://bugs.webkit.org/show_bug.cgi?id=238727
+
+        Reviewed by Dean Jackson.
+
+        CompletionHandler ASSERT()s that it has been executed in its destructor. We have some
+        functions which we haven't implemented yet which take CompletionHandlers, so let's
+        temporarily just call the completion handlers just to make tests stop ASSERT()ing.
+
+        * WebGPU/ComputePipeline.mm:
+        (WebGPU::Device::createComputePipelineAsync):
+        * WebGPU/RenderPipeline.mm:
+        (WebGPU::Device::createRenderPipelineAsync):
+
+2022-04-08  Myles C. Maxfield  <[email protected]>
+
         [WebGPU] Implement the concept of device lost
         https://bugs.webkit.org/show_bug.cgi?id=238725
 

Modified: trunk/Source/WebGPU/WebGPU/ComputePipeline.mm (292672 => 292673)


--- trunk/Source/WebGPU/WebGPU/ComputePipeline.mm	2022-04-09 02:28:13 UTC (rev 292672)
+++ trunk/Source/WebGPU/WebGPU/ComputePipeline.mm	2022-04-09 02:56:18 UTC (rev 292673)
@@ -172,7 +172,7 @@
 {
     // FIXME: Implement this
     UNUSED_PARAM(descriptor);
-    UNUSED_PARAM(callback);
+    callback(WGPUCreatePipelineAsyncStatus_Error, ComputePipeline::createInvalid(*this), { });
 }
 
 ComputePipeline::ComputePipeline(id<MTLComputePipelineState> computePipelineState, Device& device)

Modified: trunk/Source/WebGPU/WebGPU/RenderPipeline.mm (292672 => 292673)


--- trunk/Source/WebGPU/WebGPU/RenderPipeline.mm	2022-04-09 02:28:13 UTC (rev 292672)
+++ trunk/Source/WebGPU/WebGPU/RenderPipeline.mm	2022-04-09 02:56:18 UTC (rev 292673)
@@ -40,8 +40,9 @@
 
 void Device::createRenderPipelineAsync(const WGPURenderPipelineDescriptor& descriptor, CompletionHandler<void(WGPUCreatePipelineAsyncStatus, Ref<RenderPipeline>&&, String&& message)>&& callback)
 {
+    // FIXME: Implement this.
     UNUSED_PARAM(descriptor);
-    UNUSED_PARAM(callback);
+    callback(WGPUCreatePipelineAsyncStatus_Error, RenderPipeline::createInvalid(*this), { });
 }
 
 RenderPipeline::RenderPipeline(id<MTLRenderPipelineState> renderPipelineState, Device& device)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to