Title: [244856] trunk
Revision
244856
Author
justin_...@apple.com
Date
2019-05-01 16:21:59 -0700 (Wed, 01 May 2019)

Log Message

Update WebGPU class names based on sketch.idl
https://bugs.webkit.org/show_bug.cgi?id=194260

Reviewed by Dean Jackson.

Update all exposed Web GPU interface names to GPU* prefix.

Source/WebCore:

Existing Web GPU tests updated to expect new names.

* Modules/webgpu/WebGPU.idl:
* Modules/webgpu/WebGPUAdapter.idl:
* Modules/webgpu/WebGPUBindGroup.idl:
* Modules/webgpu/WebGPUBindGroupLayout.idl:
* Modules/webgpu/WebGPUBuffer.idl:
* Modules/webgpu/WebGPUDevice.idl:
* Modules/webgpu/WebGPUInputStepMode.h: Removed.
* Modules/webgpu/WebGPUPipelineLayout.idl:
* Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
* Modules/webgpu/WebGPUQueue.idl:
* Modules/webgpu/WebGPURenderPassEncoder.idl:
* Modules/webgpu/WebGPURenderPipeline.idl:
* Modules/webgpu/WebGPUSampler.idl:
* Modules/webgpu/WebGPUTexture.idl:
* Modules/webgpu/WebGPUTextureView.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

* webgpu/adapter-options.html:
* webgpu/bind-groups-expected.txt:
* webgpu/bind-groups.html:
* webgpu/buffer-resource-triangles.html:
* webgpu/js/webgpu-functions.js:
(beginBasicRenderPass):
* webgpu/map-read-buffers.html:
* webgpu/map-write-buffers.html:
* webgpu/pipeline-layouts-expected.txt:
* webgpu/pipeline-layouts.html:
* webgpu/queue-creation-expected.txt:
* webgpu/queue-creation.html:
* webgpu/render-command-encoding-expected.txt:
* webgpu/render-command-encoding.html:
* webgpu/render-pipelines-expected.txt:
* webgpu/render-pipelines.html:
* webgpu/textures-textureviews.html:
* webgpu/webgpu-enabled.html:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (244855 => 244856)


--- trunk/LayoutTests/ChangeLog	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/ChangeLog	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,3 +1,31 @@
+2019-05-01  Justin Fan  <justin_...@apple.com>
+
+        Update WebGPU class names based on sketch.idl
+        https://bugs.webkit.org/show_bug.cgi?id=194260
+
+        Reviewed by Dean Jackson.
+
+        Update all exposed Web GPU interface names to GPU* prefix.
+
+        * webgpu/adapter-options.html:
+        * webgpu/bind-groups-expected.txt:
+        * webgpu/bind-groups.html:
+        * webgpu/buffer-resource-triangles.html:
+        * webgpu/js/webgpu-functions.js:
+        (beginBasicRenderPass):
+        * webgpu/map-read-buffers.html:
+        * webgpu/map-write-buffers.html:
+        * webgpu/pipeline-layouts-expected.txt:
+        * webgpu/pipeline-layouts.html:
+        * webgpu/queue-creation-expected.txt:
+        * webgpu/queue-creation.html:
+        * webgpu/render-command-encoding-expected.txt:
+        * webgpu/render-command-encoding.html:
+        * webgpu/render-pipelines-expected.txt:
+        * webgpu/render-pipelines.html:
+        * webgpu/textures-textureviews.html:
+        * webgpu/webgpu-enabled.html:
+
 2019-05-01  Zalan Bujtas  <za...@apple.com>
 
         [iOS] Unreviewed test gardening.

Modified: trunk/LayoutTests/webgpu/adapter-options.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/adapter-options.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/adapter-options.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -9,7 +9,7 @@
     const defaultAdapter = await navigator.gpu.requestAdapter();
     const device = await defaultAdapter.requestDevice();
 
