<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[215131] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/215131">215131</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-04-07 17:21:26 -0700 (Fri, 07 Apr 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Source/JavaScriptCore:
WebGPU: implement ComputeCommandEncoder and related components
https://bugs.webkit.org/show_bug.cgi?id=170444
Patch by Yuichiro Kikura <y.kikura@gmail.com> on 2017-04-07
Reviewed by Alex Christensen.
I added some identifiers related with WebGPUComputeCommandEncoder based on the proposal.
https://webkit.org/wp-content/uploads/webgpu-api-proposal.html
* runtime/CommonIdentifiers.h:
Source/WebCore:
WebGPU: implement ComputeCommandEncoder and related components
https://bugs.webkit.org/show_bug.cgi?id=170444
Patch by Yuichiro Kikura <y.kikura@gmail.com> on 2017-04-07
Reviewed by Alex Christensen.
I implemented WebGPUComputeCommandEncoder and related components based on the WebGPU proposal.
https://webkit.org/wp-content/uploads/webgpu-api-proposal.html
Test: fast/canvas/webgpu/webgpu-dispatch.html
* CMakeLists.txt:
* DerivedSources.make:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGPUCommandBufferCustom.cpp: Added.
(WebCore::JSWebGPUCommandBuffer::completed):
* html/canvas/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::createComputeCommandEncoder):
* html/canvas/WebGPUCommandBuffer.h:
* html/canvas/WebGPUCommandBuffer.idl:
* html/canvas/WebGPUComputeCommandEncoder.cpp: Added.
(WebCore::GPUSizeMake):
(WebCore::WebGPUComputeCommandEncoder::create):
(WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder):
(WebCore::WebGPUComputeCommandEncoder::~WebGPUComputeCommandEncoder):
(WebCore::WebGPUComputeCommandEncoder::setComputePipelineState):
(WebCore::WebGPUComputeCommandEncoder::setBuffer):
(WebCore::WebGPUComputeCommandEncoder::dispatch):
(WebCore::WebGPUComputeCommandEncoder::endEncoding):
* html/canvas/WebGPUComputeCommandEncoder.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
(WebCore::WebGPUComputeCommandEncoder::computeCommandEncoder):
* html/canvas/WebGPUComputeCommandEncoder.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
* html/canvas/WebGPUComputePipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.
(WebCore::WebGPUComputePipelineState::create):
(WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState):
(WebCore::WebGPUComputePipelineState::~WebGPUComputePipelineState):
* html/canvas/WebGPUComputePipelineState.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
(WebCore::WebGPUComputePipelineState::computePipelineState):
* html/canvas/WebGPUComputePipelineState.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::createComputePipelineState):
* html/canvas/WebGPURenderingContext.h:
* html/canvas/WebGPURenderingContext.idl:
* html/canvas/WebGPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
* html/canvas/WebGPUSize.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
* platform/graphics/cocoa/GPUCommandBufferMetal.mm:
(WebCore::GPUCommandBuffer::completed):
* platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm: Added.
(WebCore::MTLSizeMake):
(WebCore::GPUComputeCommandEncoder::GPUComputeCommandEncoder):
(WebCore::GPUComputeCommandEncoder::setComputePipelineState):
(WebCore::GPUComputeCommandEncoder::setBuffer):
(WebCore::GPUComputeCommandEncoder::dispatch):
(WebCore::GPUComputeCommandEncoder::endEncoding):
(WebCore::GPUComputeCommandEncoder::platformComputeCommandEncoder):
* platform/graphics/cocoa/GPUComputePipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.
(WebCore::GPUComputePipelineState::GPUComputePipelineState):
(WebCore::GPUComputePipelineState::platformComputePipelineState):
* platform/graphics/gpu/GPUCommandBuffer.cpp:
(WebCore::GPUCommandBuffer::createComputeCommandEncoder):
* platform/graphics/gpu/GPUCommandBuffer.h:
* platform/graphics/gpu/GPUComputeCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.
(WebCore::GPUComputeCommandEncoder::create):
(WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
(WebCore::GPUComputeCommandEncoder::setComputePipelineState):
(WebCore::GPUComputeCommandEncoder::setBuffer):
(WebCore::GPUComputeCommandEncoder::endEncoding):
* platform/graphics/gpu/GPUComputeCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h.
* platform/graphics/gpu/GPUComputePipelineState.cpp: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
(WebCore::GPUComputePipelineState::create):
(WebCore::GPUComputePipelineState::~GPUComputePipelineState):
* platform/graphics/gpu/GPUComputePipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h.
* platform/graphics/gpu/GPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
LayoutTests:
WebGPU: implement ComputeCommandEncoder and related components
https://bugs.webkit.org/show_bug.cgi?id=170444
Patch by Yuichiro Kikura <y.kikura@gmail.com> on 2017-04-07
Reviewed by Alex Christensen.
Added a test case to ensure ComputeCommandEncoder is dispatched successfully
* fast/canvas/webgpu/webgpu-dispatch-expected.txt: Added.
* fast/canvas/webgpu/webgpu-dispatch.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUCommandBuffercpp">trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUCommandBufferh">trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl">trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPURenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGPURenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPURenderingContexth">trunk/Source/WebCore/html/canvas/WebGPURenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPURenderingContextidl">trunk/Source/WebCore/html/canvas/WebGPURenderingContext.idl</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaGPUCommandBufferMetalmm">trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandBufferMetal.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUCommandBuffercpp">trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUCommandBufferh">trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcanvaswebgpuwebgpudispatchexpectedtxt">trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebgpuwebgpudispatchhtml">trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWebGPUCommandBufferCustomcpp">trunk/Source/WebCore/bindings/js/JSWebGPUCommandBufferCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUComputeCommandEncodercpp">trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUComputeCommandEncoderh">trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUComputeCommandEncoderidl">trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUComputePipelineStatecpp">trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUComputePipelineStateh">trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUComputePipelineStateidl">trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUSizeh">trunk/Source/WebCore/html/canvas/WebGPUSize.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGPUSizeidl">trunk/Source/WebCore/html/canvas/WebGPUSize.idl</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaGPUComputeCommandEncoderMetalmm">trunk/Source/WebCore/platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaGPUComputePipelineStateMetalmm">trunk/Source/WebCore/platform/graphics/cocoa/GPUComputePipelineStateMetal.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUComputeCommandEncodercpp">trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUComputeCommandEncoderh">trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUComputePipelineStatecpp">trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUComputePipelineStateh">trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUSizeh">trunk/Source/WebCore/platform/graphics/gpu/GPUSize.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/LayoutTests/ChangeLog        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-04-07 Yuichiro Kikura <y.kikura@gmail.com>
+
+ WebGPU: implement ComputeCommandEncoder and related components
+ https://bugs.webkit.org/show_bug.cgi?id=170444
+
+ Reviewed by Alex Christensen.
+
+ Added a test case to ensure ComputeCommandEncoder is dispatched successfully
+
+ * fast/canvas/webgpu/webgpu-dispatch-expected.txt: Added.
+ * fast/canvas/webgpu/webgpu-dispatch.html: Added.
+
</ins><span class="cx"> 2017-04-07 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Simple line layout: FlowContents::segmentIndexForRunSlow skips empty runs.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebgpuwebgpudispatchexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch-expected.txt        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebgpuwebgpudispatchhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html         (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgpu/webgpu-dispatch.html        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+<script id="script" type="x-shader/x-metal">
+using namespace metal;
+
+kernel void get_kernel_size(device int *result[[buffer(0)]],
+ uint3 grid_size[[threadgroups_per_grid]],
+ uint3 group_size[[threads_per_threadgroup]],
+ uint3 gid[[thread_position_in_grid]])
+{
+ if (gid.x != 0 || gid.y != 0 || gid.z != 0)
+ return;
+
+ result[0] = grid_size.x;
+ result[1] = grid_size.y;
+ result[2] = grid_size.z;
+ result[3] = group_size.x;
+ result[4] = group_size.y;
+ result[5] = group_size.z;
+}
+</script>
+
+<script>
+if (window.testRunner) {
+ window.testRunner.dumpAsText();
+ window.testRunner.waitUntilDone();
+}
+
+function assert(a) {
+ if (!a) {
+ throw new Error('Assertion Failed.');
+ }
+}
+
+function run() {
+ let output = document.getElementById("output");
+
+ if (!window.testRunner) {
+ output.textContent = "This test only runs inside DRT/WKTR.";
+ return;
+ }
+
+ window.internals.settings.setWebGPUEnabled(true);
+ let gpu = document.createElement("canvas").getContext("webgpu");
+ let commandQueue = gpu.createCommandQueue();
+
+ let library = gpu.createLibrary(document.getElementById("script").text);
+ let kernelFunction = library.functionWithName("get_kernel_size");
+ let pipelineState = gpu.createComputePipelineState(kernelFunction);
+
+ let resultBuffer = gpu.createBuffer(new Int32Array(6));
+
+ let commandBuffer = commandQueue.createCommandBuffer();
+ let commandEncoder = commandBuffer.createComputeCommandEncoder();
+
+ let gridSize = {
+ width: 7,
+ height: 6,
+ depth: 5
+ };
+ let groupSize = {
+ width: 4,
+ height: 3,
+ depth: 2
+ };
+
+ commandEncoder.setComputePipelineState(pipelineState);
+ commandEncoder.setBuffer(resultBuffer, 0, 0);
+ commandEncoder.dispatch(gridSize, groupSize);
+ commandEncoder.endEncoding();
+
+ commandBuffer.completed.then(() => {
+ let result = new Int32Array(resultBuffer.contents);
+
+ try {
+ assert(result[0] === gridSize.width);
+ assert(result[1] === gridSize.height);
+ assert(result[2] === gridSize.depth);
+ assert(result[3] === groupSize.width);
+ assert(result[4] === groupSize.height);
+ assert(result[5] === groupSize.depth);
+
+ } catch(err) {
+ output.textContent = `FAIL: ${err.message}`;
+ return;
+ }
+
+ output.textContent = 'PASS';
+ window.testRunner.notifyDone();
+ });
+
+ commandBuffer.commit();
+}
+
+window.addEventListener("load", run, false);
+
+</script>
+<div id="output"></div>
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-04-07 Yuichiro Kikura <y.kikura@gmail.com>
+
+ WebGPU: implement ComputeCommandEncoder and related components
+ https://bugs.webkit.org/show_bug.cgi?id=170444
+
+ Reviewed by Alex Christensen.
+
+ I added some identifiers related with WebGPUComputeCommandEncoder based on the proposal.
+ https://webkit.org/wp-content/uploads/webgpu-api-proposal.html
+
+ * runtime/CommonIdentifiers.h:
+
</ins><span class="cx"> 2017-04-07 Saam Barati <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> WebAssembly: Module::getOrCreateCodeBlock is wrong
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -132,6 +132,8 @@
</span><span class="cx"> macro(WebGPUBuffer) \
</span><span class="cx"> macro(WebGPUCommandBuffer) \
</span><span class="cx"> macro(WebGPUCommandQueue) \
</span><ins>+ macro(WebGPUComputeCommandEncoder) \
+ macro(WebGPUComputePipelineState) \
</ins><span class="cx"> macro(WebGPUDepthStencilDescriptor) \
</span><span class="cx"> macro(WebGPUDepthStencilState) \
</span><span class="cx"> macro(WebGPUDrawable) \
</span><span class="lines">@@ -146,6 +148,7 @@
</span><span class="cx"> macro(WebGPURenderPipelineDescriptor) \
</span><span class="cx"> macro(WebGPURenderPipelineState) \
</span><span class="cx"> macro(WebGPURenderingContext) \
</span><ins>+ macro(WebGPUSize) \
</ins><span class="cx"> macro(WebGPUTexture) \
</span><span class="cx"> macro(WebGPUTextureDescriptor) \
</span><span class="cx"> macro(WebSocket) \
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -601,6 +601,8 @@
</span><span class="cx"> html/canvas/WebGPUBuffer.idl
</span><span class="cx"> html/canvas/WebGPUCommandBuffer.idl
</span><span class="cx"> html/canvas/WebGPUCommandQueue.idl
</span><ins>+ html/canvas/WebGPUComputeCommandEncoder.idl
+ html/canvas/WebGPUComputePipelineState.idl
</ins><span class="cx"> html/canvas/WebGPUDepthStencilDescriptor.idl
</span><span class="cx"> html/canvas/WebGPUDepthStencilState.idl
</span><span class="cx"> html/canvas/WebGPUDrawable.idl
</span><span class="lines">@@ -615,6 +617,7 @@
</span><span class="cx"> html/canvas/WebGPURenderPipelineDescriptor.idl
</span><span class="cx"> html/canvas/WebGPURenderPipelineState.idl
</span><span class="cx"> html/canvas/WebGPURenderingContext.idl
</span><ins>+ html/canvas/WebGPUSize.idl
</ins><span class="cx"> html/canvas/WebGPUTexture.idl
</span><span class="cx"> html/canvas/WebGPUTextureDescriptor.idl
</span><span class="cx">
</span><span class="lines">@@ -1230,6 +1233,7 @@
</span><span class="cx"> bindings/js/JSWebGL2RenderingContextCustom.cpp
</span><span class="cx"> bindings/js/JSWebGLRenderingContextBaseCustom.cpp
</span><span class="cx"> bindings/js/JSWebGLRenderingContextCustom.cpp
</span><ins>+ bindings/js/JSWebGPUCommandBufferCustom.cpp
</ins><span class="cx"> bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp
</span><span class="cx"> bindings/js/JSWebGPURenderingContextCustom.cpp
</span><span class="cx"> bindings/js/JSWebKitSubtleCryptoCustom.cpp
</span><span class="lines">@@ -1825,6 +1829,8 @@
</span><span class="cx"> html/canvas/WebGPUBuffer.cpp
</span><span class="cx"> html/canvas/WebGPUCommandBuffer.cpp
</span><span class="cx"> html/canvas/WebGPUCommandQueue.cpp
</span><ins>+ html/canvas/WebGPUComputeCommandEncoder.cpp
+ html/canvas/WebGPUComputePipelineState.cpp
</ins><span class="cx"> html/canvas/WebGPUDepthStencilDescriptor.cpp
</span><span class="cx"> html/canvas/WebGPUDepthStencilState.cpp
</span><span class="cx"> html/canvas/WebGPUDrawable.cpp
</span><span class="lines">@@ -2340,6 +2346,8 @@
</span><span class="cx"> platform/graphics/gpu/GPUBuffer.cpp
</span><span class="cx"> platform/graphics/gpu/GPUCommandBuffer.cpp
</span><span class="cx"> platform/graphics/gpu/GPUCommandQueue.cpp
</span><ins>+ platform/graphics/gpu/GPUComputeCommandEncoder.cpp
+ platform/graphics/gpu/GPUComputePipelineState.cpp
</ins><span class="cx"> platform/graphics/gpu/GPUDepthStencilDescriptor.cpp
</span><span class="cx"> platform/graphics/gpu/GPUDepthStencilState.cpp
</span><span class="cx"> platform/graphics/gpu/GPUDevice.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/ChangeLog        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2017-04-07 Yuichiro Kikura <y.kikura@gmail.com>
+
+ WebGPU: implement ComputeCommandEncoder and related components
+ https://bugs.webkit.org/show_bug.cgi?id=170444
+
+ Reviewed by Alex Christensen.
+
+ I implemented WebGPUComputeCommandEncoder and related components based on the WebGPU proposal.
+ https://webkit.org/wp-content/uploads/webgpu-api-proposal.html
+
+ Test: fast/canvas/webgpu/webgpu-dispatch.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * PlatformMac.cmake:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSWebGPUCommandBufferCustom.cpp: Added.
+ (WebCore::JSWebGPUCommandBuffer::completed):
+ * html/canvas/WebGPUCommandBuffer.cpp:
+ (WebCore::WebGPUCommandBuffer::createComputeCommandEncoder):
+ * html/canvas/WebGPUCommandBuffer.h:
+ * html/canvas/WebGPUCommandBuffer.idl:
+ * html/canvas/WebGPUComputeCommandEncoder.cpp: Added.
+ (WebCore::GPUSizeMake):
+ (WebCore::WebGPUComputeCommandEncoder::create):
+ (WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder):
+ (WebCore::WebGPUComputeCommandEncoder::~WebGPUComputeCommandEncoder):
+ (WebCore::WebGPUComputeCommandEncoder::setComputePipelineState):
+ (WebCore::WebGPUComputeCommandEncoder::setBuffer):
+ (WebCore::WebGPUComputeCommandEncoder::dispatch):
+ (WebCore::WebGPUComputeCommandEncoder::endEncoding):
+ * html/canvas/WebGPUComputeCommandEncoder.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
+ (WebCore::WebGPUComputeCommandEncoder::computeCommandEncoder):
+ * html/canvas/WebGPUComputeCommandEncoder.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+ * html/canvas/WebGPUComputePipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.
+ (WebCore::WebGPUComputePipelineState::create):
+ (WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState):
+ (WebCore::WebGPUComputePipelineState::~WebGPUComputePipelineState):
+ * html/canvas/WebGPUComputePipelineState.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
+ (WebCore::WebGPUComputePipelineState::computePipelineState):
+ * html/canvas/WebGPUComputePipelineState.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+ * html/canvas/WebGPURenderingContext.cpp:
+ (WebCore::WebGPURenderingContext::createComputePipelineState):
+ * html/canvas/WebGPURenderingContext.h:
+ * html/canvas/WebGPURenderingContext.idl:
+ * html/canvas/WebGPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+ * html/canvas/WebGPUSize.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+ * platform/graphics/cocoa/GPUCommandBufferMetal.mm:
+ (WebCore::GPUCommandBuffer::completed):
+ * platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm: Added.
+ (WebCore::MTLSizeMake):
+ (WebCore::GPUComputeCommandEncoder::GPUComputeCommandEncoder):
+ (WebCore::GPUComputeCommandEncoder::setComputePipelineState):
+ (WebCore::GPUComputeCommandEncoder::setBuffer):
+ (WebCore::GPUComputeCommandEncoder::dispatch):
+ (WebCore::GPUComputeCommandEncoder::endEncoding):
+ (WebCore::GPUComputeCommandEncoder::platformComputeCommandEncoder):
+ * platform/graphics/cocoa/GPUComputePipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.
+ (WebCore::GPUComputePipelineState::GPUComputePipelineState):
+ (WebCore::GPUComputePipelineState::platformComputePipelineState):
+ * platform/graphics/gpu/GPUCommandBuffer.cpp:
+ (WebCore::GPUCommandBuffer::createComputeCommandEncoder):
+ * platform/graphics/gpu/GPUCommandBuffer.h:
+ * platform/graphics/gpu/GPUComputeCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.
+ (WebCore::GPUComputeCommandEncoder::create):
+ (WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
+ (WebCore::GPUComputeCommandEncoder::setComputePipelineState):
+ (WebCore::GPUComputeCommandEncoder::setBuffer):
+ (WebCore::GPUComputeCommandEncoder::endEncoding):
+ * platform/graphics/gpu/GPUComputeCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h.
+ * platform/graphics/gpu/GPUComputePipelineState.cpp: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+ (WebCore::GPUComputePipelineState::create):
+ (WebCore::GPUComputePipelineState::~GPUComputePipelineState):
+ * platform/graphics/gpu/GPUComputePipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h.
+ * platform/graphics/gpu/GPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
+
</ins><span class="cx"> 2017-04-07 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Private browsing sessions should not look in keychain for client certificates
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/DerivedSources.make        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -576,6 +576,8 @@
</span><span class="cx"> $(WebCore)/html/canvas/WebGPUBuffer.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPUCommandBuffer.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPUCommandQueue.idl \
</span><ins>+        $(WebCore)/html/canvas/WebGPUComputeCommandEncoder.idl \
+        $(WebCore)/html/canvas/WebGPUComputePipelineState.idl \
</ins><span class="cx"> $(WebCore)/html/canvas/WebGPUDepthStencilDescriptor.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPUDepthStencilState.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPUDrawable.idl \
</span><span class="lines">@@ -590,6 +592,7 @@
</span><span class="cx"> $(WebCore)/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPURenderPipelineDescriptor.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPURenderPipelineState.idl \
</span><ins>+        $(WebCore)/html/canvas/WebGPUSize.idl \
</ins><span class="cx"> $(WebCore)/html/canvas/WebGPUTexture.idl \
</span><span class="cx"> $(WebCore)/html/canvas/WebGPUTextureDescriptor.idl \
</span><span class="cx"> $(WebCore)/html/track/AudioTrack.idl \
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/PlatformMac.cmake        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -429,6 +429,8 @@
</span><span class="cx"> platform/graphics/cocoa/GPUBufferMetal.mm
</span><span class="cx"> platform/graphics/cocoa/GPUCommandBufferMetal.mm
</span><span class="cx"> platform/graphics/cocoa/GPUCommandQueueMetal.mm
</span><ins>+ platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm
+ platform/graphics/cocoa/GPUComputePipelineStateMetal.mm
</ins><span class="cx"> platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm
</span><span class="cx"> platform/graphics/cocoa/GPUDepthStencilStateMetal.mm
</span><span class="cx"> platform/graphics/cocoa/GPUDeviceMetal.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1651,6 +1651,19 @@
</span><span class="cx">                 37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 37F818FE0D657606005E1F05 /* WebCoreURLResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */; };
</span><span class="cx">                 37FD4298118368460093C029 /* TreeDepthLimit.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FD4297118368460093C029 /* TreeDepthLimit.h */; };
</span><ins>+                387AE95A1E8E92EF0000DE96 /* JSWebGPUSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 387AE9581E8E92EF0000DE96 /* JSWebGPUSize.cpp */; };
+                387AE95B1E8E92EF0000DE96 /* JSWebGPUSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 387AE9591E8E92EF0000DE96 /* JSWebGPUSize.h */; };
+                38850C531E964C1100C60753 /* JSWebGPUCommandBufferCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38850C521E964C1100C60753 /* JSWebGPUCommandBufferCustom.cpp */; };
+                389117411E8F4BF00061033E /* GPUComputeCommandEncoderMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 381E35E91E8E20AC0043E850 /* GPUComputeCommandEncoderMetal.mm */; };
+                389117421E8F4BF00061033E /* GPUComputePipelineStateMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 381E35EE1E8E24CB0043E850 /* GPUComputePipelineStateMetal.mm */; };
+                389117431E8F4BF00061033E /* GPUComputeCommandEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 381E35EB1E8E21990043E850 /* GPUComputeCommandEncoder.cpp */; };
+                389117441E8F4BF00061033E /* GPUComputePipelineState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 381E35ED1E8E247A0043E850 /* GPUComputePipelineState.cpp */; };
+                389D1E1E1E8F2B9E009795B9 /* WebGPUComputeCommandEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 381E35E81E8E1E160043E850 /* WebGPUComputeCommandEncoder.cpp */; };
+                389D1E1F1E8F2B9F009795B9 /* WebGPUComputePipelineState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 381E35E51E8E1C6A0043E850 /* WebGPUComputePipelineState.cpp */; };
+                38F23AAF1E8E83C400CE46F5 /* JSWebGPUComputeCommandEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38F23AAE1E8E83C400CE46F5 /* JSWebGPUComputeCommandEncoder.cpp */; };
+                38F23AB31E8E83D000CE46F5 /* JSWebGPUComputeCommandEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F23AB01E8E83D000CE46F5 /* JSWebGPUComputeCommandEncoder.h */; };
+                38F23AB41E8E83D000CE46F5 /* JSWebGPUComputePipelineState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38F23AB11E8E83D000CE46F5 /* JSWebGPUComputePipelineState.cpp */; };
+                38F23AB51E8E83D000CE46F5 /* JSWebGPUComputePipelineState.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F23AB21E8E83D000CE46F5 /* JSWebGPUComputePipelineState.h */; };
</ins><span class="cx">                 3AC648B2129E146500C3EB25 /* EditingBoundary.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AC648B1129E146500C3EB25 /* EditingBoundary.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 3C244FEAA375AC633F88BE6F /* RenderLayerModelObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C244FE4A375AC633F88BE6F /* RenderLayerModelObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 3C244FEBA375AC633F88BE6F /* RenderLayerModelObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C244FE5A375AC633F88BE6F /* RenderLayerModelObject.cpp */; };
</span><span class="lines">@@ -9216,6 +9229,28 @@
</span><span class="cx">                 37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponse.mm; sourceTree = "<group>"; };
</span><span class="cx">                 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrailingFloatsRootInlineBox.h; sourceTree = "<group>"; };
</span><span class="cx">                 37FD4297118368460093C029 /* TreeDepthLimit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeDepthLimit.h; sourceTree = "<group>"; };
</span><ins>+                381E35E31E8E1B450043E850 /* WebGPUComputePipelineState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGPUComputePipelineState.idl; sourceTree = "<group>"; };
+                381E35E41E8E1BD40043E850 /* WebGPUComputePipelineState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUComputePipelineState.h; sourceTree = "<group>"; };
+                381E35E51E8E1C6A0043E850 /* WebGPUComputePipelineState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUComputePipelineState.cpp; sourceTree = "<group>"; };
+                381E35E61E8E1DB90043E850 /* WebGPUComputeCommandEncoder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGPUComputeCommandEncoder.idl; sourceTree = "<group>"; };
+                381E35E71E8E1E0A0043E850 /* WebGPUComputeCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPUComputeCommandEncoder.h; sourceTree = "<group>"; };
+                381E35E81E8E1E160043E850 /* WebGPUComputeCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUComputeCommandEncoder.cpp; sourceTree = "<group>"; };
+                381E35E91E8E20AC0043E850 /* GPUComputeCommandEncoderMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUComputeCommandEncoderMetal.mm; sourceTree = "<group>"; };
+                381E35EA1E8E20D90043E850 /* GPUComputeCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUComputeCommandEncoder.h; sourceTree = "<group>"; };
+                381E35EB1E8E21990043E850 /* GPUComputeCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUComputeCommandEncoder.cpp; sourceTree = "<group>"; };
+                381E35EC1E8E23E40043E850 /* GPUComputePipelineState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUComputePipelineState.h; sourceTree = "<group>"; };
+                381E35ED1E8E247A0043E850 /* GPUComputePipelineState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUComputePipelineState.cpp; sourceTree = "<group>"; };
+                381E35EE1E8E24CB0043E850 /* GPUComputePipelineStateMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUComputePipelineStateMetal.mm; sourceTree = "<group>"; };
+                381E35EF1E8E3D7F0043E850 /* WebGPUSize.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGPUSize.idl; sourceTree = "<group>"; };
+                381E35F51E8E4C420043E850 /* WebGPUSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPUSize.h; sourceTree = "<group>"; };
+                381E35F61E8E4D0E0043E850 /* GPUSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUSize.h; sourceTree = "<group>"; };
+                387AE9581E8E92EF0000DE96 /* JSWebGPUSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUSize.cpp; sourceTree = "<group>"; };
+                387AE9591E8E92EF0000DE96 /* JSWebGPUSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUSize.h; sourceTree = "<group>"; };
+                38850C521E964C1100C60753 /* JSWebGPUCommandBufferCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUCommandBufferCustom.cpp; path = bindings/js/JSWebGPUCommandBufferCustom.cpp; sourceTree = "<group>"; };
+                38F23AAE1E8E83C400CE46F5 /* JSWebGPUComputeCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUComputeCommandEncoder.cpp; sourceTree = "<group>"; };
+                38F23AB01E8E83D000CE46F5 /* JSWebGPUComputeCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUComputeCommandEncoder.h; sourceTree = "<group>"; };
+                38F23AB11E8E83D000CE46F5 /* JSWebGPUComputePipelineState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUComputePipelineState.cpp; sourceTree = "<group>"; };
+                38F23AB21E8E83D000CE46F5 /* JSWebGPUComputePipelineState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUComputePipelineState.h; sourceTree = "<group>"; };
</ins><span class="cx">                 3AC648B1129E146500C3EB25 /* EditingBoundary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBoundary.h; sourceTree = "<group>"; };
</span><span class="cx">                 3C244FE4A375AC633F88BE6F /* RenderLayerModelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerModelObject.h; sourceTree = "<group>"; };
</span><span class="cx">                 3C244FE5A375AC633F88BE6F /* RenderLayerModelObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerModelObject.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -16268,6 +16303,7 @@
</span><span class="cx">                 0867D691FE84028FC02AAC07 /* WebKit */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                38850C521E964C1100C60753 /* JSWebGPUCommandBufferCustom.cpp */,
</ins><span class="cx">                                 1C09D04B1E31C32800725F18 /* PAL.xcodeproj */,
</span><span class="cx">                                 65C97AF208EA908800ACD273 /* config.h */,
</span><span class="cx">                                 EDEC98020AED7E170059137F /* WebCorePrefix.h */,
</span><span class="lines">@@ -17943,6 +17979,12 @@
</span><span class="cx">                                 31A088CC1E737B4D003B6609 /* WebGPUCommandQueue.cpp */,
</span><span class="cx">                                 31A088CD1E737B4D003B6609 /* WebGPUCommandQueue.h */,
</span><span class="cx">                                 31A088CE1E737B4D003B6609 /* WebGPUCommandQueue.idl */,
</span><ins>+                                381E35E81E8E1E160043E850 /* WebGPUComputeCommandEncoder.cpp */,
+                                381E35E71E8E1E0A0043E850 /* WebGPUComputeCommandEncoder.h */,
+                                381E35E61E8E1DB90043E850 /* WebGPUComputeCommandEncoder.idl */,
+                                381E35E51E8E1C6A0043E850 /* WebGPUComputePipelineState.cpp */,
+                                381E35E41E8E1BD40043E850 /* WebGPUComputePipelineState.h */,
+                                381E35E31E8E1B450043E850 /* WebGPUComputePipelineState.idl */,
</ins><span class="cx">                                 31A088CF1E737B4D003B6609 /* WebGPUDepthStencilDescriptor.cpp */,
</span><span class="cx">                                 31A088D01E737B4D003B6609 /* WebGPUDepthStencilDescriptor.h */,
</span><span class="cx">                                 31A088D11E737B4D003B6609 /* WebGPUDepthStencilDescriptor.idl */,
</span><span class="lines">@@ -17990,6 +18032,8 @@
</span><span class="cx">                                 31A088FB1E737B4D003B6609 /* WebGPURenderPipelineState.cpp */,
</span><span class="cx">                                 31A088FC1E737B4D003B6609 /* WebGPURenderPipelineState.h */,
</span><span class="cx">                                 31A088FD1E737B4D003B6609 /* WebGPURenderPipelineState.idl */,
</span><ins>+                                381E35F51E8E4C420043E850 /* WebGPUSize.h */,
+                                381E35EF1E8E3D7F0043E850 /* WebGPUSize.idl */,
</ins><span class="cx">                                 31A088FE1E737B4D003B6609 /* WebGPUTexture.cpp */,
</span><span class="cx">                                 31A088FF1E737B4D003B6609 /* WebGPUTexture.h */,
</span><span class="cx">                                 31A089001E737B4D003B6609 /* WebGPUTexture.idl */,
</span><span class="lines">@@ -18026,6 +18070,10 @@
</span><span class="cx">                                 316BDBC51E75EE2400DE0D5A /* GPUCommandBuffer.h */,
</span><span class="cx">                                 316BDBB91E73880600DE0D5A /* GPUCommandQueue.cpp */,
</span><span class="cx">                                 316BDBBA1E73880600DE0D5A /* GPUCommandQueue.h */,
</span><ins>+                                381E35EB1E8E21990043E850 /* GPUComputeCommandEncoder.cpp */,
+                                381E35EA1E8E20D90043E850 /* GPUComputeCommandEncoder.h */,
+                                381E35ED1E8E247A0043E850 /* GPUComputePipelineState.cpp */,
+                                381E35EC1E8E23E40043E850 /* GPUComputePipelineState.h */,
</ins><span class="cx">                                 316BDBF41E762ACD00DE0D5A /* GPUDepthStencilDescriptor.cpp */,
</span><span class="cx">                                 316BDBF51E762ACD00DE0D5A /* GPUDepthStencilDescriptor.h */,
</span><span class="cx">                                 316BDBEE1E76291B00DE0D5A /* GPUDepthStencilState.cpp */,
</span><span class="lines">@@ -18055,6 +18103,7 @@
</span><span class="cx">                                 316BDBFD1E762F5700DE0D5A /* GPURenderPipelineDescriptor.h */,
</span><span class="cx">                                 316BDBFE1E762F5700DE0D5A /* GPURenderPipelineState.cpp */,
</span><span class="cx">                                 316BDBFF1E762F5700DE0D5A /* GPURenderPipelineState.h */,
</span><ins>+                                381E35F61E8E4D0E0043E850 /* GPUSize.h */,
</ins><span class="cx">                                 316BDBAF1E7354BB00DE0D5A /* GPUTexture.cpp */,
</span><span class="cx">                                 316BDBB01E7354BB00DE0D5A /* GPUTexture.h */,
</span><span class="cx">                                 316BDBB51E7357CB00DE0D5A /* GPUTextureDescriptor.cpp */,
</span><span class="lines">@@ -21373,6 +21422,10 @@
</span><span class="cx">                                 31A089201E738D59003B6609 /* JSWebGPUCommandBuffer.h */,
</span><span class="cx">                                 31A089211E738D59003B6609 /* JSWebGPUCommandQueue.cpp */,
</span><span class="cx">                                 31A089231E738D59003B6609 /* JSWebGPUCommandQueue.h */,
</span><ins>+                                38F23AAE1E8E83C400CE46F5 /* JSWebGPUComputeCommandEncoder.cpp */,
+                                38F23AB01E8E83D000CE46F5 /* JSWebGPUComputeCommandEncoder.h */,
+                                38F23AB11E8E83D000CE46F5 /* JSWebGPUComputePipelineState.cpp */,
+                                38F23AB21E8E83D000CE46F5 /* JSWebGPUComputePipelineState.h */,
</ins><span class="cx">                                 31A089241E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.cpp */,
</span><span class="cx">                                 31A089261E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.h */,
</span><span class="cx">                                 31A089271E738D59003B6609 /* JSWebGPUDepthStencilState.cpp */,
</span><span class="lines">@@ -21401,6 +21454,8 @@
</span><span class="cx">                                 31A0894A1E738D59003B6609 /* JSWebGPURenderPipelineDescriptor.h */,
</span><span class="cx">                                 31A0894B1E738D59003B6609 /* JSWebGPURenderPipelineState.cpp */,
</span><span class="cx">                                 31A0894D1E738D59003B6609 /* JSWebGPURenderPipelineState.h */,
</span><ins>+                                387AE9581E8E92EF0000DE96 /* JSWebGPUSize.cpp */,
+                                387AE9591E8E92EF0000DE96 /* JSWebGPUSize.h */,
</ins><span class="cx">                                 31A0894E1E738D59003B6609 /* JSWebGPUTexture.cpp */,
</span><span class="cx">                                 31A089501E738D59003B6609 /* JSWebGPUTexture.h */,
</span><span class="cx">                                 31A089511E738D59003B6609 /* JSWebGPUTextureDescriptor.cpp */,
</span><span class="lines">@@ -23198,6 +23253,8 @@
</span><span class="cx">                                 316BDBA51E71FA6F00DE0D5A /* GPUBufferMetal.mm */,
</span><span class="cx">                                 316BDBC61E75EE3D00DE0D5A /* GPUCommandBufferMetal.mm */,
</span><span class="cx">                                 316BDBBD1E73881300DE0D5A /* GPUCommandQueueMetal.mm */,
</span><ins>+                                381E35E91E8E20AC0043E850 /* GPUComputeCommandEncoderMetal.mm */,
+                                381E35EE1E8E24CB0043E850 /* GPUComputePipelineStateMetal.mm */,
</ins><span class="cx">                                 316BDBF81E762BEF00DE0D5A /* GPUDepthStencilDescriptorMetal.mm */,
</span><span class="cx">                                 316BDBF21E76293700DE0D5A /* GPUDepthStencilStateMetal.mm */,
</span><span class="cx">                                 316BDB881E6E141C00DE0D5A /* GPUDeviceMetal.mm */,
</span><span class="lines">@@ -28117,6 +28174,8 @@
</span><span class="cx">                                 31A089561E738D59003B6609 /* JSWebGPUBuffer.h in Headers */,
</span><span class="cx">                                 31A089591E738D59003B6609 /* JSWebGPUCommandBuffer.h in Headers */,
</span><span class="cx">                                 31A0895C1E738D59003B6609 /* JSWebGPUCommandQueue.h in Headers */,
</span><ins>+                                38F23AB31E8E83D000CE46F5 /* JSWebGPUComputeCommandEncoder.h in Headers */,
+                                38F23AB51E8E83D000CE46F5 /* JSWebGPUComputePipelineState.h in Headers */,
</ins><span class="cx">                                 31A0895F1E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.h in Headers */,
</span><span class="cx">                                 31A089621E738D59003B6609 /* JSWebGPUDepthStencilState.h in Headers */,
</span><span class="cx">                                 31A089651E738D59003B6609 /* JSWebGPUDrawable.h in Headers */,
</span><span class="lines">@@ -28131,6 +28190,7 @@
</span><span class="cx">                                 31A089801E738D5A003B6609 /* JSWebGPURenderPipelineColorAttachmentDescriptor.h in Headers */,
</span><span class="cx">                                 31A089831E738D5A003B6609 /* JSWebGPURenderPipelineDescriptor.h in Headers */,
</span><span class="cx">                                 31A089861E738D5A003B6609 /* JSWebGPURenderPipelineState.h in Headers */,
</span><ins>+                                387AE95B1E8E92EF0000DE96 /* JSWebGPUSize.h in Headers */,
</ins><span class="cx">                                 31A089891E738D5A003B6609 /* JSWebGPUTexture.h in Headers */,
</span><span class="cx">                                 31A0898C1E738D5A003B6609 /* JSWebGPUTextureDescriptor.h in Headers */,
</span><span class="cx">                                 31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */,
</span><span class="lines">@@ -31036,6 +31096,10 @@
</span><span class="cx">                                 316BDBC81E75F08D00DE0D5A /* GPUCommandBufferMetal.mm in Sources */,
</span><span class="cx">                                 316BDBBB1E73880600DE0D5A /* GPUCommandQueue.cpp in Sources */,
</span><span class="cx">                                 316BDBBE1E73881300DE0D5A /* GPUCommandQueueMetal.mm in Sources */,
</span><ins>+                                389117431E8F4BF00061033E /* GPUComputeCommandEncoder.cpp in Sources */,
+                                389117411E8F4BF00061033E /* GPUComputeCommandEncoderMetal.mm in Sources */,
+                                389117441E8F4BF00061033E /* GPUComputePipelineState.cpp in Sources */,
+                                389117421E8F4BF00061033E /* GPUComputePipelineStateMetal.mm in Sources */,
</ins><span class="cx">                                 316BDBF61E762AD100DE0D5A /* GPUDepthStencilDescriptor.cpp in Sources */,
</span><span class="cx">                                 316BDBF91E762BF400DE0D5A /* GPUDepthStencilDescriptorMetal.mm in Sources */,
</span><span class="cx">                                 316BDBF11E76292500DE0D5A /* GPUDepthStencilState.cpp in Sources */,
</span><span class="lines">@@ -31086,7 +31150,6 @@
</span><span class="cx">                                 E112F4711E3A861200D6CDFD /* Grid.cpp in Sources */,
</span><span class="cx">                                 E175BA991E8AE3380071454F /* GridPosition.cpp in Sources */,
</span><span class="cx">                                 CDF7483E18FEBCEC0006ECC0 /* GridPositionsResolver.cpp in Sources */,
</span><del>-                                316DCB4B1E7910A6001B5F87 /* JSRTCIceConnectionState.cpp in Sources */,
</del><span class="cx">                                 E12DE7171E4B749C00F9ACCF /* GridTrackSizingAlgorithm.cpp in Sources */,
</span><span class="cx">                                 F55B3DBF1251F12D003EF269 /* HiddenInputType.cpp in Sources */,
</span><span class="cx">                                 515BE19B1D54F6C100DD7C68 /* HIDGamepad.cpp in Sources */,
</span><span class="lines">@@ -31467,7 +31530,6 @@
</span><span class="cx">                                 94E839551DFB2BC4007BC6A7 /* JSCSSNamespaceRule.cpp in Sources */,
</span><span class="cx">                                 BC46C2020C0DDC8F0020CFC3 /* JSCSSPageRule.cpp in Sources */,
</span><span class="cx">                                 14CF7B3309F6ECD700EB3665 /* JSCSSRule.cpp in Sources */,
</span><del>-                                316DCB4D1E7910A6001B5F87 /* JSRTCIceGatheringState.cpp in Sources */,
</del><span class="cx">                                 BC46C1EE0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp in Sources */,
</span><span class="cx">                                 A8D05FA70A23B301005E7203 /* JSCSSRuleList.cpp in Sources */,
</span><span class="cx">                                 9392262F10321084006E7D5D /* JSCSSRuleListCustom.cpp in Sources */,
</span><span class="lines">@@ -31848,9 +31910,12 @@
</span><span class="cx">                                 07969DAF17D14151007FF842 /* JSRTCDTMFSender.cpp in Sources */,
</span><span class="cx">                                 07969DB117D14151007FF842 /* JSRTCDTMFToneChangeEvent.cpp in Sources */,
</span><span class="cx">                                 07969DB517D14151007FF842 /* JSRTCIceCandidate.cpp in Sources */,
</span><del>-                                07969DB717D14151007FF842 /* JSRTCPeerConnectionIceEvent.cpp in Sources */,
</del><ins>+                                316DCB4B1E7910A6001B5F87 /* JSRTCIceConnectionState.cpp in Sources */,
+                                316DCB4D1E7910A6001B5F87 /* JSRTCIceGatheringState.cpp in Sources */,
</ins><span class="cx">                                 073794EB19EE341E00E5A045 /* JSRTCIceServer.cpp in Sources */,
</span><ins>+                                316DCB321E78FB70001B5F87 /* JSRTCOfferOptions.cpp in Sources */,
</ins><span class="cx">                                 07969DB917D14151007FF842 /* JSRTCPeerConnection.cpp in Sources */,
</span><ins>+                                07969DB717D14151007FF842 /* JSRTCPeerConnectionIceEvent.cpp in Sources */,
</ins><span class="cx">                                 5E2C43711BCF0D750001E2BC /* JSRTCRtpReceiver.cpp in Sources */,
</span><span class="cx">                                 5E2C43731BCF0D750001E2BC /* JSRTCRtpSender.cpp in Sources */,
</span><span class="cx">                                 5E2C43731BCF0D750001E2BE /* JSRTCRtpParameters.cpp in Sources */,
</span><span class="lines">@@ -32107,7 +32172,10 @@
</span><span class="cx">                                 77EF62F312F9DB7400C77BD2 /* JSWebGLVertexArrayObjectOES.cpp in Sources */,
</span><span class="cx">                                 31A089541E738D59003B6609 /* JSWebGPUBuffer.cpp in Sources */,
</span><span class="cx">                                 31A089571E738D59003B6609 /* JSWebGPUCommandBuffer.cpp in Sources */,
</span><ins>+                                38850C531E964C1100C60753 /* JSWebGPUCommandBufferCustom.cpp in Sources */,
</ins><span class="cx">                                 31A0895A1E738D59003B6609 /* JSWebGPUCommandQueue.cpp in Sources */,
</span><ins>+                                38F23AAF1E8E83C400CE46F5 /* JSWebGPUComputeCommandEncoder.cpp in Sources */,
+                                38F23AB41E8E83D000CE46F5 /* JSWebGPUComputePipelineState.cpp in Sources */,
</ins><span class="cx">                                 31A0895D1E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.cpp in Sources */,
</span><span class="cx">                                 31A089601E738D59003B6609 /* JSWebGPUDepthStencilState.cpp in Sources */,
</span><span class="cx">                                 31A089631E738D59003B6609 /* JSWebGPUDrawable.cpp in Sources */,
</span><span class="lines">@@ -32124,6 +32192,7 @@
</span><span class="cx">                                 31A0897E1E738D5A003B6609 /* JSWebGPURenderPipelineColorAttachmentDescriptor.cpp in Sources */,
</span><span class="cx">                                 31A089811E738D5A003B6609 /* JSWebGPURenderPipelineDescriptor.cpp in Sources */,
</span><span class="cx">                                 31A089841E738D5A003B6609 /* JSWebGPURenderPipelineState.cpp in Sources */,
</span><ins>+                                387AE95A1E8E92EF0000DE96 /* JSWebGPUSize.cpp in Sources */,
</ins><span class="cx">                                 31A089871E738D5A003B6609 /* JSWebGPUTexture.cpp in Sources */,
</span><span class="cx">                                 31A0898A1E738D5A003B6609 /* JSWebGPUTextureDescriptor.cpp in Sources */,
</span><span class="cx">                                 31C0FF3D0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp in Sources */,
</span><span class="lines">@@ -32183,7 +32252,6 @@
</span><span class="cx">                                 A456FA2611AD4A830020B420 /* LabelsNodeList.cpp in Sources */,
</span><span class="cx">                                 E18772F1126E2629003DD586 /* Language.cpp in Sources */,
</span><span class="cx">                                 2917B5611473496C0052C9D0 /* LayerFlushScheduler.cpp in Sources */,
</span><del>-                                316DCB321E78FB70001B5F87 /* JSRTCOfferOptions.cpp in Sources */,
</del><span class="cx">                                 2917B566147349950052C9D0 /* LayerFlushSchedulerMac.cpp in Sources */,
</span><span class="cx">                                 7AA3A69F194B59B6001CBD24 /* LayerPool.cpp in Sources */,
</span><span class="cx">                                 0F36E7371BD1837A002DB891 /* LayoutPoint.cpp in Sources */,
</span><span class="lines">@@ -33439,6 +33507,8 @@
</span><span class="cx">                                 31A089041E737D51003B6609 /* WebGPUBuffer.cpp in Sources */,
</span><span class="cx">                                 31A089051E737D51003B6609 /* WebGPUCommandBuffer.cpp in Sources */,
</span><span class="cx">                                 31A089061E737D51003B6609 /* WebGPUCommandQueue.cpp in Sources */,
</span><ins>+                                389D1E1E1E8F2B9E009795B9 /* WebGPUComputeCommandEncoder.cpp in Sources */,
+                                389D1E1F1E8F2B9F009795B9 /* WebGPUComputePipelineState.cpp in Sources */,
</ins><span class="cx">                                 31A089071E737D51003B6609 /* WebGPUDepthStencilDescriptor.cpp in Sources */,
</span><span class="cx">                                 31A089081E737D51003B6609 /* WebGPUDepthStencilState.cpp in Sources */,
</span><span class="cx">                                 31A089091E737D51003B6609 /* WebGPUDrawable.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWebGPUCommandBufferCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSWebGPUCommandBufferCustom.cpp (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWebGPUCommandBufferCustom.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSWebGPUCommandBufferCustom.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "JSWebGPUCommandBuffer.h"
+
+#if ENABLE(WEBGPU)
+
+#include "GPUCommandBuffer.h"
+#include "JSDOMPromise.h"
+#include "JSDOMWrapper.h"
+#include <runtime/JSCJSValue.h>
+
+namespace WebCore {
+
+JSC::JSValue JSWebGPUCommandBuffer::completed(JSC::ExecState& state) const
+{
+ if (!m_completed) {
+ auto promise = createDeferredPromise(state, domWindow());
+
+ if (!wrapped().commandBuffer())
+ return JSC::jsUndefined();
+
+ m_completed.set(state.vm(), this, promise->promise());
+ wrapped().commandBuffer()->completed(WTFMove(promise));
+ }
+
+ return m_completed.get();
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUCommandBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -32,6 +33,7 @@
</span><span class="cx"> #include "GPUCommandQueue.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "WebGPUCommandQueue.h"
</span><ins>+#include "WebGPUComputeCommandEncoder.h"
</ins><span class="cx"> #include "WebGPUDrawable.h"
</span><span class="cx"> #include "WebGPURenderCommandEncoder.h"
</span><span class="cx"> #include "WebGPURenderPassDescriptor.h"
</span><span class="lines">@@ -80,6 +82,12 @@
</span><span class="cx"> return commandEncoder;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+RefPtr<WebGPUComputeCommandEncoder> WebGPUCommandBuffer::createComputeCommandEncoder()
+{
+ RefPtr<WebGPUComputeCommandEncoder> commandEncoder = WebGPUComputeCommandEncoder::create(this->context(), this);
+ return commandEncoder;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUCommandBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.h (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.h        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -39,6 +40,7 @@
</span><span class="cx"> class WebGPUFunction;
</span><span class="cx"> class WebGPURenderCommandEncoder;
</span><span class="cx"> class WebGPURenderPassDescriptor;
</span><ins>+class WebGPUComputeCommandEncoder;
</ins><span class="cx">
</span><span class="cx"> class WebGPUCommandBuffer : public WebGPUObject {
</span><span class="cx"> public:
</span><span class="lines">@@ -49,6 +51,7 @@
</span><span class="cx"> void presentDrawable(WebGPUDrawable&);
</span><span class="cx">
</span><span class="cx"> RefPtr<WebGPURenderCommandEncoder> createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor&);
</span><ins>+ RefPtr<WebGPUComputeCommandEncoder> createComputeCommandEncoder();
</ins><span class="cx">
</span><span class="cx"> GPUCommandBuffer* commandBuffer() { return m_commandBuffer.get(); }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,7 +30,9 @@
</span><span class="cx"> ] interface WebGPUCommandBuffer {
</span><span class="cx">
</span><span class="cx"> WebGPURenderCommandEncoder createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor descriptor);
</span><ins>+ WebGPUComputeCommandEncoder createComputeCommandEncoder();
</ins><span class="cx"> void commit();
</span><span class="cx"> void presentDrawable(WebGPUDrawable drawable);
</span><ins>+ [CachedAttribute, CustomGetter] readonly attribute Promise<void> completed;
</ins><span class="cx">
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUComputeCommandEncodercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "WebGPUComputeCommandEncoder.h"
+
+#if ENABLE(WEBGPU)
+
+#include "GPUCommandBuffer.h"
+#include "GPUComputeCommandEncoder.h"
+#include "GPUSize.h"
+#include "WebGPUBuffer.h"
+#include "WebGPUCommandBuffer.h"
+#include "WebGPUComputePipelineState.h"
+#include "WebGPURenderingContext.h"
+
+namespace WebCore {
+
+inline GPUSize GPUSizeMake(WebGPUSize size)
+{
+ return {size.width, size.height, size.depth};
+}
+
+Ref<WebGPUComputeCommandEncoder> WebGPUComputeCommandEncoder::create(WebGPURenderingContext* context, WebGPUCommandBuffer* buffer)
+{
+ return adoptRef(*new WebGPUComputeCommandEncoder(context, buffer));
+}
+
+WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder(WebGPURenderingContext* context, WebGPUCommandBuffer* buffer)
+ : WebGPUObject(context)
+{
+ m_computeCommandEncoder = buffer->commandBuffer()->createComputeCommandEncoder();
+}
+
+WebGPUComputeCommandEncoder::~WebGPUComputeCommandEncoder()
+{
+}
+
+void WebGPUComputeCommandEncoder::setComputePipelineState(WebGPUComputePipelineState& pipelineState)
+{
+ if (!m_computeCommandEncoder)
+ return;
+ m_computeCommandEncoder->setComputePipelineState(pipelineState.computePipelineState());
+}
+
+void WebGPUComputeCommandEncoder::setBuffer(WebGPUBuffer& buffer, unsigned offset, unsigned index)
+{
+ if (!m_computeCommandEncoder)
+ return;
+ m_computeCommandEncoder->setBuffer(buffer.buffer(), offset, index);
+}
+
+void WebGPUComputeCommandEncoder::dispatch(WebGPUSize threadgroupsPerGrid, WebGPUSize threadsPerThreadgroup)
+{
+ if (!m_computeCommandEncoder)
+ return;
+ m_computeCommandEncoder->dispatch(GPUSizeMake(threadgroupsPerGrid), GPUSizeMake(threadsPerThreadgroup));
+}
+
+void WebGPUComputeCommandEncoder::endEncoding()
+{
+ if (!m_computeCommandEncoder)
+ return;
+ m_computeCommandEncoder->endEncoding();
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUComputeCommandEncoderhfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.h) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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
+
+#include "WebGPUSize.h"
+
+#if ENABLE(WEBGPU)
+
+#include "WebGPUObject.h"
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class GPUComputeCommandEncoder;
+class WebGPUBuffer;
+class WebGPUCommandBuffer;
+class WebGPUComputePipelineState;
+class WebGPURenderingContext;
+
+class WebGPUComputeCommandEncoder : public WebGPUObject {
+
+public:
+ virtual ~WebGPUComputeCommandEncoder();
+ static Ref<WebGPUComputeCommandEncoder> create(WebGPURenderingContext*, WebGPUCommandBuffer*);
+
+ void setComputePipelineState(WebGPUComputePipelineState&);
+ void setBuffer(WebGPUBuffer&, unsigned, unsigned);
+ void dispatch(WebGPUSize, WebGPUSize);
+ void endEncoding();
+
+ GPUComputeCommandEncoder* computeCommandEncoder() { return m_computeCommandEncoder.get(); }
+
+private:
+ WebGPUComputeCommandEncoder(WebGPURenderingContext*, WebGPUCommandBuffer*);
+ RefPtr<GPUComputeCommandEncoder> m_computeCommandEncoder;
+};
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUComputeCommandEncoderidlfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+[
+ Conditional=WEBGPU,
+ EnabledAtRuntime=WebGPU
+] interface WebGPUComputeCommandEncoder {
+
+ void setComputePipelineState(WebGPUComputePipelineState pipelineState);
+ void setBuffer(WebGPUBuffer buffer, unsigned long offset, unsigned long index);
+ void dispatch(WebGPUSize threadgroupsPerGrid, WebGPUSize threadsPerThreadgroup);
+
+ void endEncoding();
+
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUComputePipelineStatecppfromrev215130trunkSourceWebCoreplatformgraphicsgpuGPUCommandBuffercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp (from rev 215130, trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "WebGPUComputePipelineState.h"
+
+#if ENABLE(WEBGPU)
+
+#include "GPUComputePipelineState.h"
+#include "WebGPUFunction.h"
+#include "WebGPURenderingContext.h"
+
+namespace WebCore {
+
+Ref<WebGPUComputePipelineState> WebGPUComputePipelineState::create(WebGPURenderingContext* context, WebGPUFunction* function)
+{
+ return adoptRef(*new WebGPUComputePipelineState(context, function));
+}
+
+WebGPUComputePipelineState::WebGPUComputePipelineState(WebGPURenderingContext* context, WebGPUFunction* function)
+ : WebGPUObject(context)
+{
+ if (!context || !function)
+ return;
+ m_computePipelineState = GPUComputePipelineState::create(context->device().get(), function->function());
+}
+
+WebGPUComputePipelineState::~WebGPUComputePipelineState()
+{
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUComputePipelineStatehfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.h (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.h) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.h         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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 "WebGPUObject.h"
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class GPUComputePipelineState;
+class WebGPUFunction;
+
+class WebGPUComputePipelineState : public WebGPUObject {
+public:
+ virtual ~WebGPUComputePipelineState();
+ static Ref<WebGPUComputePipelineState> create(WebGPURenderingContext*, WebGPUFunction*);
+ GPUComputePipelineState* computePipelineState() { return m_computePipelineState.get(); }
+
+private:
+ WebGPUComputePipelineState(WebGPURenderingContext*, WebGPUFunction*);
+ RefPtr<GPUComputePipelineState> m_computePipelineState;
+};
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUComputePipelineStateidlfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.idl (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.idl         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUComputePipelineState.idl        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+[
+ Conditional=WEBGPU,
+ EnabledAtRuntime=WebGPU
+] interface WebGPUComputePipelineState {
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPURenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGPURenderingContext.cpp (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPURenderingContext.cpp        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/html/canvas/WebGPURenderingContext.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -33,9 +34,11 @@
</span><span class="cx"> #include "GPUDevice.h"
</span><span class="cx"> #include "WebGPUBuffer.h"
</span><span class="cx"> #include "WebGPUCommandQueue.h"
</span><ins>+#include "WebGPUComputePipelineState.h"
</ins><span class="cx"> #include "WebGPUDepthStencilDescriptor.h"
</span><span class="cx"> #include "WebGPUDepthStencilState.h"
</span><span class="cx"> #include "WebGPUDrawable.h"
</span><ins>+#include "WebGPUFunction.h"
</ins><span class="cx"> #include "WebGPULibrary.h"
</span><span class="cx"> #include "WebGPURenderPassDescriptor.h"
</span><span class="cx"> #include "WebGPURenderPipelineDescriptor.h"
</span><span class="lines">@@ -159,6 +162,12 @@
</span><span class="cx"> return state;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+RefPtr<WebGPUComputePipelineState> WebGPURenderingContext::createComputePipelineState(WebGPUFunction& function)
+{
+ RefPtr<WebGPUComputePipelineState> state = WebGPUComputePipelineState::create(this, &function);
+ return state;
+}
+
</ins><span class="cx"> RefPtr<WebGPUCommandQueue> WebGPURenderingContext::createCommandQueue()
</span><span class="cx"> {
</span><span class="cx"> RefPtr<WebGPUCommandQueue> queue = WebGPUCommandQueue::create(this);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPURenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGPURenderingContext.h (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPURenderingContext.h        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/html/canvas/WebGPURenderingContext.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -34,6 +35,8 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class WebGPUCommandQueue;
</span><ins>+class WebGPUComputePipelineState;
+class WebGPUFunction;
</ins><span class="cx"> class WebGPULibrary;
</span><span class="cx"> class WebGPURenderPipelineDescriptor;
</span><span class="cx"> class WebGPURenderPipelineState;
</span><span class="lines">@@ -67,6 +70,8 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<WebGPUDepthStencilState> createDepthStencilState(WebGPUDepthStencilDescriptor&);
</span><span class="cx">
</span><ins>+ RefPtr<WebGPUComputePipelineState> createComputePipelineState(WebGPUFunction&);
+
</ins><span class="cx"> RefPtr<WebGPUCommandQueue> createCommandQueue();
</span><span class="cx">
</span><span class="cx"> RefPtr<WebGPUDrawable> nextDrawable();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPURenderingContextidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGPURenderingContext.idl (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPURenderingContext.idl        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/html/canvas/WebGPURenderingContext.idl        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -99,6 +100,7 @@
</span><span class="cx">
</span><span class="cx"> WebGPURenderPipelineState? createRenderPipelineState(WebGPURenderPipelineDescriptor descriptor);
</span><span class="cx"> WebGPUDepthStencilState? createDepthStencilState(WebGPUDepthStencilDescriptor descriptor);
</span><ins>+ WebGPUComputePipelineState? createComputePipelineState(WebGPUFunction function);
</ins><span class="cx">
</span><span class="cx"> WebGPUCommandQueue? createCommandQueue();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUSizehfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUSize.h (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUSize.h         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUSize.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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)
+
+namespace WebCore {
+
+struct WebGPUSize {
+ unsigned long width;
+ unsigned long height;
+ unsigned long depth;
+};
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGPUSizeidlfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGPUSize.idl (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGPUSize.idl         (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGPUSize.idl        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+[
+ Conditional=WEBGPU,
+ EnabledAtRuntime=WebGPU
+] dictionary WebGPUSize {
+ unsigned long width;
+ unsigned long height;
+ unsigned long depth;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaGPUCommandBufferMetalmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandBufferMetal.mm (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandBufferMetal.mm        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandBufferMetal.mm        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -69,6 +69,20 @@
</span><span class="cx"> [m_commandBuffer commit];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void GPUCommandBuffer::completed(Ref<DeferredPromise>&& passedPromise)
+{
+ if (!m_commandBuffer)
+ return;
+
+ RefPtr<DeferredPromise> promise(WTFMove(passedPromise));
+
+ [m_commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>) {
+ callOnMainThread([promise] {
+ promise->resolve();
+ });
+ }];
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaGPUComputeCommandEncoderMetalmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#import "config.h"
+#import "GPUComputeCommandEncoder.h"
+
+#if ENABLE(WEBGPU)
+
+#import "GPUBuffer.h"
+#import "GPUCommandBuffer.h"
+#import "GPUComputePipelineState.h"
+#import "GPUSize.h"
+#import "Logging.h"
+
+#import <Metal/Metal.h>
+
+namespace WebCore {
+
+inline MTLSize MTLSizeMake(GPUSize size)
+{
+ return {size.width, size.height, size.depth};
+}
+
+GPUComputeCommandEncoder::GPUComputeCommandEncoder(GPUCommandBuffer* buffer)
+{
+ LOG(WebGPU, "GPUComputeCommandEncoder::GPUComputeCommandEncoder()");
+
+ if (!buffer || !buffer->platformCommandBuffer())
+ return;
+
+ m_computeCommandEncoder = (MTLComputeCommandEncoder *)[buffer->platformCommandBuffer() computeCommandEncoder];
+}
+
+void GPUComputeCommandEncoder::setComputePipelineState(GPUComputePipelineState* computePipelineState)
+{
+ if (!m_computeCommandEncoder || !computePipelineState)
+ return;
+
+ [m_computeCommandEncoder setComputePipelineState:static_cast<id<MTLComputePipelineState>>(computePipelineState->platformComputePipelineState())];
+}
+
+void GPUComputeCommandEncoder::setBuffer(GPUBuffer* buffer, unsigned offset, unsigned index)
+{
+ if (!m_computeCommandEncoder || !buffer)
+ return;
+
+ [m_computeCommandEncoder setBuffer:static_cast<id<MTLBuffer>>(buffer->platformBuffer()) offset:offset atIndex:index];
+}
+
+void GPUComputeCommandEncoder::dispatch(GPUSize threadgroupsPerGrid, GPUSize threadsPerThreadgroup)
+{
+ if (!m_computeCommandEncoder)
+ return;
+
+ [m_computeCommandEncoder dispatchThreadgroups:MTLSizeMake(threadgroupsPerGrid) threadsPerThreadgroup:MTLSizeMake(threadsPerThreadgroup)];
+}
+
+void GPUComputeCommandEncoder::endEncoding()
+{
+ [m_computeCommandEncoder endEncoding];
+}
+
+MTLComputeCommandEncoder *GPUComputeCommandEncoder::platformComputeCommandEncoder()
+{
+ return m_computeCommandEncoder.get();
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaGPUComputePipelineStateMetalmmfromrev215130trunkSourceWebCoreplatformgraphicsgpuGPUCommandBuffercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/cocoa/GPUComputePipelineStateMetal.mm (from rev 215130, trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/GPUComputePipelineStateMetal.mm         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GPUComputePipelineStateMetal.mm        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#import "config.h"
+#import "GPUComputePipelineState.h"
+
+#if ENABLE(WEBGPU)
+
+#import "GPUDevice.h"
+#import "GPUFunction.h"
+#import "Logging.h"
+
+#import <Metal/Metal.h>
+
+namespace WebCore {
+
+GPUComputePipelineState::GPUComputePipelineState(GPUDevice* device, GPUFunction* function)
+{
+ LOG(WebGPU, "GPUComputePipelineState::GPUComputePipelineState()");
+
+ if (!device || !device->platformDevice() || !function || !function->platformFunction())
+ return;
+
+ m_computePipelineState = adoptNS((MTLComputePipelineState *)[device->platformDevice() newComputePipelineStateWithFunction:(id<MTLFunction>)function->platformFunction() error:nil]);
+}
+
+MTLComputePipelineState *GPUComputePipelineState::platformComputePipelineState()
+{
+ return m_computePipelineState.get();
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUCommandBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,6 +30,7 @@
</span><span class="cx"> #if ENABLE(WEBGPU)
</span><span class="cx">
</span><span class="cx"> #include "GPUCommandQueue.h"
</span><ins>+#include "GPUComputeCommandEncoder.h"
</ins><span class="cx"> #include "GPUDevice.h"
</span><span class="cx"> #include "GPURenderCommandEncoder.h"
</span><span class="cx"> #include "GPURenderPassDescriptor.h"
</span><span class="lines">@@ -52,10 +54,19 @@
</span><span class="cx"> return GPURenderCommandEncoder::create(this, descriptor);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+RefPtr<GPUComputeCommandEncoder> GPUCommandBuffer::createComputeCommandEncoder()
+{
+ return GPUComputeCommandEncoder::create(this);
+}
+
</ins><span class="cx"> #if !PLATFORM(COCOA)
</span><span class="cx"> void GPUCommandBuffer::presentDrawable(GPUDrawable*)
</span><span class="cx"> {
</span><span class="cx"> }
</span><ins>+
+void GPUCommandBuffer::completed(Ref<DeferredPromise>&&);
+{
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUCommandBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h (215130 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h        2017-04-08 00:00:45 UTC (rev 215130)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2017 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -27,6 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEBGPU)
</span><span class="cx">
</span><ins>+#include "JSDOMPromise.h"
+
</ins><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="lines">@@ -38,6 +41,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class GPUCommandQueue;
</span><ins>+class GPUComputeCommandEncoder;
</ins><span class="cx"> class GPUDrawable;
</span><span class="cx"> class GPURenderCommandEncoder;
</span><span class="cx"> class GPURenderPassDescriptor;
</span><span class="lines">@@ -51,6 +55,8 @@
</span><span class="cx"> WEBCORE_EXPORT void presentDrawable(GPUDrawable*);
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT RefPtr<GPURenderCommandEncoder> createRenderCommandEncoder(GPURenderPassDescriptor*);
</span><ins>+ WEBCORE_EXPORT RefPtr<GPUComputeCommandEncoder> createComputeCommandEncoder();
+ WEBCORE_EXPORT void completed(Ref<DeferredPromise>&&);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> WEBCORE_EXPORT MTLCommandBuffer *platformCommandBuffer();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUComputeCommandEncodercppfromrev215130trunkSourceWebCoreplatformgraphicsgpuGPUCommandBuffercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.cpp (from rev 215130, trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "GPUComputeCommandEncoder.h"
+
+#if ENABLE(WEBGPU)
+
+#include "GPUBuffer.h"
+#include "GPUCommandBuffer.h"
+#include "GPUComputePipelineState.h"
+#include "Logging.h"
+
+namespace WebCore {
+
+RefPtr<GPUComputeCommandEncoder> GPUComputeCommandEncoder::create(GPUCommandBuffer* buffer)
+{
+ RefPtr<GPUComputeCommandEncoder> encoder = adoptRef(new GPUComputeCommandEncoder(buffer));
+ return encoder;
+}
+
+GPUComputeCommandEncoder::~GPUComputeCommandEncoder()
+{
+ LOG(WebGPU, "GPUComputeCommandEncoder::~GPUComputeCommandEncoder()");
+}
+
+#if !PLATFORM(COCOA)
+void GPUComputeCommandEncoder::setComputePipelineState(GPUComputePipelineState*)
+{
+}
+
+void GPUComputeCommandEncoder::setBuffer(GPUBuffer*, unsigned, unsigned)
+{
+}
+
+void GPUComputeCommandEncoder::dispatch(GPUSize threadgroupsPerGrid, GPUSize threadsPerThreadgroup);
+{
+}
+
+void GPUComputeCommandEncoder::endEncoding()
+{
+}
+#endif
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUComputeCommandEncoderhfromrev215130trunkSourceWebCoreplatformgraphicsgpuGPUCommandBufferh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.h (from rev 215130, trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUComputeCommandEncoder.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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 "GPUSize.h"
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/RetainPtr.h>
+
+#if PLATFORM(COCOA)
+OBJC_CLASS MTLComputeCommandEncoder;
+#endif
+
+namespace WebCore {
+
+class GPUBuffer;
+class GPUCommandBuffer;
+class GPUComputePipelineState;
+
+class GPUComputeCommandEncoder : public RefCounted<GPUComputeCommandEncoder> {
+public:
+ static RefPtr<GPUComputeCommandEncoder> create(GPUCommandBuffer*);
+ WEBCORE_EXPORT ~GPUComputeCommandEncoder();
+
+ WEBCORE_EXPORT void setComputePipelineState(GPUComputePipelineState*);
+ WEBCORE_EXPORT void setBuffer(GPUBuffer*, unsigned, unsigned);
+ WEBCORE_EXPORT void dispatch(GPUSize, GPUSize);
+ WEBCORE_EXPORT void endEncoding();
+
+#if PLATFORM(COCOA)
+ WEBCORE_EXPORT MTLComputeCommandEncoder *platformComputeCommandEncoder();
+#endif
+
+private:
+ GPUComputeCommandEncoder(GPUCommandBuffer*);
+
+#if PLATFORM(COCOA)
+ RetainPtr<MTLComputeCommandEncoder> m_computeCommandEncoder;
+#endif
+};
+
+} // namespace WebCore
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUComputePipelineStatecppfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.cpp (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.cpp        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "GPUComputePipelineState.h"
+
+#if ENABLE(WEBGPU)
+
+#include "GPUDevice.h"
+#include "Logging.h"
+
+namespace WebCore {
+
+RefPtr<GPUComputePipelineState> GPUComputePipelineState::create(GPUDevice* device, GPUFunction* function)
+{
+ RefPtr<GPUComputePipelineState> state = adoptRef(new GPUComputePipelineState(device, function));
+ return state;
+}
+
+GPUComputePipelineState::~GPUComputePipelineState()
+{
+ LOG(WebGPU, "GPUComputePipelineState::~GPUComputePipelineState()");
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUComputePipelineStatehfromrev215130trunkSourceWebCoreplatformgraphicsgpuGPUCommandBufferh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.h (from rev 215130, trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUComputePipelineState.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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 <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/RetainPtr.h>
+#include <wtf/text/WTFString.h>
+
+#if PLATFORM(COCOA)
+OBJC_CLASS MTLComputePipelineState;
+#endif
+
+namespace WebCore {
+
+class GPUDevice;
+class GPUFunction;
+
+class GPUComputePipelineState : public RefCounted<GPUComputePipelineState> {
+public:
+ static RefPtr<GPUComputePipelineState> create(GPUDevice*, GPUFunction*);
+ WEBCORE_EXPORT ~GPUComputePipelineState();
+
+#if PLATFORM(COCOA)
+ WEBCORE_EXPORT MTLComputePipelineState *platformComputePipelineState();
+#endif
+
+private:
+ GPUComputePipelineState(GPUDevice*, GPUFunction*);
+
+#if PLATFORM(COCOA)
+ RetainPtr<MTLComputePipelineState> m_computePipelineState;
+#endif
+};
+
+} // namespace WebCore
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUSizehfromrev215130trunkSourceWebCorehtmlcanvasWebGPUCommandBufferidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUSize.h (from rev 215130, trunk/Source/WebCore/html/canvas/WebGPUCommandBuffer.idl) (0 => 215131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUSize.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUSize.h        2017-04-08 00:21:26 UTC (rev 215131)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yuichiro Kikura (y.kikura@gmail.com)
+ *
+ * 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. ``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
+ * 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)
+
+namespace WebCore {
+
+struct GPUSize {
+ unsigned long width;
+ unsigned long height;
+ unsigned long depth;
+};
+
+} // namespace WebCore
+#endif
</ins></span></pre>
</div>
</div>
</body>
</html>