Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (285378 => 285379)
--- trunk/Source/WebCore/CMakeLists.txt 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/CMakeLists.txt 2021-11-06 22:02:43 UTC (rev 285379)
@@ -1470,9 +1470,11 @@
list(APPEND WebCore_NON_SVG_IDL_FILES
Modules/WebGPU/GPU.idl
Modules/WebGPU/GPUAdapter.idl
+ Modules/WebGPU/GPUAddressMode.idl
Modules/WebGPU/GPUBuffer.idl
Modules/WebGPU/GPUBufferDescriptor.idl
Modules/WebGPU/GPUBufferUsage.idl
+ Modules/WebGPU/GPUCompareFunction.idl
Modules/WebGPU/GPUDevice.idl
Modules/WebGPU/GPUDeviceDescriptor.idl
Modules/WebGPU/GPUExtent3DDict.idl
@@ -1479,6 +1481,7 @@
Modules/WebGPU/GPUExternalTexture.idl
Modules/WebGPU/GPUExternalTextureDescriptor.idl
Modules/WebGPU/GPUFeatureName.idl
+ Modules/WebGPU/GPUFilterMode.idl
Modules/WebGPU/GPUMapMode.idl
Modules/WebGPU/GPUObjectBase.idl
Modules/WebGPU/GPUObjectDescriptorBase.idl
@@ -1485,6 +1488,8 @@
Modules/WebGPU/GPUPowerPreference.idl
Modules/WebGPU/GPUPredefinedColorSpace.idl
Modules/WebGPU/GPURequestAdapterOptions.idl
+ Modules/WebGPU/GPUSampler.idl
+ Modules/WebGPU/GPUSamplerDescriptor.idl
Modules/WebGPU/GPUSupportedFeatures.idl
Modules/WebGPU/GPUSupportedLimits.idl
Modules/WebGPU/GPUTexture.idl
Modified: trunk/Source/WebCore/ChangeLog (285378 => 285379)
--- trunk/Source/WebCore/ChangeLog 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/ChangeLog 2021-11-06 22:02:43 UTC (rev 285379)
@@ -1,5 +1,44 @@
2021-11-04 Myles C. Maxfield <[email protected]>
+ [WebGPU] Bindings part 4: Bring back Sampler bindings code
+ https://bugs.webkit.org/show_bug.cgi?id=232610
+
+ Reviewed by Dean Jackson.
+
+ This is the fourth chunk of bindings code, brought back from r280467.
+ This chunk includes the Sampler object. Interestingly, it doesn't actually
+ have any methods. Its presence is just used inside bind groups.
+
+ No new tests because there is no behavior change yet.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Modules/WebGPU/GPUAddressMode.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUAddressMode.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUCompareFunction.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUCompareFunction.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUDevice.cpp:
+ (WebCore::GPUDevice::createSampler):
+ * Modules/WebGPU/GPUDevice.h:
+ * Modules/WebGPU/GPUDevice.idl:
+ * Modules/WebGPU/GPUFilterMode.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUFilterMode.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUSampler.cpp: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ (WebCore::GPUSampler::label const):
+ (WebCore::GPUSampler::setLabel):
+ * Modules/WebGPU/GPUSampler.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ (WebCore::GPUSampler::create):
+ * Modules/WebGPU/GPUSampler.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUSamplerDescriptor.h: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Modules/WebGPU/GPUSamplerDescriptor.idl: Copied from Source/WebCore/Modules/WebGPU/GPUDevice.idl.
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/WebCoreBuiltinNames.h:
+
+2021-11-04 Myles C. Maxfield <[email protected]>
+
[WebGPU] Bindings Part 3: Bring back Texture bindings code
https://bugs.webkit.org/show_bug.cgi?id=232609
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (285378 => 285379)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-11-06 22:02:43 UTC (rev 285379)
@@ -23,9 +23,11 @@
$(PROJECT_DIR)/DerivedSources.make
$(PROJECT_DIR)/Modules/WebGPU/GPU.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUAdapter.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUAddressMode.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUBuffer.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUBufferDescriptor.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUBufferUsage.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUCompareFunction.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUDevice.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUDeviceDescriptor.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUExtent3DDict.idl
@@ -32,6 +34,7 @@
$(PROJECT_DIR)/Modules/WebGPU/GPUExternalTexture.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUExternalTextureDescriptor.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUFeatureName.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUFilterMode.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUMapMode.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUObjectBase.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUObjectDescriptorBase.idl
@@ -38,6 +41,8 @@
$(PROJECT_DIR)/Modules/WebGPU/GPUPowerPreference.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUPredefinedColorSpace.idl
$(PROJECT_DIR)/Modules/WebGPU/GPURequestAdapterOptions.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUSampler.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUSamplerDescriptor.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUSize64.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUSupportedFeatures.idl
$(PROJECT_DIR)/Modules/WebGPU/GPUSupportedLimits.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (285378 => 285379)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2021-11-06 22:02:43 UTC (rev 285379)
@@ -871,6 +871,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPU.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAdapter.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAdapter.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAddressMode.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAddressMode.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBuffer.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBuffer.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUBufferDescriptor.cpp
@@ -877,6 +879,8 @@
$(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/JSGPUDevice.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDevice.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDeviceDescriptor.cpp
@@ -889,6 +893,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUExternalTextureDescriptor.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFeatureName.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFeatureName.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFilterMode.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFilterMode.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUMapMode.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUMapMode.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectBase.cpp
@@ -901,6 +907,10 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUPredefinedColorSpace.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSampler.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSampler.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSamplerDescriptor.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSamplerDescriptor.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSize64.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSize64.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSupportedFeatures.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (285378 => 285379)
--- trunk/Source/WebCore/DerivedSources.make 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/DerivedSources.make 2021-11-06 22:02:43 UTC (rev 285379)
@@ -55,9 +55,11 @@
JS_BINDING_IDLS := \
$(WebCore)/Modules/WebGPU/GPU.idl \
$(WebCore)/Modules/WebGPU/GPUAdapter.idl \
+ $(WebCore)/Modules/WebGPU/GPUAddressMode.idl \
$(WebCore)/Modules/WebGPU/GPUBuffer.idl \
$(WebCore)/Modules/WebGPU/GPUBufferDescriptor.idl \
$(WebCore)/Modules/WebGPU/GPUBufferUsage.idl \
+ $(WebCore)/Modules/WebGPU/GPUCompareFunction.idl \
$(WebCore)/Modules/WebGPU/GPUDevice.idl \
$(WebCore)/Modules/WebGPU/GPUDeviceDescriptor.idl \
$(WebCore)/Modules/WebGPU/GPUExtent3DDict.idl \
@@ -64,6 +66,7 @@
$(WebCore)/Modules/WebGPU/GPUExternalTexture.idl \
$(WebCore)/Modules/WebGPU/GPUExternalTextureDescriptor.idl \
$(WebCore)/Modules/WebGPU/GPUFeatureName.idl \
+ $(WebCore)/Modules/WebGPU/GPUFilterMode.idl \
$(WebCore)/Modules/WebGPU/GPUMapMode.idl \
$(WebCore)/Modules/WebGPU/GPUObjectBase.idl \
$(WebCore)/Modules/WebGPU/GPUObjectDescriptorBase.idl \
@@ -70,6 +73,8 @@
$(WebCore)/Modules/WebGPU/GPUPowerPreference.idl \
$(WebCore)/Modules/WebGPU/GPUPredefinedColorSpace.idl \
$(WebCore)/Modules/WebGPU/GPURequestAdapterOptions.idl \
+ $(WebCore)/Modules/WebGPU/GPUSampler.idl \
+ $(WebCore)/Modules/WebGPU/GPUSamplerDescriptor.idl \
$(WebCore)/Modules/WebGPU/GPUSupportedFeatures.idl \
$(WebCore)/Modules/WebGPU/GPUSupportedLimits.idl \
$(WebCore)/Modules/WebGPU/GPUTexture.idl \
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUAddressMode.h (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUAddressMode.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAddressMode.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 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
+
+#include <cstdint>
+
+namespace WebCore {
+
+enum class GPUAddressMode : uint8_t {
+ ClampToEdge,
+ Repeat,
+ MirrorRepeat
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUAddressMode.idl (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUAddressMode.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAddressMode.idl 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#enumdef-gpuaddressmode
+
+[
+ EnabledBySetting=WebGPU
+]
+enum GPUAddressMode {
+ "clamp-to-edge",
+ "repeat",
+ "mirror-repeat"
+};
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUCompareFunction.h (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUCompareFunction.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUCompareFunction.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2021 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
+
+#include <cstdint>
+
+namespace WebCore {
+
+enum class GPUCompareFunction : uint8_t {
+ Never,
+ Less,
+ Equal,
+ LessEqual,
+ Greater,
+ NotEqual,
+ GreaterEqual,
+ Always
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUCompareFunction.idl (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUCompareFunction.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUCompareFunction.idl 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#enumdef-gpucomparefunction
+
+[
+ EnabledBySetting=WebGPU
+]
+enum GPUCompareFunction {
+ "never",
+ "less",
+ "equal",
+ "less-equal",
+ "greater",
+ "not-equal",
+ "greater-equal",
+ "always"
+};
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp (285378 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp 2021-11-06 22:02:43 UTC (rev 285379)
@@ -30,6 +30,8 @@
#include "GPUBufferDescriptor.h"
#include "GPUExternalTexture.h"
#include "GPUExternalTextureDescriptor.h"
+#include "GPUSampler.h"
+#include "GPUSamplerDescriptor.h"
#include "GPUSupportedFeatures.h"
#include "GPUSupportedLimits.h"
#include "GPUTexture.h"
@@ -72,6 +74,11 @@
return GPUTexture::create();
}
+Ref<GPUSampler> GPUDevice::createSampler(const std::optional<GPUSamplerDescriptor>&)
+{
+ return GPUSampler::create();
+}
+
Ref<GPUExternalTexture> GPUDevice::importExternalTexture(const GPUExternalTextureDescriptor&)
{
return GPUExternalTexture::create();
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h (285378 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -28,6 +28,7 @@
#include "ActiveDOMObject.h"
#include "EventTarget.h"
#include "ScriptExecutionContext.h"
+#include <optional>
#include <wtf/Ref.h>
#include <wtf/text/WTFString.h>
@@ -37,6 +38,8 @@
struct GPUBufferDescriptor;
class GPUExternalTexture;
struct GPUExternalTextureDescriptor;
+class GPUSampler;
+struct GPUSamplerDescriptor;
class GPUSupportedFeatures;
class GPUSupportedLimits;
class GPUTexture;
@@ -61,6 +64,7 @@
Ref<GPUBuffer> createBuffer(const GPUBufferDescriptor&);
Ref<GPUTexture> createTexture(const GPUTextureDescriptor&);
+ Ref<GPUSampler> createSampler(const std::optional<GPUSamplerDescriptor>&);
Ref<GPUExternalTexture> importExternalTexture(const GPUExternalTextureDescriptor&);
private:
Modified: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl (285378 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl 2021-11-06 22:02:43 UTC (rev 285379)
@@ -39,6 +39,7 @@
GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
GPUTexture createTexture(GPUTextureDescriptor descriptor);
+ GPUSampler createSampler(optional GPUSamplerDescriptor descriptor);
GPUExternalTexture importExternalTexture(GPUExternalTextureDescriptor descriptor);
// FIXME: Add more here.
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUFilterMode.h (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUFilterMode.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUFilterMode.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 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
+
+#include <cstdint>
+
+namespace WebCore {
+
+enum class GPUFilterMode : uint8_t {
+ Nearest,
+ Linear
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUFilterMode.idl (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUFilterMode.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUFilterMode.idl 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#enumdef-gpufiltermode
+
+[
+ EnabledBySetting=WebGPU
+]
+enum GPUFilterMode {
+ "nearest",
+ "linear"
+};
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUSampler.cpp (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUSampler.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSampler.cpp 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+#include "config.h"
+#include "GPUSampler.h"
+
+namespace WebCore {
+
+String GPUSampler::label() const
+{
+ return StringImpl::empty();
+}
+
+void GPUSampler::setLabel(String&&)
+{
+}
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUSampler.h (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUSampler.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSampler.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 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
+
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class GPUSampler : public RefCounted<GPUSampler> {
+public:
+ static Ref<GPUSampler> create()
+ {
+ return adoptRef(*new GPUSampler());
+ }
+
+ String label() const;
+ void setLabel(String&&);
+
+private:
+ GPUSampler() = default;
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUSampler.idl (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUSampler.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSampler.idl 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#gpusampler
+
+[
+ EnabledBySetting=WebGPU,
+ ImplementationLacksVTable,
+ Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+ SecureContext
+]
+interface GPUSampler {
+};
+GPUSampler includes GPUObjectBase;
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUSamplerDescriptor.h (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUSamplerDescriptor.h (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSamplerDescriptor.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "GPUAddressMode.h"
+#include "GPUCompareFunction.h"
+#include "GPUFilterMode.h"
+#include "GPUObjectDescriptorBase.h"
+#include <cstdint>
+#include <optional>
+
+namespace WebCore {
+
+struct GPUSamplerDescriptor : public GPUObjectDescriptorBase {
+ GPUAddressMode addressModeU;
+ GPUAddressMode addressModeV;
+ GPUAddressMode addressModeW;
+ GPUFilterMode magFilter;
+ GPUFilterMode minFilter;
+ GPUFilterMode mipmapFilter;
+ float lodMinClamp;
+ float lodMaxClamp;
+ std::optional<GPUCompareFunction> compare;
+ uint16_t maxAnisotropy;
+};
+
+}
Copied: trunk/Source/WebCore/Modules/WebGPU/GPUSamplerDescriptor.idl (from rev 285378, trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl) (0 => 285379)
--- trunk/Source/WebCore/Modules/WebGPU/GPUSamplerDescriptor.idl (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSamplerDescriptor.idl 2021-11-06 22:02:43 UTC (rev 285379)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2021 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://gpuweb.github.io/gpuweb/#dictdef-gpusamplerdescriptor
+
+[
+ EnabledBySetting=WebGPU
+]
+dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase {
+ GPUAddressMode addressModeU = "clamp-to-edge";
+ GPUAddressMode addressModeV = "clamp-to-edge";
+ GPUAddressMode addressModeW = "clamp-to-edge";
+ GPUFilterMode magFilter = "nearest";
+ GPUFilterMode minFilter = "nearest";
+ GPUFilterMode mipmapFilter = "nearest";
+ float lodMinClamp = 0;
+ float lodMaxClamp = 32;
+ GPUCompareFunction compare;
+ [Clamp] unsigned short maxAnisotropy = 1;
+};
Modified: trunk/Source/WebCore/Sources.txt (285378 => 285379)
--- trunk/Source/WebCore/Sources.txt 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/Sources.txt 2021-11-06 22:02:43 UTC (rev 285379)
@@ -26,6 +26,7 @@
Modules/WebGPU/GPUBuffer.cpp
Modules/WebGPU/GPUDevice.cpp
Modules/WebGPU/GPUExternalTexture.cpp
+Modules/WebGPU/GPUSampler.cpp
Modules/WebGPU/GPUSupportedFeatures.cpp
Modules/WebGPU/GPUSupportedLimits.cpp
Modules/WebGPU/GPUTexture.cpp
@@ -3076,9 +3077,11 @@
JSFormDataEvent.cpp
JSGPU.cpp
JSGPUAdapter.cpp
+JSGPUAddressMode.cpp
JSGPUBuffer.cpp
JSGPUBufferDescriptor.cpp
JSGPUBufferUsage.cpp
+JSGPUCompareFunction.cpp
JSGPUDevice.cpp
JSGPUDeviceDescriptor.cpp
JSGPUExtent3DDict.cpp
@@ -3085,6 +3088,7 @@
JSGPUExternalTexture.cpp
JSGPUExternalTextureDescriptor.cpp
JSGPUFeatureName.cpp
+JSGPUFilterMode.cpp
JSGPUMapMode.cpp
JSGPUObjectBase.cpp
JSGPUObjectDescriptorBase.cpp
@@ -3091,6 +3095,8 @@
JSGPUPowerPreference.cpp
JSGPUPredefinedColorSpace.cpp
JSGPURequestAdapterOptions.cpp
+JSGPUSampler.cpp
+JSGPUSamplerDescriptor.cpp
JSGPUSupportedFeatures.cpp
JSGPUSupportedLimits.cpp
JSGPUTexture.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (285378 => 285379)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-11-06 22:02:43 UTC (rev 285379)
@@ -7117,6 +7117,17 @@
1C8D26D022C09CDE00D125F3 /* libcompression.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcompression.tbd; path = usr/lib/libcompression.tbd; sourceTree = SDKROOT; };
1C904DF90BA9D2C80081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
1CA4FC4C2734DEC20027FD5A /* GPUTextureView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUTextureView.cpp; sourceTree = "<group>"; };
+ 1CA4FC512734EBCA0027FD5A /* GPUAddressMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUAddressMode.h; sourceTree = "<group>"; };
+ 1CA4FC532734EBCB0027FD5A /* GPUSampler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUSampler.h; sourceTree = "<group>"; };
+ 1CA4FC542734EBCB0027FD5A /* GPUAddressMode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUAddressMode.idl; sourceTree = "<group>"; };
+ 1CA4FC552734EBCB0027FD5A /* GPUFilterMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUFilterMode.h; sourceTree = "<group>"; };
+ 1CA4FC562734EBCC0027FD5A /* GPUFilterMode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUFilterMode.idl; sourceTree = "<group>"; };
+ 1CA4FC572734EBCC0027FD5A /* GPUSamplerDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUSamplerDescriptor.idl; sourceTree = "<group>"; };
+ 1CA4FC582734EBCD0027FD5A /* GPUSamplerDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUSamplerDescriptor.h; sourceTree = "<group>"; };
+ 1CA4FC592734EBCD0027FD5A /* GPUCompareFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUCompareFunction.h; sourceTree = "<group>"; };
+ 1CA4FC5A2734EBCD0027FD5A /* GPUSampler.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUSampler.idl; sourceTree = "<group>"; };
+ 1CA4FC5B2734EBCE0027FD5A /* GPUCompareFunction.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUCompareFunction.idl; sourceTree = "<group>"; };
+ 1CA4FC5D2734EDFA0027FD5A /* GPUSampler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUSampler.cpp; sourceTree = "<group>"; };
1CAF347E0A6C405200ABE06E /* WebScriptObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptObject.h; sourceTree = "<group>"; };
1CAF347F0A6C405200ABE06E /* WebScriptObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebScriptObject.mm; sourceTree = "<group>"; };
1CAF34800A6C405200ABE06E /* WebScriptObjectPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptObjectPrivate.h; sourceTree = "<group>"; };
@@ -19142,6 +19153,8 @@
1C28957E272F430A00B3E2B4 /* GPUAdapter.cpp */,
1C289572272F30DA00B3E2B4 /* GPUAdapter.h */,
1C28956B272F27A700B3E2B4 /* GPUAdapter.idl */,
+ 1CA4FC512734EBCA0027FD5A /* GPUAddressMode.h */,
+ 1CA4FC542734EBCB0027FD5A /* GPUAddressMode.idl */,
1C8127882734C5F70068864F /* GPUBuffer.cpp */,
1C81278B2734C5F80068864F /* GPUBuffer.h */,
1C8127852734C5F60068864F /* GPUBuffer.idl */,
@@ -19149,6 +19162,8 @@
1C8127892734C5F70068864F /* GPUBufferDescriptor.idl */,
1C8127832734C5F50068864F /* GPUBufferUsage.h */,
1C8127862734C5F60068864F /* GPUBufferUsage.idl */,
+ 1CA4FC592734EBCD0027FD5A /* GPUCompareFunction.h */,
+ 1CA4FC5B2734EBCE0027FD5A /* GPUCompareFunction.idl */,
1C28957F272F43D800B3E2B4 /* GPUDevice.cpp */,
1C289573272F338D00B3E2B4 /* GPUDevice.h */,
1C28956E272F283800B3E2B4 /* GPUDevice.idl */,
@@ -19163,6 +19178,8 @@
1C8127AA2734D89E0068864F /* GPUExternalTextureDescriptor.idl */,
1C289580272F47B000B3E2B4 /* GPUFeatureName.h */,
1C28956D272F280800B3E2B4 /* GPUFeatureName.idl */,
+ 1CA4FC552734EBCB0027FD5A /* GPUFilterMode.h */,
+ 1CA4FC562734EBCC0027FD5A /* GPUFilterMode.idl */,
1C8127872734C5F70068864F /* GPUIntegralTypes.h */,
1C81278A2734C5F80068864F /* GPUMapMode.h */,
1C81278D2734C5F90068864F /* GPUMapMode.idl */,
@@ -19175,6 +19192,10 @@
1C289566272F232600B3E2B4 /* GPUPredefinedColorSpace.idl */,
1C28957B272F3FBC00B3E2B4 /* GPURequestAdapterOptions.h */,
1C289568272F272400B3E2B4 /* GPURequestAdapterOptions.idl */,
+ 1CA4FC532734EBCB0027FD5A /* GPUSampler.h */,
+ 1CA4FC5A2734EBCD0027FD5A /* GPUSampler.idl */,
+ 1CA4FC582734EBCD0027FD5A /* GPUSamplerDescriptor.h */,
+ 1CA4FC572734EBCC0027FD5A /* GPUSamplerDescriptor.idl */,
1C81276F2734B3730068864F /* GPUSupportedFeatures.cpp */,
1C289565272F200600B3E2B4 /* GPUSupportedFeatures.h */,
1C289564272F1F4500B3E2B4 /* GPUSupportedFeatures.idl */,
@@ -19202,6 +19223,7 @@
1C8127A62734D89C0068864F /* GPUTextureViewDimension.h */,
1C8127AB2734D89E0068864F /* GPUTextureViewDimension.idl */,
1C28956A272F277E00B3E2B4 /* NavigatorGPU.idl */,
+ 1CA4FC5D2734EDFA0027FD5A /* GPUSampler.cpp */,
);
path = WebGPU;
sourceTree = "<group>";
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (285378 => 285379)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2021-11-06 21:50:45 UTC (rev 285378)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2021-11-06 22:02:43 UTC (rev 285379)
@@ -133,6 +133,7 @@
macro(GPUDevice) \
macro(GPUExternalTexture) \
macro(GPUMapMode) \
+ macro(GPUSampler) \
macro(GPUSupportedFeatures) \
macro(GPUSupportedLimits) \
macro(GPUTexture) \