-    assert_true(device instanceof WebGPUDevice, "Default device successfully created.");
+    assert_true(device instanceof GPUDevice, "Default device successfully created.");
 }, "Create the default device.");
 
 promise_test(async () => {
@@ -16,7 +16,7 @@
     const lowPowerAdapter = await navigator.gpu.requestAdapter({ powerPreference: "low-power" });
     const device = await lowPowerAdapter.requestDevice();
 
-    assert_true(device instanceof WebGPUDevice, "Device successfully created using low-power option.");
+    assert_true(device instanceof GPUDevice, "Device successfully created using low-power option.");
 }, "Create a device with a low-power option.");
 
 promise_test(async () => {
@@ -23,7 +23,7 @@
     const highPerfAdapter = await navigator.gpu.requestAdapter({ powerPreference: "high-performance" });
     const device = await highPerfAdapter.requestDevice();
 
-    assert_true(device instanceof WebGPUDevice, "Device successfully created using high-performance option.");
+    assert_true(device instanceof GPUDevice, "Device successfully created using high-performance option.");
 }, "Create a device with a high-performance option.");
 </script>
 </body>
\ No newline at end of file

Modified: trunk/LayoutTests/webgpu/bind-groups-expected.txt (244855 => 244856)


--- trunk/LayoutTests/webgpu/bind-groups-expected.txt	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/bind-groups-expected.txt	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,3 +1,3 @@
 
-PASS Create a basic WebGPUBindGroup via WebGPUDevice. 
+PASS Create a basic GPUBindGroup via GPUDevice. 
 

Modified: trunk/LayoutTests/webgpu/bind-groups.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/bind-groups.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/bind-groups.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,6 +1,6 @@
 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
 <meta charset=utf-8>
-<title>Create a basic WebGPUBindGroup.</title>
+<title>Create a basic GPUBindGroup.</title>
 <body>
 <script src=""
 <script src=""
@@ -9,7 +9,7 @@
 promise_test(async () => {
     const device = await getBasicDevice();
 
-    // WebGPUBindGroupLayoutBindings
+    // GPUBindGroupLayoutBindings
     // FIXME: Also test sampled texture bindings. 
     const bufferLayoutBinding = {
         binding: 1,
@@ -24,7 +24,7 @@
     const bindGroupBinding = { binding: 1, resource: bufferBinding };
 
     const bindGroup = device.createBindGroup({ layout: bindGroupLayout, bindings: [bindGroupBinding]});
-    assert_true(bindGroup instanceof WebGPUBindGroup, "WebGPUBindGroup successfully created.")
-}, "Create a basic WebGPUBindGroup via WebGPUDevice.")
+    assert_true(bindGroup instanceof GPUBindGroup, "GPUBindGroup successfully created.")
+}, "Create a basic GPUBindGroup via GPUDevice.")
 </script>
 </body>
\ No newline at end of file

Modified: trunk/LayoutTests/webgpu/buffer-resource-triangles.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/buffer-resource-triangles.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/buffer-resource-triangles.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -118,7 +118,7 @@
     // FIXME: Replace with non-MSL shaders.
     const shaderModule = device.createShaderModule({ code: shaderCode });
 
-    // Create vertex data WebGPUBuffers.
+    // Create vertex data GPUBuffers.
     const verticesBuffer = createAndUploadVerticesBuffer(device);
 
     let bufferPromises = [];
@@ -145,7 +145,7 @@
         }]
     };
 
-    // Create buffer WebGPUBindGroupLayoutBindings.
+    // Create buffer GPUBindGroupLayoutBindings.
     const layoutUL = createUniformBufferBindGroupLayout(bindingNums.UL);
     const layoutUM = createUniformBufferBindGroupLayout(bindingNums.UM);
     const layoutUR = createUniformBufferBindGroupLayout(bindingNums.UR);
@@ -153,15 +153,15 @@
     const layoutLR = createUniformBufferBindGroupLayout(bindingNums.LR);
     const layoutG = createUniformBufferBindGroupLayout(bindingNums.G, GPUShaderStageBit.FRAGMENT);
 
-    // WebGPUBindGroupLayouts
+    // GPUBindGroupLayouts
     const leftTriangleBGLayout = device.createBindGroupLayout({ bindings: [layoutUL, layoutUM, layoutLL, layoutG] });
     const rightTriangleBGLayout = device.createBindGroupLayout({ bindings: [layoutUR, layoutUM, layoutLR] });
 
-    // WebGPUPipelineLayout and WebGPURenderPipeline
+    // GPUPipelineLayout and GPURenderPipeline
     const pipelineLayout = device.createPipelineLayout({ bindGroupLayouts: [leftTriangleBGLayout, rightTriangleBGLayout] });
     const pipeline = createBasicPipeline(shaderModule, device, null, pipelineLayout, inputState, null, "triangle-list");
 
