WebKit Bugzilla
Attachment 361829 Details for
Bug 194552
: [WebGPU] Remove WebGPUBufferDescriptor/Usage and use GPU versions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194552-20190212132921.patch (text/plain), 37.39 KB, created by
Justin Fan
on 2019-02-12 13:29:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Fan
Created:
2019-02-12 13:29:22 PST
Size:
37.39 KB
patch
obsolete
>Subversion Revision: 241276 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aa7fdbc84413c0afa991e63c41224b8808642ff9..26464c527adf54f731a584ce7c26ddc9ef765665 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,32 @@ >+2019-02-12 Justin Fan <justin_fan@apple.com> >+ >+ [WebGPU] Remove WebGPUBufferDescriptor/Usage and use GPU versions >+ https://bugs.webkit.org/show_bug.cgi?id=194552 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WebGPUBufferDescriptor/Usage have been renamed to GPUBufferDescriptor/Usage in the Web GPU API. >+ Consolidate the two versions of these classes in our implementation. >+ >+ Affected layout tests updated with new names. No change in behavior. >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources-output.xcfilelist: >+ * DerivedSources.make: >+ * Modules/webgpu/GPUBufferDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.idl. >+ * Modules/webgpu/GPUBufferUsage.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUBufferUsage.idl. >+ * Modules/webgpu/WebGPUBufferUsage.h: Removed. >+ * Modules/webgpu/WebGPUDevice.cpp: >+ (WebCore::WebGPUDevice::createBuffer const): >+ * Modules/webgpu/WebGPUDevice.h: >+ * Modules/webgpu/WebGPUDevice.idl: >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/WebCoreBuiltinNames.h: >+ * platform/graphics/gpu/GPUBufferDescriptor.h: Moved out GPUBufferUsage. >+ * platform/graphics/gpu/GPUBufferUsage.h: Moved from GPUBufferDescriptor.h. >+ > 2019-02-11 Alex Christensen <achristensen@webkit.org> > > Stop using setDefersLoading from WebCore >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 502974ba7ff8abf70f52fee326d0bc5bdc7d33cf..c60d43342f37f08cbb2d54d1472d8b27f97b7c4b 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -462,6 +462,8 @@ set(WebCore_NON_SVG_IDL_FILES > Modules/webdriver/NavigatorWebDriver.idl > > Modules/webgpu/DOMWindowWebGPU.idl >+ Modules/webgpu/GPUBufferDescriptor.idl >+ Modules/webgpu/GPUBufferUsage.idl > Modules/webgpu/GPUCompareFunction.idl > Modules/webgpu/GPUDepthStencilStateDescriptor.idl > Modules/webgpu/GPUExtent3D.idl >@@ -480,8 +482,6 @@ set(WebCore_NON_SVG_IDL_FILES > Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl > Modules/webgpu/WebGPUBuffer.idl > Modules/webgpu/WebGPUBufferBinding.idl >- Modules/webgpu/WebGPUBufferDescriptor.idl >- Modules/webgpu/WebGPUBufferUsage.idl > Modules/webgpu/WebGPUColor.idl > Modules/webgpu/WebGPUCommandBuffer.idl > Modules/webgpu/WebGPUDevice.idl >diff --git a/Source/WebCore/DerivedSources-input.xcfilelist b/Source/WebCore/DerivedSources-input.xcfilelist >index 4c3bc74d45ec52a5f0aa0ec4f2fd20b77a397527..656cd0cccfaa8b23f19c80eec7d67f334aedac14 100644 >--- a/Source/WebCore/DerivedSources-input.xcfilelist >+++ b/Source/WebCore/DerivedSources-input.xcfilelist >@@ -321,6 +321,8 @@ $(PROJECT_DIR)/Modules/webdatabase/SQLTransactionCallback.idl > $(PROJECT_DIR)/Modules/webdatabase/SQLTransactionErrorCallback.idl > $(PROJECT_DIR)/Modules/webdriver/NavigatorWebDriver.idl > $(PROJECT_DIR)/Modules/webgpu/DOMWindowWebGPU.idl >+$(PROJECT_DIR)/Modules/webgpu/GPUBufferDescriptor.idl >+$(PROJECT_DIR)/Modules/webgpu/GPUBufferUsage.idl > $(PROJECT_DIR)/Modules/webgpu/GPUCompareFunction.idl > $(PROJECT_DIR)/Modules/webgpu/GPUDepthStencilStateDescriptor.idl > $(PROJECT_DIR)/Modules/webgpu/GPUExtent3D.idl >diff --git a/Source/WebCore/DerivedSources-output.xcfilelist b/Source/WebCore/DerivedSources-output.xcfilelist >index 22fcf27376744b61fd4fc72f94e467f8615c4626..3c4568cf4a2032d9fa44a8a1796639b0ad6c19c6 100644 >--- a/Source/WebCore/DerivedSources-output.xcfilelist >+++ b/Source/WebCore/DerivedSources-output.xcfilelist >@@ -578,6 +578,10 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFontFaceSet.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFontFaceSet.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGCObservation.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGCObservation.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferDescriptor.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferDescriptor.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferUsage.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferUsage.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUCompareFunction.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUCompareFunction.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDepthStencilStateDescriptor.cpp >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index 0547279a42c115200703507f662378a54993f7f6..1dfc1c8734fcd85cccc62edc1de5cd858bdb061d 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -372,6 +372,8 @@ JS_BINDING_IDLS = \ > $(WebCore)/Modules/webdatabase/SQLTransactionErrorCallback.idl \ > $(WebCore)/Modules/webdriver/NavigatorWebDriver.idl \ > $(WebCore)/Modules/webgpu/DOMWindowWebGPU.idl \ >+ $(WebCore)/Modules/webgpu/GPUBufferDescriptor.idl \ >+ $(WebCore)/Modules/webgpu/GPUBufferUsage.idl \ > $(WebCore)/Modules/webgpu/GPUCompareFunction.idl \ > $(WebCore)/Modules/webgpu/GPUDepthStencilStateDescriptor.idl \ > $(WebCore)/Modules/webgpu/GPUExtent3D.idl \ >@@ -390,8 +392,6 @@ JS_BINDING_IDLS = \ > $(WebCore)/Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl \ > $(WebCore)/Modules/webgpu/WebGPUBuffer.idl \ > $(WebCore)/Modules/webgpu/WebGPUBufferBinding.idl \ >- $(WebCore)/Modules/webgpu/WebGPUBufferDescriptor.idl \ >- $(WebCore)/Modules/webgpu/WebGPUBufferUsage.idl \ > $(WebCore)/Modules/webgpu/WebGPUColor.idl \ > $(WebCore)/Modules/webgpu/WebGPUCommandBuffer.idl \ > $(WebCore)/Modules/webgpu/WebGPUDevice.idl \ >diff --git a/Source/WebCore/Modules/webgpu/GPUBufferDescriptor.idl b/Source/WebCore/Modules/webgpu/GPUBufferDescriptor.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..3786e356857249dcfff202ef3c487ff5a8de6056 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/GPUBufferDescriptor.idl >@@ -0,0 +1,36 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+// https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl >+ >+typedef unsigned long u32; >+typedef u32 GPUBufferUsageFlags; >+ >+[ >+ Conditional=WEBGPU, >+ EnabledAtRuntime=WebGPU >+] dictionary GPUBufferDescriptor { >+ u32 size; >+ GPUBufferUsageFlags usage; >+}; >diff --git a/Source/WebCore/Modules/webgpu/GPUBufferUsage.idl b/Source/WebCore/Modules/webgpu/GPUBufferUsage.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..48a88ec8aa862c28536897dec99bb0b8f93bd13c >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/GPUBufferUsage.idl >@@ -0,0 +1,44 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+// https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl >+ >+typedef unsigned long u32; >+ >+[ >+ Conditional=WEBGPU, >+ DoNotCheckConstants, >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable >+] interface GPUBufferUsage { >+ const u32 NONE = 0; >+ const u32 MAP_READ = 1; >+ const u32 MAP_WRITE = 2; >+ const u32 TRANSFER_SRC = 4; >+ const u32 TRANSFER_DST = 8; >+ const u32 INDEX = 16; >+ const u32 VERTEX = 32; >+ const u32 UNIFORM = 64; >+ const u32 STORAGE = 128; >+}; >diff --git a/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.h b/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.h >deleted file mode 100644 >index c01df95084b2001a13715e098d1d90d7745e72ef..0000000000000000000000000000000000000000 >--- a/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.h >+++ /dev/null >@@ -1,39 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-#if ENABLE(WEBGPU) >- >-#include "GPUBufferDescriptor.h" >- >-namespace WebCore { >- >-using WebGPUBufferDescriptor = GPUBufferDescriptor; >-using WebGPUBufferUsageFlags = GPUBufferUsageFlags; >- >-} // namespace WebCore >- >-#endif // ENABLE(WEBGPU) >diff --git a/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.idl b/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.idl >deleted file mode 100644 >index 13e121047656a48ab341734fb6950eec9ac786ca..0000000000000000000000000000000000000000 >--- a/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.idl >+++ /dev/null >@@ -1,36 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >-// https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl >- >-typedef unsigned long u32; >-typedef u32 WebGPUBufferUsageFlags; >- >-[ >- Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >-] dictionary WebGPUBufferDescriptor { >- u32 size; >- WebGPUBufferUsageFlags usage; >-}; >diff --git a/Source/WebCore/Modules/webgpu/WebGPUBufferUsage.h b/Source/WebCore/Modules/webgpu/WebGPUBufferUsage.h >deleted file mode 100644 >index b958cf30e4537a3e33a75b57032089c9f381d4bd..0000000000000000000000000000000000000000 >--- a/Source/WebCore/Modules/webgpu/WebGPUBufferUsage.h >+++ /dev/null >@@ -1,38 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-#if ENABLE(WEBGPU) >- >-#include "GPUBufferDescriptor.h" >- >-namespace WebCore { >- >-using WebGPUBufferUsage = GPUBufferUsage; >- >-} // namespace WebCore >- >-#endif // ENABLE(WEBGPU) >diff --git a/Source/WebCore/Modules/webgpu/WebGPUBufferUsage.idl b/Source/WebCore/Modules/webgpu/WebGPUBufferUsage.idl >deleted file mode 100644 >index ac37fac5d9872fe95f44e2280b9f6d05ada19db7..0000000000000000000000000000000000000000 >--- a/Source/WebCore/Modules/webgpu/WebGPUBufferUsage.idl >+++ /dev/null >@@ -1,42 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >-// https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl >- >-[ >- Conditional=WEBGPU, >- DoNotCheckConstants, >- EnabledAtRuntime=WebGPU, >- ImplementationLacksVTable >-] interface WebGPUBufferUsage { >- const u32 NONE = 0; >- const u32 MAP_READ = 1; >- const u32 MAP_WRITE = 2; >- const u32 TRANSFER_SRC = 4; >- const u32 TRANSFER_DST = 8; >- const u32 INDEX = 16; >- const u32 VERTEX = 32; >- const u32 UNIFORM = 64; >- const u32 STORAGE = 128; >-}; >diff --git a/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp b/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp >index 3c680284a48f0ae0e808ac448fea8d10805c392b..ea3b3c7a39ad15e93b256a405a54ec5847a5b727 100644 >--- a/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp >+++ b/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp >@@ -32,6 +32,7 @@ > #include "GPUBindGroupBinding.h" > #include "GPUBindGroupDescriptor.h" > #include "GPUBufferBinding.h" >+#include "GPUBufferDescriptor.h" > #include "GPUCommandBuffer.h" > #include "GPUPipelineStageDescriptor.h" > #include "GPURenderPipelineDescriptor.h" >@@ -72,10 +73,9 @@ WebGPUDevice::WebGPUDevice(Ref<WebGPUAdapter>&& adapter, Ref<GPUDevice>&& device > UNUSED_PARAM(m_adapter); > } > >-RefPtr<WebGPUBuffer> WebGPUDevice::createBuffer(WebGPUBufferDescriptor&& descriptor) const >+RefPtr<WebGPUBuffer> WebGPUDevice::createBuffer(GPUBufferDescriptor&& descriptor) const > { >- // FIXME: Validation on descriptor needed? >- if (auto buffer = m_device->createBuffer(GPUBufferDescriptor { descriptor.size, descriptor.usage })) >+ if (auto buffer = m_device->createBuffer(WTFMove(descriptor))) > return WebGPUBuffer::create(buffer.releaseNonNull()); > return nullptr; > } >diff --git a/Source/WebCore/Modules/webgpu/WebGPUDevice.h b/Source/WebCore/Modules/webgpu/WebGPUDevice.h >index 9cae3ae986266cc6f0c9984b784993a69ad6f051..a97485f8a2e5f0aeed26eacb6913d7d0c9a9ec9a 100644 >--- a/Source/WebCore/Modules/webgpu/WebGPUDevice.h >+++ b/Source/WebCore/Modules/webgpu/WebGPUDevice.h >@@ -30,7 +30,6 @@ > #include "GPUDevice.h" > #include "WebGPUAdapter.h" > #include "WebGPUBindGroupLayoutDescriptor.h" >-#include "WebGPUBufferDescriptor.h" > #include "WebGPUQueue.h" > > #include <wtf/Ref.h> >@@ -49,6 +48,7 @@ class WebGPURenderPipeline; > class WebGPUShaderModule; > class WebGPUTexture; > >+struct GPUBufferDescriptor; > struct GPUTextureDescriptor; > struct WebGPUBindGroupDescriptor; > struct WebGPUPipelineLayoutDescriptor; >@@ -62,7 +62,7 @@ public: > const WebGPUAdapter& adapter() const { return m_adapter.get(); } > const GPUDevice& device() const { return m_device.get(); } > >- RefPtr<WebGPUBuffer> createBuffer(WebGPUBufferDescriptor&&) const; >+ RefPtr<WebGPUBuffer> createBuffer(GPUBufferDescriptor&&) const; > Ref<WebGPUTexture> createTexture(GPUTextureDescriptor&&) const; > > Ref<WebGPUBindGroupLayout> createBindGroupLayout(WebGPUBindGroupLayoutDescriptor&&) const; >diff --git a/Source/WebCore/Modules/webgpu/WebGPUDevice.idl b/Source/WebCore/Modules/webgpu/WebGPUDevice.idl >index 8342a5d0abb5c5180c23c4a518b4ce6f918a8685..ffb574822d4e474d9e73219515811ca4c85dc150 100644 >--- a/Source/WebCore/Modules/webgpu/WebGPUDevice.idl >+++ b/Source/WebCore/Modules/webgpu/WebGPUDevice.idl >@@ -31,7 +31,7 @@ > ] interface WebGPUDevice { > readonly attribute WebGPUAdapter adapter; > >- WebGPUBuffer createBuffer(WebGPUBufferDescriptor descriptor); >+ WebGPUBuffer createBuffer(GPUBufferDescriptor descriptor); > WebGPUTexture createTexture(GPUTextureDescriptor descriptor); > > WebGPUBindGroupLayout createBindGroupLayout(WebGPUBindGroupLayoutDescriptor descriptor); >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 7aeccf700fe3be564caf02ea8c41d9a30cd38dd8..87dab2503b050edece17f4e1610bef9cd7b0e937 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -2764,6 +2764,8 @@ JSFillMode.cpp > JSFocusEvent.cpp > JSFontFace.cpp > JSFontFaceSet.cpp >+JSGPUBufferDescriptor.cpp >+JSGPUBufferUsage.cpp > JSGPUCompareFunction.cpp > JSGPUDepthStencilStateDescriptor.cpp > JSGPUExtent3D.cpp >@@ -3310,8 +3312,6 @@ JSWebGPUBindGroupLayoutBinding.cpp > JSWebGPUBindGroupLayoutDescriptor.cpp > JSWebGPUBuffer.cpp > JSWebGPUBufferBinding.cpp >-JSWebGPUBufferDescriptor.cpp >-JSWebGPUBufferUsage.cpp > JSWebGPUColor.cpp > JSWebGPUCommandBuffer.cpp > JSWebGPUDevice.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 0273cbbabf40606b43b16487110be5b2f56ab477..babfd30692dc721f0c445c8c2fda9dfc0b355f4b 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -4262,7 +4262,6 @@ > D0B0556809C6700100307E43 /* CreateLinkCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D0B0556609C6700100307E43 /* CreateLinkCommand.h */; }; > D0BC54491443AC4A00E105DA /* CachedStyleSheetClient.h in Headers */ = {isa = PBXBuildFile; fileRef = D0BC54481443AC4A00E105DA /* CachedStyleSheetClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; > D0BD4F5D1408850F006839B6 /* DictationCommandIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = D0BD4F5B1408850F006839B6 /* DictationCommandIOS.h */; }; >- D0D8648421B61727003C983C /* WebGPUBufferDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D8648221B61727003C983C /* WebGPUBufferDescriptor.h */; }; > D0EDA775143E303C0028E383 /* CachedRawResource.h in Headers */ = {isa = PBXBuildFile; fileRef = D0EDA773143E303C0028E383 /* CachedRawResource.h */; settings = {ATTRIBUTES = (Private, ); }; }; > D0FF2A5E11F8C45A007E74E0 /* PingLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FF2A5C11F8C45A007E74E0 /* PingLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; > D302754A12A5FE84004BD828 /* RenderDetailsMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = D302754612A5FE84004BD828 /* RenderDetailsMarker.h */; }; >@@ -13960,6 +13959,9 @@ > D00F595421701D8C000D71DB /* WebGPUDevice.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUDevice.idl; sourceTree = "<group>"; }; > D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpaceSplitString.cpp; sourceTree = "<group>"; }; > D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpaceSplitString.h; sourceTree = "<group>"; }; >+ D01B811922135EB900627B6C /* GPUBufferDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUBufferDescriptor.idl; sourceTree = "<group>"; }; >+ D01B811C2213627300627B6C /* GPUBufferUsage.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUBufferUsage.idl; sourceTree = "<group>"; }; >+ D01B811D2213636E00627B6C /* GPUBufferUsage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBufferUsage.h; sourceTree = "<group>"; }; > D0232B5821CB49B7009483B9 /* GPUBindGroupLayoutMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUBindGroupLayoutMetal.mm; sourceTree = "<group>"; }; > D02454D021C4A41C00B73628 /* GPUBindGroupLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBindGroupLayout.h; sourceTree = "<group>"; }; > D026F47D220A2AC600AC5F49 /* GPUExtent3D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUExtent3D.h; sourceTree = "<group>"; }; >@@ -14057,8 +14059,6 @@ > D0615FCC217FE5C6008A48A8 /* WebGPUShaderModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUShaderModule.h; sourceTree = "<group>"; }; > D0615FCD217FE5C6008A48A8 /* WebGPUShaderModule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUShaderModule.cpp; sourceTree = "<group>"; }; > D0615FCE217FE5C6008A48A8 /* WebGPUShaderModule.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUShaderModule.idl; sourceTree = "<group>"; }; >- D063AE3F21C05DDD000E6A35 /* WebGPUBufferUsage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBufferUsage.h; sourceTree = "<group>"; }; >- D063AE4021C05DDD000E6A35 /* WebGPUBufferUsage.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBufferUsage.idl; sourceTree = "<group>"; }; > D063AE4421C0617D000E6A35 /* WebGPUVertexFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUVertexFormat.h; sourceTree = "<group>"; }; > D063AE4521C0617D000E6A35 /* WebGPUVertexFormat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUVertexFormat.idl; sourceTree = "<group>"; }; > D063AE4621C06626000E6A35 /* WebGPUInputStepMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUInputStepMode.h; sourceTree = "<group>"; }; >@@ -14132,8 +14132,6 @@ > D0CAAE9C216824A7001C91C7 /* WebMetalComputeCommandEncoder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalComputeCommandEncoder.cpp; sourceTree = "<group>"; }; > D0CAAE9D216824A7001C91C7 /* WebMetalBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebMetalBuffer.h; sourceTree = "<group>"; }; > D0CAAE9E216824A8001C91C7 /* WebMetalCommandBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebMetalCommandBuffer.cpp; sourceTree = "<group>"; }; >- D0D8648221B61727003C983C /* WebGPUBufferDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBufferDescriptor.h; sourceTree = "<group>"; }; >- D0D8648321B61727003C983C /* WebGPUBufferDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBufferDescriptor.idl; sourceTree = "<group>"; }; > D0D8648721B64CAA003C983C /* GPUBufferDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBufferDescriptor.h; sourceTree = "<group>"; }; > D0D8648C21B70676003C983C /* WebGPUBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBuffer.h; sourceTree = "<group>"; }; > D0D8648D21B70676003C983C /* WebGPUBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUBuffer.cpp; sourceTree = "<group>"; }; >@@ -18477,6 +18475,7 @@ > D0D8649221B760F2003C983C /* GPUBuffer.h */, > D0BE104A21E6872F00E42A89 /* GPUBufferBinding.h */, > D0D8648721B64CAA003C983C /* GPUBufferDescriptor.h */, >+ D01B811D2213636E00627B6C /* GPUBufferUsage.h */, > D001D9AB21B0C7BF0023B9BC /* GPUColor.h */, > 312FF8BD21A4C2F100EB199D /* GPUCommandBuffer.h */, > D03C849C21FFC7FC0002227F /* GPUCompareFunction.h */, >@@ -26073,6 +26072,8 @@ > D00F5941216ECC7A000D71DB /* DOMWindowWebGPU.cpp */, > D00F5940216ECC7A000D71DB /* DOMWindowWebGPU.h */, > D00F5942216ECC7A000D71DB /* DOMWindowWebGPU.idl */, >+ D01B811922135EB900627B6C /* GPUBufferDescriptor.idl */, >+ D01B811C2213627300627B6C /* GPUBufferUsage.idl */, > D03C849E21FFCF000002227F /* GPUCompareFunction.idl */, > D03C84A221FFD7230002227F /* GPUDepthStencilStateDescriptor.idl */, > D026F480220A2B7000AC5F49 /* GPUExtent3D.idl */, >@@ -26106,10 +26107,6 @@ > D0D8648E21B70676003C983C /* WebGPUBuffer.idl */, > D0BE104C21E68F1500E42A89 /* WebGPUBufferBinding.h */, > D0BE104D21E68F1500E42A89 /* WebGPUBufferBinding.idl */, >- D0D8648221B61727003C983C /* WebGPUBufferDescriptor.h */, >- D0D8648321B61727003C983C /* WebGPUBufferDescriptor.idl */, >- D063AE3F21C05DDD000E6A35 /* WebGPUBufferUsage.h */, >- D063AE4021C05DDD000E6A35 /* WebGPUBufferUsage.idl */, > D001D9AC21B0C81A0023B9BC /* WebGPUColor.h */, > D001D9AD21B0C81A0023B9BC /* WebGPUColor.idl */, > D0EACF7721937228000FA75C /* WebGPUCommandBuffer.cpp */, >@@ -32325,7 +32322,6 @@ > 0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */, > 6F995A261A7078B100A735F4 /* WebGLVertexArrayObject.h in Headers */, > 77A17A7812F28642004E02F6 /* WebGLVertexArrayObjectOES.h in Headers */, >- D0D8648421B61727003C983C /* WebGPUBufferDescriptor.h in Headers */, > 318436DE21B9DAAF00ED383E /* WebGPULayer.h in Headers */, > A5B81CB71FAA44620037D1E6 /* WebHeapAgent.h in Headers */, > A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */, >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index 7af865289e71ae8a6277b0228e190f07ffce6cb9..7be243ee0b37f44b41c195e49f58d4e16534996a 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -81,6 +81,7 @@ namespace WebCore { > macro(Gamepad) \ > macro(GamepadButton) \ > macro(GamepadEvent) \ >+ macro(GPUBufferUsage) \ > macro(GPUTextureUsage) \ > macro(HTMLAttachmentElement) \ > macro(HTMLAudioElement) \ >@@ -196,7 +197,6 @@ namespace WebCore { > macro(WebGPUBindGroup) \ > macro(WebGPUBindGroupLayout) \ > macro(WebGPUBuffer) \ >- macro(WebGPUBufferUsage) \ > macro(WebGPUCommandBuffer) \ > macro(WebGPUDevice) \ > macro(WebGPUIndexFormat) \ >diff --git a/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h b/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h >index c04e52597262bd4cc8ce1b1bc8d346261558da1c..1d22bdf6d91c33d0a08b01e5953f49208a757b9f 100644 >--- a/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h >+++ b/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h >@@ -27,32 +27,15 @@ > > #if ENABLE(WEBGPU) > >-#include <wtf/RefCounted.h> >+#include "GPUBufferUsage.h" > > namespace WebCore { > >-using GPUBufferUsageFlags = unsigned long; >- > struct GPUBufferDescriptor { > unsigned long size; > GPUBufferUsageFlags usage; > }; > >-class GPUBufferUsage : public RefCounted<GPUBufferUsage> { >-public: >- enum Flags : GPUBufferUsageFlags { >- None = 0, >- MapRead = 1, >- MapWrite = 2, >- TransferSrc = 4, >- TransferDst = 8, >- Index = 16, >- Vertex = 32, >- Uniform = 64, >- Storage = 128 >- }; >-}; >- > } // namespace WebCore > > #endif // ENABLE(WEBGPU) >diff --git a/Source/WebCore/platform/graphics/gpu/GPUBufferUsage.h b/Source/WebCore/platform/graphics/gpu/GPUBufferUsage.h >new file mode 100644 >index 0000000000000000000000000000000000000000..5ab4024a1325405a5b1cf7e8dbb3998d8c2cd194 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/gpu/GPUBufferUsage.h >@@ -0,0 +1,53 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+using GPUBufferUsageFlags = unsigned long; >+ >+class GPUBufferUsage : public RefCounted<GPUBufferUsage> { >+public: >+ enum class Flags : GPUBufferUsageFlags { >+ None = 0, >+ MapRead = 1, >+ MapWrite = 2, >+ TransferSrc = 4, >+ TransferDst = 8, >+ Index = 16, >+ Vertex = 32, >+ Uniform = 64, >+ Storage = 128 >+ }; >+}; >+ >+} // namespace WebCore >+ >+#endif // ENABLE(WEBGPU) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fd19e77bfb29e08109cc2de89d83a0b40bc5ce18..abb5511a7a98df9633acae353359b1c7857393e3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-12 Justin Fan <justin_fan@apple.com> >+ >+ [WebGPU] Remove WebGPUBufferDescriptor/Usage and use GPU versions >+ https://bugs.webkit.org/show_bug.cgi?id=194552 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WebGPUBufferDescriptor/Usage have been renamed to GPUBufferDescriptor/Usage in the Web GPU API. >+ Update affected tests to match. >+ >+ * webgpu/bind-groups.html: >+ * webgpu/buffer-resource-triangles.html: >+ * webgpu/buffers.html: >+ * webgpu/vertex-buffer-triangle-strip.html: >+ > 2019-02-11 Wenson Hsieh <wenson_hsieh@apple.com> > > fast/forms/ios/force-gregorian-calendar-for-credit-card-expiry.html does not work on iPad >diff --git a/LayoutTests/webgpu/bind-groups.html b/LayoutTests/webgpu/bind-groups.html >index 6f52f661cc123f1fc5e8c3046adf1c3cc5be596f..b572176ce3f3c9a8e0ad86bd8a99e6c609ef81db 100644 >--- a/LayoutTests/webgpu/bind-groups.html >+++ b/LayoutTests/webgpu/bind-groups.html >@@ -19,7 +19,7 @@ promise_test(async () => { > > const bindGroupLayout = device.createBindGroupLayout({ bindings: [bufferLayoutBinding] }); > >- const buffer = device.createBuffer({ size: 16, usage: WebGPUBufferUsage.STORAGE }); >+ const buffer = device.createBuffer({ size: 16, usage: GPUBufferUsage.STORAGE }); > const bufferBinding = { buffer: buffer, offset: 0, size: 16 }; > const bindGroupBinding = { binding: 1, resource: bufferBinding }; > >diff --git a/LayoutTests/webgpu/buffer-resource-triangles.html b/LayoutTests/webgpu/buffer-resource-triangles.html >index 996579ef16c19b2dfb19ffb7cb41f2955a529ac6..bf36334db3ad44d885104dbbc7f46113ecd4cdb5 100644 >--- a/LayoutTests/webgpu/buffer-resource-triangles.html >+++ b/LayoutTests/webgpu/buffer-resource-triangles.html >@@ -82,7 +82,7 @@ const verticesBufferSize = vertexSize * 3; > > // FIXME: Keep up to date with buffer upload decisions. > function createVerticesBuffer(device) { >- const buffer = device.createBuffer({ size:verticesBufferSize, usage: WebGPUBufferUsage.VERTEX }); >+ const buffer = device.createBuffer({ size:verticesBufferSize, usage: GPUBufferUsage.VERTEX }); > > const vertices = [ > 0, 1, 0, 1, >@@ -97,7 +97,7 @@ function createVerticesBuffer(device) { > } > > function createFloat4Buffer(device, a, b) { >- const buffer = device.createBuffer({ size: vertexSize, usage: WebGPUBufferUsage.UNIFORM }); >+ const buffer = device.createBuffer({ size: vertexSize, usage: GPUBufferUsage.UNIFORM }); > > const arrayBuffer = buffer.mapping; > const floatArray = new Float32Array(arrayBuffer); >diff --git a/LayoutTests/webgpu/buffers.html b/LayoutTests/webgpu/buffers.html >index 90024c9c9b4cb530f278b01431f797d5bea3cf51..6f70f4bbd733052fdb99618ee15da71d1966f6f6 100644 >--- a/LayoutTests/webgpu/buffers.html >+++ b/LayoutTests/webgpu/buffers.html >@@ -8,7 +8,7 @@ > <script src="js/basic-webgpu-functions.js"></script> > <script> > function createBuffer() { >- const buffer = defaultDevice.createBuffer({ size: 16, usage: WebGPUBufferUsage.MAP_WRITE }); >+ const buffer = defaultDevice.createBuffer({ size: 16, usage: GPUBufferUsage.MAP_WRITE }); > assert_true(buffer instanceof WebGPUBuffer, "createBuffer returned a WebGPUBuffer"); > > let arrayBuffer = buffer.mapping; >diff --git a/LayoutTests/webgpu/vertex-buffer-triangle-strip.html b/LayoutTests/webgpu/vertex-buffer-triangle-strip.html >index 667a0a5a5720bbacae1a25489205ad53feb335f3..86f923f49520a6775e36785edaec14c3cb9f7cb7 100644 >--- a/LayoutTests/webgpu/vertex-buffer-triangle-strip.html >+++ b/LayoutTests/webgpu/vertex-buffer-triangle-strip.html >@@ -40,7 +40,7 @@ fragment float4 fragment_main(VertexOut v [[stage_in]]) > > function createVertexBuffer(device) { > const bufferSize = 4 * 5 * 4; >- const buffer = device.createBuffer({ size: bufferSize, usage: WebGPUBufferUsage.MAP_WRITE }); >+ const buffer = device.createBuffer({ size: bufferSize, usage: GPUBufferUsage.MAP_WRITE }); > > let floatArray = new Float32Array(buffer.mapping); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194552
:
361825
|
361829
|
361838
|
361839
|
361855