-    // WebGPUBufferBindings
+    // GPUBufferBindings
     const bindingUL = createBufferBinding(upperLeft);
     const bindingUM = createBufferBinding(upperMiddle);
     const bindingUR = createBufferBinding(upperRight);
@@ -169,7 +169,7 @@
     const bindingLR = createBufferBinding(lowerRight);
     const bindingG = createBufferBinding(green);
     
-    // WebGPUBindGroupBindings
+    // GPUBindGroupBindings
     const bgBindingUL = { binding: bindingNums.UL, resource: bindingUL };
     const bgBindingUM = { binding: bindingNums.UM, resource: bindingUM };
     const bgBindingUR = { binding: bindingNums.UR, resource: bindingUR };
@@ -177,7 +177,7 @@
     const bgBindingLR = { binding: bindingNums.LR, resource: bindingLR };
     const bgBindingG = { binding: bindingNums.G, resource: bindingG };
 
-    // WebGPUBindGroups
+    // GPUBindGroups
     const leftTriangleBG = device.createBindGroup({ 
         layout: leftTriangleBGLayout, 
         bindings: [bgBindingUL, bgBindingUM, bgBindingLL, bgBindingG] 

Modified: trunk/LayoutTests/webgpu/js/webgpu-functions.js (244855 => 244856)


--- trunk/LayoutTests/webgpu/js/webgpu-functions.js	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/js/webgpu-functions.js	2019-05-01 23:21:59 UTC (rev 244856)
@@ -77,7 +77,7 @@
         clearColor: { r: 1.0, g: 0, b: 0, a: 1.0 }
     };
 
-    // FIXME: Flesh out the rest of WebGPURenderPassDescriptor. 
+    // FIXME: Flesh out the rest of GPURenderPassDescriptor. 
     return commandEncoder.beginRenderPass({ colorAttachments : [basicAttachment] });
 }
 

Modified: trunk/LayoutTests/webgpu/map-read-buffers.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/map-read-buffers.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/map-read-buffers.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -12,7 +12,7 @@
     // Basic mapReadAsync functionality
     promise_test(async () => {
         const buffer = device.createBuffer({ size: 16, usage: GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ });
-        assert_true(buffer instanceof WebGPUBuffer, "createBuffer returned a WebGPUBuffer");
+        assert_true(buffer instanceof GPUBuffer, "createBuffer returned a GPUBuffer");
 
         let array = new Float32Array([1, 2, 3, 4]);
         buffer.setSubData(0, array.buffer);

Modified: trunk/LayoutTests/webgpu/map-write-buffers.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/map-write-buffers.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/map-write-buffers.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -12,7 +12,7 @@
     // Basic mapWriteAsync functionality
     promise_test(async () => {
         const buffer = device.createBuffer({ size: 16, usage: GPUBufferUsage.MAP_WRITE });
-        assert_true(buffer instanceof WebGPUBuffer, "createBuffer returned a WebGPUBuffer");
+        assert_true(buffer instanceof GPUBuffer, "createBuffer returned a GPUBuffer");
 
         let arrayBuffer = await buffer.mapWriteAsync();
 

Modified: trunk/LayoutTests/webgpu/pipeline-layouts-expected.txt (244855 => 244856)


--- trunk/LayoutTests/webgpu/pipeline-layouts-expected.txt	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/pipeline-layouts-expected.txt	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,4 +1,4 @@
 
-PASS Create a basic WebGPUBindGroupLayoutDescriptor. 
-PASS Create a basic WebGPUPipelineLayout wtih a WebGPUDevice. 
+PASS Create a basic GPUBindGroupLayoutDescriptor. 
+PASS Create a basic GPUPipelineLayout wtih a GPUDevice. 
 

Modified: trunk/LayoutTests/webgpu/pipeline-layouts.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/pipeline-layouts.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/pipeline-layouts.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,6 +1,6 @@
 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
 <meta charset=utf-8>
-<title>Create WebGPUBindGroupLayout.</title>
+<title>Create GPUBindGroupLayout.</title>
 <body>
 <script src=""
 <script src=""
@@ -19,15 +19,15 @@
     assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & GPUShaderStageBit.FRAGMENT, 0);
     assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & GPUShaderStageBit.VERTEX, 0);
     assert_equals(bindGroupLayoutDescriptor.bindings[0].type, "storage-buffer");
-}, "Create a basic WebGPUBindGroupLayoutDescriptor."); 
+}, "Create a basic GPUBindGroupLayoutDescriptor."); 
 
 promise_test(async () => {
     const device = await getBasicDevice();
     const bindGroupLayout = device.createBindGroupLayout({ bindings: [createBindGroupLayoutBinding()] });
-    assert_true(bindGroupLayout instanceof WebGPUBindGroupLayout, "createBindGroupLayout returned a WebGPUBindGroupLayout");
+    assert_true(bindGroupLayout instanceof GPUBindGroupLayout, "createBindGroupLayout returned a GPUBindGroupLayout");
 
     const pipelineLayout = device.createPipelineLayout({ bindGroupLayouts: [bindGroupLayout] });
-    assert_true(pipelineLayout instanceof WebGPUPipelineLayout, "createPipelineLayout returned a WebGPUPipelineLayout");
-}, "Create a basic WebGPUPipelineLayout wtih a WebGPUDevice.");
+    assert_true(pipelineLayout instanceof GPUPipelineLayout, "createPipelineLayout returned a GPUPipelineLayout");
+}, "Create a basic GPUPipelineLayout wtih a GPUDevice.");
 </script>
 </body>
\ No newline at end of file

Modified: trunk/LayoutTests/webgpu/queue-creation-expected.txt (244855 => 244856)


--- trunk/LayoutTests/webgpu/queue-creation-expected.txt	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/queue-creation-expected.txt	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,3 +1,3 @@
 
-PASS getQueue() on WebGPUDevice. 
+PASS getQueue() on GPUDevice. 
 

Modified: trunk/LayoutTests/webgpu/queue-creation.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/queue-creation.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/queue-creation.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,6 +1,6 @@
 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
 <meta charset=utf-8>
-<title>Get the WebGPUDevice and ask for the WebGPUQueue</title>
+<title>Get the GPUDevice and ask for the GPUQueue</title>
 <body>
 <script src=""
 <script src=""
@@ -15,17 +15,17 @@
     assert_true(context instanceof GPUCanvasContext, "getContext returned a GPUCanvasContext.");
 
     const adapter = await navigator.gpu.requestAdapter({});
-    assert_true(adapter instanceof WebGPUAdapter, "requestAdapter returned a WebGPUAdapter.");
+    assert_true(adapter instanceof GPUAdapter, "requestAdapter returned a GPUAdapter.");
 
     const device = await adapter.requestDevice();
-    assert_true(device instanceof WebGPUDevice, "requestDevice returned a WebGPUDevice.");
+    assert_true(device instanceof GPUDevice, "requestDevice returned a GPUDevice.");
 
     const queue = device.getQueue();
-    assert_true(queue instanceof WebGPUQueue, "getQueue returned a WebGPUQueue.");
+    assert_true(queue instanceof GPUQueue, "getQueue returned a GPUQueue.");
 
     queue.label = "Example label";
     assert_equals(queue.label, "Example label", "queue.label was set.");
-}, "getQueue() on WebGPUDevice.");
+}, "getQueue() on GPUDevice.");
 
 </script>
 </body>

Modified: trunk/LayoutTests/webgpu/render-command-encoding-expected.txt (244855 => 244856)


--- trunk/LayoutTests/webgpu/render-command-encoding-expected.txt	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/render-command-encoding-expected.txt	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,3 +1,3 @@
 
-PASS WebGPURenderPassEncoder created and successfully ended 
+PASS GPURenderPassEncoder created and successfully ended 
 

Modified: trunk/LayoutTests/webgpu/render-command-encoding.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/render-command-encoding.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/render-command-encoding.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,6 +1,6 @@
 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
 <meta charset=utf-8>
-<title>Get the WebGPUDevice and ask for the WebGPUQueue</title>
+<title>Get the GPUDevice and ask for the GPUQueue</title>
 <body>
 <script src=""
 <script src=""
@@ -38,11 +38,11 @@
     assert_true(commandEncoder instanceof GPUCommandEncoder, "createCommandEncoder returned a GPUCommandEncoder");
 
     const encoder = beginBasicRenderPass(swapChain, commandEncoder);
-    assert_true(encoder instanceof WebGPURenderPassEncoder, "beginRenderPass() returned a WebGPURenderPassEncoder");
+    assert_true(encoder instanceof GPURenderPassEncoder, "beginRenderPass() returned a GPURenderPassEncoder");
 
     encoder.setPipeline(pipeline);
     encoder.endPass();
-}, "WebGPURenderPassEncoder created and successfully ended");
+}, "GPURenderPassEncoder created and successfully ended");
 
 </script>
 </body>

Modified: trunk/LayoutTests/webgpu/render-pipelines-expected.txt (244855 => 244856)


--- trunk/LayoutTests/webgpu/render-pipelines-expected.txt	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/render-pipelines-expected.txt	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,3 +1,3 @@
 
-PASS Create basic WebGPURenderPipeline 
+PASS Create basic GPURenderPipeline 
 

Modified: trunk/LayoutTests/webgpu/render-pipelines.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/render-pipelines.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/render-pipelines.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -48,7 +48,7 @@
     const pipelineLayout = device.createPipelineLayout({ bindGroupLayouts: [bindGroupLayout] });
 
     const pipeline = createBasicPipeline(shaderModule, device, null, pipelineLayout);
-    assert_true(pipeline instanceof WebGPURenderPipeline, "Successfully created WebGPURenderPipeline");
-}, "Create basic WebGPURenderPipeline");
+    assert_true(pipeline instanceof GPURenderPipeline, "Successfully created GPURenderPipeline");
+}, "Create basic GPURenderPipeline");
 </script>
 </html>
\ No newline at end of file

Modified: trunk/LayoutTests/webgpu/textures-textureviews.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/textures-textureviews.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/textures-textureviews.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,15 +27,15 @@
     swapChain = createBasicSwapChain(canvas, device);
 
     const texture = swapChain.getCurrentTexture();
-    assert_true(texture instanceof WebGPUTexture, "Successfully acquired next texture.");
+    assert_true(texture instanceof GPUTexture, "Successfully acquired next texture.");
 
     const textureView = texture.createDefaultView();
-    assert_true(textureView instanceof WebGPUTextureView, "Successfully created texture view from next texture.");
+    assert_true(textureView instanceof GPUTextureView, "Successfully created texture view from next texture.");
 }, "Create texture view from swap chain.");
 
 promise_test(async () => {
     const depthTexture = device.createTexture(texDescriptor);
-    assert_true(depthTexture instanceof WebGPUTexture, "Successfully created depth texture.");
+    assert_true(depthTexture instanceof GPUTexture, "Successfully created depth texture.");
 }, "Create basic depth texture from device.");
 
 promise_test(async () => {
@@ -44,7 +44,7 @@
     texDescriptor.usage = GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_SRC
 
     const multisampledTexture = device.createTexture(texDescriptor);
-    assert_true(multisampledTexture instanceof WebGPUTexture, "Successfully created multisampled texture.");
+    assert_true(multisampledTexture instanceof GPUTexture, "Successfully created multisampled texture.");
 }, "Create basic 4x multisampled texture.");
 
 promise_test(async () => {
@@ -53,10 +53,10 @@
     texDescriptor.dimension = "3d";
 
     const texture3d = device.createTexture(texDescriptor);
-    assert_true(texture3d instanceof WebGPUTexture, "Successfully created basic 3D texture.");
+    assert_true(texture3d instanceof GPUTexture, "Successfully created basic 3D texture.");
 }, "Create basic 3D texture from device.");
 
-// FIXME: Add tests for 1D textures, textureArrays, and WebGPUTextureViews.
+// FIXME: Add tests for 1D textures, textureArrays, and GPUTextureViews.
 </script>
 </body>
 </html>
\ No newline at end of file

Modified: trunk/LayoutTests/webgpu/webgpu-enabled.html (244855 => 244856)


--- trunk/LayoutTests/webgpu/webgpu-enabled.html	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/LayoutTests/webgpu/webgpu-enabled.html	2019-05-01 23:21:59 UTC (rev 244856)
@@ -14,10 +14,10 @@
     assert_not_equals(navigator.gpu, undefined, "navigator.gpu is defined.");
 
     const adapter = await navigator.gpu.requestAdapter();
-    assert_true(adapter instanceof WebGPUAdapter, "Created default GPUAdapter.");
+    assert_true(adapter instanceof GPUAdapter, "Created default GPUAdapter.");
     
     const device = await adapter.requestDevice();
-    assert_true(device instanceof WebGPUDevice, "Created GPUDevice.");
+    assert_true(device instanceof GPUDevice, "Created GPUDevice.");
 }, "Web GPU is enabled.");
 </script>
 </html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (244855 => 244856)


--- trunk/Source/WebCore/ChangeLog	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/ChangeLog	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,3 +1,32 @@
+2019-05-01  Justin Fan  <justin_...@apple.com>
+
+        Update WebGPU class names based on sketch.idl
+        https://bugs.webkit.org/show_bug.cgi?id=194260
+
+        Reviewed by Dean Jackson.
+
+        Update all exposed Web GPU interface names to GPU* prefix.
+
+        Existing Web GPU tests updated to expect new names.
+
+        * Modules/webgpu/WebGPU.idl:
+        * Modules/webgpu/WebGPUAdapter.idl:
+        * Modules/webgpu/WebGPUBindGroup.idl:
+        * Modules/webgpu/WebGPUBindGroupLayout.idl:
+        * Modules/webgpu/WebGPUBuffer.idl:
+        * Modules/webgpu/WebGPUDevice.idl:
+        * Modules/webgpu/WebGPUInputStepMode.h: Removed.
+        * Modules/webgpu/WebGPUPipelineLayout.idl:
+        * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
+        * Modules/webgpu/WebGPUQueue.idl:
+        * Modules/webgpu/WebGPURenderPassEncoder.idl:
+        * Modules/webgpu/WebGPURenderPipeline.idl:
+        * Modules/webgpu/WebGPUSampler.idl:
+        * Modules/webgpu/WebGPUTexture.idl:
+        * Modules/webgpu/WebGPUTextureView.idl:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+
 2019-05-01  Jiewen Tan  <jiewen_...@apple.com>
 
         Move Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPU.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPU.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPU.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,7 +27,8 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPU
 ] interface WebGPU {
     Promise<WebGPUAdapter> requestAdapter(optional GPURequestAdapterOptions options);
 };

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,7 +27,8 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUAdapter
 ] interface WebGPUAdapter {
     // readonly attribute DOMString name;
     // readonly attribute WebGPUExtensions extensions;

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroup.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroup.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroup.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,6 +27,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUBindGroup
 ] interface WebGPUBindGroup {
 };

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,6 +27,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUBindGroupLayout
 ] interface WebGPUBindGroupLayout {
 };

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -29,7 +29,8 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUBuffer
 ] interface WebGPUBuffer {
     void setSubData(u64 offset, ArrayBuffer data);
 

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,7 +27,8 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUDevice
 ] interface WebGPUDevice {
     readonly attribute WebGPUAdapter adapter;
 

Deleted: trunk/Source/WebCore/Modules/webgpu/WebGPUInputStepMode.h (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUInputStepMode.h	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUInputStepMode.h	2019-05-01 23:21:59 UTC (rev 244856)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(WEBGPU)
-
-#include "GPUVertexInputDescriptor.h"
-
-namespace WebCore {
-
-using WebGPUInputStepMode = GPUInputStepMode;
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineLayout.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineLayout.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineLayout.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,6 +27,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUPipelineLayout
 ] interface WebGPUPipelineLayout {
 };

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -29,6 +29,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
+    InterfaceName=GPUProgrammablePassEncoder,
     SkipVTableValidation
 ] interface WebGPUProgrammablePassEncoder {
     void endPass();

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUQueue.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUQueue.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUQueue.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,7 +27,8 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUQueue
 ] interface WebGPUQueue {
     void submit(sequence<WebGPUCommandBuffer> buffers);
 

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -31,6 +31,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
+    InterfaceName=GPURenderPassEncoder,
     JSGenerateToJSObject
 ] interface WebGPURenderPassEncoder : WebGPUProgrammablePassEncoder {
     void setPipeline(WebGPURenderPipeline pipeline);

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPURenderPipeline.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPURenderPipeline.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPURenderPipeline.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,6 +27,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPURenderPipeline
 ] interface WebGPURenderPipeline {
 };

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUSampler.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUSampler.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUSampler.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,6 +27,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUSampler
 ] interface WebGPUSampler {
 };

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUTexture.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUTexture.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUTexture.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,7 +27,8 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUTexture
 ] interface WebGPUTexture {
     WebGPUTextureView createDefaultView();
     void destroy();

Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUTextureView.idl (244855 => 244856)


--- trunk/Source/WebCore/Modules/webgpu/WebGPUTextureView.idl	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUTextureView.idl	2019-05-01 23:21:59 UTC (rev 244856)
@@ -27,6 +27,7 @@
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
+    ImplementationLacksVTable,
+    InterfaceName=GPUTextureView
 ] interface WebGPUTextureView {
 };

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (244855 => 244856)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-05-01 23:21:59 UTC (rev 244856)
@@ -13877,7 +13877,6 @@
 		D0615FCC217FE5C6008A48A8 /* WebGPUShaderModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUShaderModule.h; sourceTree = "<group>"; };
 		D0615FCD217FE5C6008A48A8 /* WebGPUShaderModule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUShaderModule.cpp; sourceTree = "<group>"; };
 		D0615FCE217FE5C6008A48A8 /* WebGPUShaderModule.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUShaderModule.idl; sourceTree = "<group>"; };
-		D063AE4621C06626000E6A35 /* WebGPUInputStepMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUInputStepMode.h; sourceTree = "<group>"; };
 		D06A9A2122026C7A0083C662 /* GPURequestAdapterOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPURequestAdapterOptions.h; sourceTree = "<group>"; };
 		D06C0D8D0CFD11460065F43F /* RemoveFormatCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoveFormatCommand.h; sourceTree = "<group>"; };
 		D06C0D8E0CFD11460065F43F /* RemoveFormatCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoveFormatCommand.cpp; sourceTree = "<group>"; };
@@ -25832,7 +25831,6 @@
 				D00F595321701D8C000D71DB /* WebGPUDevice.cpp */,
 				D00F595221701D8C000D71DB /* WebGPUDevice.h */,
 				D00F595421701D8C000D71DB /* WebGPUDevice.idl */,
-				D063AE4621C06626000E6A35 /* WebGPUInputStepMode.h */,
 				D0C419F02183EB31009EC1DE /* WebGPUPipelineDescriptorBase.h */,
 				D0C419F12183EB31009EC1DE /* WebGPUPipelineDescriptorBase.idl */,
 				D05A99E521C9BF2C00032B75 /* WebGPUPipelineLayout.cpp */,

Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (244855 => 244856)


--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2019-05-01 23:07:35 UTC (rev 244855)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2019-05-01 23:21:59 UTC (rev 244856)
@@ -81,6 +81,11 @@
     macro(Gamepad) \
     macro(GamepadButton) \
     macro(GamepadEvent) \
+    macro(GPU) \
+    macro(GPUAdapter) \
+    macro(GPUBindGroup) \
+    macro(GPUBindGroupLayout) \
+    macro(GPUBuffer) \
     macro(GPUBufferUsage) \
     macro(GPUCanvasContext) \
     macro(GPUColorWriteBits) \
@@ -88,10 +93,19 @@
     macro(GPUCommandEncoder) \
     macro(GPUComputePassEncoder) \
     macro(GPUComputePipeline) \
+    macro(GPUDevice) \
+    macro(GPUPipelineLayout) \
+    macro(GPUProgrammablePassEncoder) \
+    macro(GPUQueue) \
+    macro(GPURenderPassEncoder) \
+    macro(GPURenderPipeline) \
+    macro(GPUSampler) \
     macro(GPUShaderModule) \
     macro(GPUShaderStageBit) \
     macro(GPUSwapChain) \
+    macro(GPUTexture) \
     macro(GPUTextureUsage) \
+    macro(GPUTextureView) \
     macro(HTMLAttachmentElement) \
     macro(HTMLAudioElement) \
     macro(HTMLDataListElement) \
@@ -203,23 +217,6 @@
     macro(VisualViewport) \
     macro(WebGL2RenderingContext) \
     macro(WebGLVertexArrayObject) \
-    macro(WebGPU) \
-    macro(WebGPUAdapter) \
-    macro(WebGPUBindGroup) \
-    macro(WebGPUBindGroupLayout) \
-    macro(WebGPUBuffer) \
-    macro(WebGPUDevice) \
-    macro(WebGPUIndexFormat) \
-    macro(WebGPUInputStepMode) \
-    macro(WebGPUQueue) \
-    macro(WebGPUPipelineLayout) \
-    macro(WebGPUProgrammablePassEncoder) \
-    macro(WebGPURenderPassEncoder) \
-    macro(WebGPURenderPipeline) \
-    macro(WebGPUSampler) \
-    macro(WebGPUTexture) \
-    macro(WebGPUTextureView) \
-    macro(WebGPUVertexFormat) \
     macro(WebKitMediaKeyError) \
     macro(WebKitMediaKeyMessageEvent) \
     macro(WebKitMediaKeyNeededEvent) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to