react-native-webgpu 0.5.11 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -0
- package/android/CMakeLists.txt +2 -0
- package/android/cpp/AndroidPlatformContext.h +121 -0
- package/apple/ApplePlatformContext.h +13 -0
- package/apple/ApplePlatformContext.mm +145 -0
- package/apple/AppleVideoPlayer.h +31 -0
- package/apple/AppleVideoPlayer.mm +314 -0
- package/cpp/rnwgpu/ArrayBuffer.h +51 -7
- package/cpp/rnwgpu/PlatformContext.h +81 -0
- package/cpp/rnwgpu/RNWebGPUManager.cpp +12 -0
- package/cpp/rnwgpu/api/Convertors.h +33 -11
- package/cpp/rnwgpu/api/GPU.cpp +27 -0
- package/cpp/rnwgpu/api/GPUAdapter.cpp +109 -33
- package/cpp/rnwgpu/api/GPUDevice.cpp +58 -5
- package/cpp/rnwgpu/api/GPUDevice.h +6 -0
- package/cpp/rnwgpu/api/GPUExternalTexture.cpp +335 -0
- package/cpp/rnwgpu/api/GPUExternalTexture.h +47 -2
- package/cpp/rnwgpu/api/GPUFeatures.h +4 -1
- package/cpp/rnwgpu/api/GPUShaderModule.cpp +2 -3
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp +80 -0
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.h +71 -0
- package/cpp/rnwgpu/api/ImageBitmap.h +8 -0
- package/cpp/rnwgpu/api/RNWebGPU.h +63 -21
- package/cpp/rnwgpu/api/RnFeatures.h +53 -0
- package/cpp/rnwgpu/api/VideoFrame.h +76 -0
- package/cpp/rnwgpu/api/VideoPlayer.h +69 -0
- package/cpp/rnwgpu/api/descriptors/GPUBindGroupEntry.h +4 -1
- package/cpp/rnwgpu/api/descriptors/GPUDawnTogglesDescriptor.h +57 -0
- package/cpp/rnwgpu/api/descriptors/GPUDeviceDescriptor.h +18 -3
- package/cpp/rnwgpu/api/descriptors/GPUExternalTextureDescriptor.h +35 -33
- package/cpp/rnwgpu/api/descriptors/GPUSharedTextureMemoryDescriptor.h +62 -0
- package/cpp/rnwgpu/api/descriptors/Unions.h +10 -0
- package/cpp/webgpu/webgpu.h +78 -17
- package/cpp/webgpu/webgpu_cpp.h +1014 -1249
- package/cpp/webgpu/webgpu_cpp_print.h +99 -10
- package/lib/commonjs/Canvas.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/Canvas.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/Canvas.d.ts +0 -10
- package/lib/typescript/src/Canvas.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +20 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +32 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/libs/android/arm64-v8a/libwebgpu_dawn.so +0 -0
- package/libs/android/armeabi-v7a/libwebgpu_dawn.so +0 -0
- package/libs/android/x86/libwebgpu_dawn.so +0 -0
- package/libs/android/x86_64/libwebgpu_dawn.so +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +6 -6
- package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
- package/package.json +3 -3
- package/src/Canvas.tsx +0 -15
- package/src/index.tsx +62 -2
- package/src/types.ts +83 -1
package/cpp/webgpu/webgpu_cpp.h
CHANGED
|
@@ -163,6 +163,44 @@ enum class CallbackMode : uint32_t {
|
|
|
163
163
|
static_assert(sizeof(CallbackMode) == sizeof(WGPUCallbackMode), "sizeof mismatch for CallbackMode");
|
|
164
164
|
static_assert(alignof(CallbackMode) == alignof(WGPUCallbackMode), "alignof mismatch for CallbackMode");
|
|
165
165
|
|
|
166
|
+
enum class ColorSpacePrimariesDawn : uint32_t {
|
|
167
|
+
SRGB = WGPUColorSpacePrimariesDawn_SRGB,
|
|
168
|
+
Rec709 = WGPUColorSpacePrimariesDawn_Rec709,
|
|
169
|
+
Rec601 = WGPUColorSpacePrimariesDawn_Rec601,
|
|
170
|
+
Rec2020 = WGPUColorSpacePrimariesDawn_Rec2020,
|
|
171
|
+
DisplayP3 = WGPUColorSpacePrimariesDawn_DisplayP3,
|
|
172
|
+
};
|
|
173
|
+
static_assert(sizeof(ColorSpacePrimariesDawn) == sizeof(WGPUColorSpacePrimariesDawn), "sizeof mismatch for ColorSpacePrimariesDawn");
|
|
174
|
+
static_assert(alignof(ColorSpacePrimariesDawn) == alignof(WGPUColorSpacePrimariesDawn), "alignof mismatch for ColorSpacePrimariesDawn");
|
|
175
|
+
|
|
176
|
+
enum class ColorSpaceTransferDawn : uint32_t {
|
|
177
|
+
Identity = WGPUColorSpaceTransferDawn_Identity,
|
|
178
|
+
SRGB = WGPUColorSpaceTransferDawn_SRGB,
|
|
179
|
+
DisplayP3 = WGPUColorSpaceTransferDawn_DisplayP3,
|
|
180
|
+
SMPTE_170M = WGPUColorSpaceTransferDawn_SMPTE_170M,
|
|
181
|
+
HLG = WGPUColorSpaceTransferDawn_HLG,
|
|
182
|
+
PQ = WGPUColorSpaceTransferDawn_PQ,
|
|
183
|
+
};
|
|
184
|
+
static_assert(sizeof(ColorSpaceTransferDawn) == sizeof(WGPUColorSpaceTransferDawn), "sizeof mismatch for ColorSpaceTransferDawn");
|
|
185
|
+
static_assert(alignof(ColorSpaceTransferDawn) == alignof(WGPUColorSpaceTransferDawn), "alignof mismatch for ColorSpaceTransferDawn");
|
|
186
|
+
|
|
187
|
+
enum class ColorSpaceYCbCrMatrixDawn : uint32_t {
|
|
188
|
+
Identity = WGPUColorSpaceYCbCrMatrixDawn_Identity,
|
|
189
|
+
Rec601 = WGPUColorSpaceYCbCrMatrixDawn_Rec601,
|
|
190
|
+
Rec709 = WGPUColorSpaceYCbCrMatrixDawn_Rec709,
|
|
191
|
+
Rec2020 = WGPUColorSpaceYCbCrMatrixDawn_Rec2020,
|
|
192
|
+
};
|
|
193
|
+
static_assert(sizeof(ColorSpaceYCbCrMatrixDawn) == sizeof(WGPUColorSpaceYCbCrMatrixDawn), "sizeof mismatch for ColorSpaceYCbCrMatrixDawn");
|
|
194
|
+
static_assert(alignof(ColorSpaceYCbCrMatrixDawn) == alignof(WGPUColorSpaceYCbCrMatrixDawn), "alignof mismatch for ColorSpaceYCbCrMatrixDawn");
|
|
195
|
+
|
|
196
|
+
enum class ColorSpaceYCbCrRangeDawn : uint32_t {
|
|
197
|
+
Identity = WGPUColorSpaceYCbCrRangeDawn_Identity,
|
|
198
|
+
Narrow = WGPUColorSpaceYCbCrRangeDawn_Narrow,
|
|
199
|
+
Full = WGPUColorSpaceYCbCrRangeDawn_Full,
|
|
200
|
+
};
|
|
201
|
+
static_assert(sizeof(ColorSpaceYCbCrRangeDawn) == sizeof(WGPUColorSpaceYCbCrRangeDawn), "sizeof mismatch for ColorSpaceYCbCrRangeDawn");
|
|
202
|
+
static_assert(alignof(ColorSpaceYCbCrRangeDawn) == alignof(WGPUColorSpaceYCbCrRangeDawn), "alignof mismatch for ColorSpaceYCbCrRangeDawn");
|
|
203
|
+
|
|
166
204
|
enum class CompareFunction : uint32_t {
|
|
167
205
|
Undefined = WGPUCompareFunction_Undefined,
|
|
168
206
|
Never = WGPUCompareFunction_Never,
|
|
@@ -357,12 +395,13 @@ enum class FeatureName : uint32_t {
|
|
|
357
395
|
SharedBufferMemoryD3D12SharedMemoryFileMappingHandle = WGPUFeatureName_SharedBufferMemoryD3D12SharedMemoryFileMappingHandle,
|
|
358
396
|
SharedTextureMemoryD3D12Resource = WGPUFeatureName_SharedTextureMemoryD3D12Resource,
|
|
359
397
|
ChromiumExperimentalSamplingResourceTable = WGPUFeatureName_ChromiumExperimentalSamplingResourceTable,
|
|
360
|
-
|
|
398
|
+
SubgroupSizeControl = WGPUFeatureName_SubgroupSizeControl,
|
|
361
399
|
AtomicVec2uMinMax = WGPUFeatureName_AtomicVec2uMinMax,
|
|
362
400
|
Unorm16FormatsForExternalTexture = WGPUFeatureName_Unorm16FormatsForExternalTexture,
|
|
363
401
|
OpaqueYCbCrAndroidForExternalTexture = WGPUFeatureName_OpaqueYCbCrAndroidForExternalTexture,
|
|
364
402
|
Unorm16Filterable = WGPUFeatureName_Unorm16Filterable,
|
|
365
403
|
RenderPassRenderArea = WGPUFeatureName_RenderPassRenderArea,
|
|
404
|
+
AdapterPropertiesDrm = WGPUFeatureName_AdapterPropertiesDrm,
|
|
366
405
|
};
|
|
367
406
|
static_assert(sizeof(FeatureName) == sizeof(WGPUFeatureName), "sizeof mismatch for FeatureName");
|
|
368
407
|
static_assert(alignof(FeatureName) == alignof(WGPUFeatureName), "alignof mismatch for FeatureName");
|
|
@@ -453,6 +492,8 @@ static_assert(alignof(PowerPreference) == alignof(WGPUPowerPreference), "alignof
|
|
|
453
492
|
enum class PredefinedColorSpace : uint32_t {
|
|
454
493
|
SRGB = WGPUPredefinedColorSpace_SRGB,
|
|
455
494
|
DisplayP3 = WGPUPredefinedColorSpace_DisplayP3,
|
|
495
|
+
SRGBLinear = WGPUPredefinedColorSpace_SRGBLinear,
|
|
496
|
+
DisplayP3Linear = WGPUPredefinedColorSpace_DisplayP3Linear,
|
|
456
497
|
};
|
|
457
498
|
static_assert(sizeof(PredefinedColorSpace) == sizeof(WGPUPredefinedColorSpace), "sizeof mismatch for PredefinedColorSpace");
|
|
458
499
|
static_assert(alignof(PredefinedColorSpace) == alignof(WGPUPredefinedColorSpace), "alignof mismatch for PredefinedColorSpace");
|
|
@@ -666,7 +707,7 @@ enum class SType : uint32_t {
|
|
|
666
707
|
SharedTextureMemoryD3D12ResourceDescriptor = WGPUSType_SharedTextureMemoryD3D12ResourceDescriptor,
|
|
667
708
|
RequestAdapterOptionsAngleVirtualizationGroup = WGPUSType_RequestAdapterOptionsAngleVirtualizationGroup,
|
|
668
709
|
PipelineLayoutResourceTable = WGPUSType_PipelineLayoutResourceTable,
|
|
669
|
-
|
|
710
|
+
AdapterPropertiesDrm = WGPUSType_AdapterPropertiesDrm,
|
|
670
711
|
};
|
|
671
712
|
static_assert(sizeof(SType) == sizeof(WGPUSType), "sizeof mismatch for SType");
|
|
672
713
|
static_assert(alignof(SType) == alignof(WGPUSType), "alignof mismatch for SType");
|
|
@@ -940,6 +981,7 @@ enum class WGSLLanguageFeatureName : uint32_t {
|
|
|
940
981
|
TextureAndSamplerLet = WGPUWGSLLanguageFeatureName_TextureAndSamplerLet,
|
|
941
982
|
SubgroupUniformity = WGPUWGSLLanguageFeatureName_SubgroupUniformity,
|
|
942
983
|
TextureFormatsTier1 = WGPUWGSLLanguageFeatureName_TextureFormatsTier1,
|
|
984
|
+
LinearIndexing = WGPUWGSLLanguageFeatureName_LinearIndexing,
|
|
943
985
|
ChromiumTestingUnimplemented = WGPUWGSLLanguageFeatureName_ChromiumTestingUnimplemented,
|
|
944
986
|
ChromiumTestingUnsafeExperimental = WGPUWGSLLanguageFeatureName_ChromiumTestingUnsafeExperimental,
|
|
945
987
|
ChromiumTestingExperimental = WGPUWGSLLanguageFeatureName_ChromiumTestingExperimental,
|
|
@@ -951,9 +993,7 @@ enum class WGSLLanguageFeatureName : uint32_t {
|
|
|
951
993
|
FragmentDepth = WGPUWGSLLanguageFeatureName_FragmentDepth,
|
|
952
994
|
ImmediateAddressSpace = WGPUWGSLLanguageFeatureName_ImmediateAddressSpace,
|
|
953
995
|
BufferView = WGPUWGSLLanguageFeatureName_BufferView,
|
|
954
|
-
FilteringParameters = WGPUWGSLLanguageFeatureName_FilteringParameters,
|
|
955
996
|
SwizzleAssignment = WGPUWGSLLanguageFeatureName_SwizzleAssignment,
|
|
956
|
-
LinearIndexing = WGPUWGSLLanguageFeatureName_LinearIndexing,
|
|
957
997
|
};
|
|
958
998
|
static_assert(sizeof(WGSLLanguageFeatureName) == sizeof(WGPUWGSLLanguageFeatureName), "sizeof mismatch for WGSLLanguageFeatureName");
|
|
959
999
|
static_assert(alignof(WGSLLanguageFeatureName) == alignof(WGPUWGSLLanguageFeatureName), "alignof mismatch for WGSLLanguageFeatureName");
|
|
@@ -1235,7 +1275,7 @@ class RenderPassEncoder;
|
|
|
1235
1275
|
|
|
1236
1276
|
struct StringView;
|
|
1237
1277
|
struct AdapterPropertiesD3D;
|
|
1238
|
-
struct
|
|
1278
|
+
struct AdapterPropertiesDrm;
|
|
1239
1279
|
struct AdapterPropertiesVk;
|
|
1240
1280
|
struct AdapterPropertiesWGPU;
|
|
1241
1281
|
struct BindingResource;
|
|
@@ -1243,6 +1283,7 @@ struct BlendComponent;
|
|
|
1243
1283
|
struct BufferBindingLayout;
|
|
1244
1284
|
struct BufferHostMappedPointer;
|
|
1245
1285
|
struct Color;
|
|
1286
|
+
struct ColorSpaceDawn;
|
|
1246
1287
|
struct ColorTargetStateExpandResolveTextureDawn;
|
|
1247
1288
|
struct CommandBufferDescriptor;
|
|
1248
1289
|
struct CompatibilityModeLimits;
|
|
@@ -1545,8 +1586,6 @@ struct CallbackTypeBase<std::tuple<Args...>, T> {
|
|
|
1545
1586
|
using Callback = void (Args..., T);
|
|
1546
1587
|
};
|
|
1547
1588
|
} // namespace detail
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
1589
|
template <typename... T>
|
|
1551
1590
|
using BufferMapCallback = typename detail::CallbackTypeBase<std::tuple<MapAsyncStatus, StringView>, T...>::Callback;
|
|
1552
1591
|
template <typename... T>
|
|
@@ -1570,9 +1609,6 @@ using DeviceLostCallback = typename detail::CallbackTypeBase<std::tuple<const De
|
|
|
1570
1609
|
template <typename... T>
|
|
1571
1610
|
using UncapturedErrorCallback = typename detail::CallbackTypeBase<std::tuple<const Device&, ErrorType, StringView>, T...>::Callback;
|
|
1572
1611
|
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
1612
|
class Adapter : public ObjectBase<Adapter, WGPUAdapter> {
|
|
1577
1613
|
public:
|
|
1578
1614
|
using ObjectBase::ObjectBase;
|
|
@@ -1585,16 +1621,10 @@ class Adapter : public ObjectBase<Adapter, WGPUAdapter> {
|
|
|
1585
1621
|
inline Instance GetInstance() const;
|
|
1586
1622
|
inline ConvertibleStatus GetLimits(Limits * limits) const;
|
|
1587
1623
|
inline Bool HasFeature(FeatureName feature) const;
|
|
1588
|
-
template <typename F, typename T
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
Future RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const;
|
|
1593
|
-
template <typename L,
|
|
1594
|
-
typename Cb = RequestDeviceCallback<>,
|
|
1595
|
-
typename CbChar = std::function<void(RequestDeviceStatus status, Device device, const char* message)>,
|
|
1596
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1597
|
-
Future RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,L callback) const;
|
|
1624
|
+
template <typename F, typename T>
|
|
1625
|
+
Future RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode, F callback, T userdata) const;
|
|
1626
|
+
template <typename F>
|
|
1627
|
+
Future RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode, F callback) const;
|
|
1598
1628
|
|
|
1599
1629
|
|
|
1600
1630
|
private:
|
|
@@ -1643,16 +1673,10 @@ class Buffer : public ObjectBase<Buffer, WGPUBuffer> {
|
|
|
1643
1673
|
inline BufferMapState GetMapState() const;
|
|
1644
1674
|
inline uint64_t GetSize() const;
|
|
1645
1675
|
inline BufferUsage GetUsage() const;
|
|
1646
|
-
template <typename F, typename T
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
Future MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode,F callback, T userdata) const;
|
|
1651
|
-
template <typename L,
|
|
1652
|
-
typename Cb = BufferMapCallback<>,
|
|
1653
|
-
typename CbChar = std::function<void(MapAsyncStatus status, const char* message)>,
|
|
1654
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1655
|
-
Future MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode,L callback) const;
|
|
1676
|
+
template <typename F, typename T>
|
|
1677
|
+
Future MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode, F callback, T userdata) const;
|
|
1678
|
+
template <typename F>
|
|
1679
|
+
Future MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode, F callback) const;
|
|
1656
1680
|
inline ConvertibleStatus ReadMappedRange(size_t offset, void * data, size_t size) const;
|
|
1657
1681
|
inline void SetLabel(StringView label) const;
|
|
1658
1682
|
inline void Unmap() const;
|
|
@@ -1733,16 +1757,10 @@ class Device : public ObjectBase<Device, WGPUDevice> {
|
|
|
1733
1757
|
inline Buffer CreateBuffer(BufferDescriptor const * descriptor) const;
|
|
1734
1758
|
inline CommandEncoder CreateCommandEncoder(CommandEncoderDescriptor const * descriptor = nullptr) const;
|
|
1735
1759
|
inline ComputePipeline CreateComputePipeline(ComputePipelineDescriptor const * descriptor) const;
|
|
1736
|
-
template <typename F, typename T
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
Future CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const;
|
|
1741
|
-
template <typename L,
|
|
1742
|
-
typename Cb = CreateComputePipelineAsyncCallback<>,
|
|
1743
|
-
typename CbChar = std::function<void(CreatePipelineAsyncStatus status, ComputePipeline pipeline, const char* message)>,
|
|
1744
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1745
|
-
Future CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode,L callback) const;
|
|
1760
|
+
template <typename F, typename T>
|
|
1761
|
+
Future CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback, T userdata) const;
|
|
1762
|
+
template <typename F>
|
|
1763
|
+
Future CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback) const;
|
|
1746
1764
|
inline Buffer CreateErrorBuffer(BufferDescriptor const * descriptor) const;
|
|
1747
1765
|
inline ExternalTexture CreateErrorExternalTexture() const;
|
|
1748
1766
|
inline ShaderModule CreateErrorShaderModule(ShaderModuleDescriptor const * descriptor, StringView errorMessage) const;
|
|
@@ -1752,16 +1770,10 @@ class Device : public ObjectBase<Device, WGPUDevice> {
|
|
|
1752
1770
|
inline QuerySet CreateQuerySet(QuerySetDescriptor const * descriptor) const;
|
|
1753
1771
|
inline RenderBundleEncoder CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const;
|
|
1754
1772
|
inline RenderPipeline CreateRenderPipeline(RenderPipelineDescriptor const * descriptor) const;
|
|
1755
|
-
template <typename F, typename T
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
Future CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const;
|
|
1760
|
-
template <typename L,
|
|
1761
|
-
typename Cb = CreateRenderPipelineAsyncCallback<>,
|
|
1762
|
-
typename CbChar = std::function<void(CreatePipelineAsyncStatus status, RenderPipeline pipeline, const char* message)>,
|
|
1763
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1764
|
-
Future CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode,L callback) const;
|
|
1773
|
+
template <typename F, typename T>
|
|
1774
|
+
Future CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback, T userdata) const;
|
|
1775
|
+
template <typename F>
|
|
1776
|
+
Future CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback) const;
|
|
1765
1777
|
inline ResourceTable CreateResourceTable(ResourceTableDescriptor const * descriptor) const;
|
|
1766
1778
|
inline Sampler CreateSampler(SamplerDescriptor const * descriptor = nullptr) const;
|
|
1767
1779
|
inline ShaderModule CreateShaderModule(ShaderModuleDescriptor const * descriptor) const;
|
|
@@ -1780,28 +1792,16 @@ class Device : public ObjectBase<Device, WGPUDevice> {
|
|
|
1780
1792
|
inline SharedFence ImportSharedFence(SharedFenceDescriptor const * descriptor) const;
|
|
1781
1793
|
inline SharedTextureMemory ImportSharedTextureMemory(SharedTextureMemoryDescriptor const * descriptor) const;
|
|
1782
1794
|
inline void InjectError(ErrorType type, StringView message) const;
|
|
1783
|
-
template <typename F, typename T
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
Future PopErrorScope(CallbackMode callbackMode,F callback, T userdata) const;
|
|
1788
|
-
template <typename L,
|
|
1789
|
-
typename Cb = PopErrorScopeCallback<>,
|
|
1790
|
-
typename CbChar = std::function<void(PopErrorScopeStatus status, ErrorType type, const char* message)>,
|
|
1791
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1792
|
-
Future PopErrorScope(CallbackMode callbackMode,L callback) const;
|
|
1795
|
+
template <typename F, typename T>
|
|
1796
|
+
Future PopErrorScope(CallbackMode callbackMode, F callback, T userdata) const;
|
|
1797
|
+
template <typename F>
|
|
1798
|
+
Future PopErrorScope(CallbackMode callbackMode, F callback) const;
|
|
1793
1799
|
inline void PushErrorScope(ErrorFilter filter) const;
|
|
1794
1800
|
inline void SetLabel(StringView label) const;
|
|
1795
|
-
template <typename F, typename T
|
|
1796
|
-
typename Cb = LoggingCallback<T>,
|
|
1797
|
-
typename CbChar = void (LoggingType type, const char* message, T userdata),
|
|
1798
|
-
typename = std::enable_if_t<std::is_convertible_v<F, Cb*> || std::is_convertible_v<F, CbChar*>>>
|
|
1801
|
+
template <typename F, typename T>
|
|
1799
1802
|
void SetLoggingCallback(F callback, T userdata) const;
|
|
1800
|
-
template <typename
|
|
1801
|
-
|
|
1802
|
-
typename CbChar = std::function<void(LoggingType type, const char* message)>,
|
|
1803
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1804
|
-
void SetLoggingCallback(L callback) const;
|
|
1803
|
+
template <typename F>
|
|
1804
|
+
void SetLoggingCallback(F callback) const;
|
|
1805
1805
|
inline void Tick() const;
|
|
1806
1806
|
inline void ValidateTextureDescriptor(TextureDescriptor const * descriptor) const;
|
|
1807
1807
|
|
|
@@ -1838,16 +1838,10 @@ class Instance : public ObjectBase<Instance, WGPUInstance> {
|
|
|
1838
1838
|
inline void GetWGSLLanguageFeatures(SupportedWGSLLanguageFeatures * features) const;
|
|
1839
1839
|
inline Bool HasWGSLLanguageFeature(WGSLLanguageFeatureName feature) const;
|
|
1840
1840
|
inline void ProcessEvents() const;
|
|
1841
|
-
template <typename F, typename T
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
Future RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode,F callback, T userdata) const;
|
|
1846
|
-
template <typename L,
|
|
1847
|
-
typename Cb = RequestAdapterCallback<>,
|
|
1848
|
-
typename CbChar = std::function<void(RequestAdapterStatus status, Adapter adapter, const char* message)>,
|
|
1849
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1850
|
-
Future RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode,L callback) const;
|
|
1841
|
+
template <typename F, typename T>
|
|
1842
|
+
Future RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode, F callback, T userdata) const;
|
|
1843
|
+
template <typename F>
|
|
1844
|
+
Future RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode, F callback) const;
|
|
1851
1845
|
inline WaitStatus WaitAny(size_t futureCount, FutureWaitInfo * futures, uint64_t timeoutNS) const;
|
|
1852
1846
|
|
|
1853
1847
|
inline WaitStatus WaitAny(Future f, uint64_t timeout) const;
|
|
@@ -1896,16 +1890,10 @@ class Queue : public ObjectBase<Queue, WGPUQueue> {
|
|
|
1896
1890
|
|
|
1897
1891
|
inline void CopyExternalTextureForBrowser(ImageCopyExternalTexture const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize, CopyTextureForBrowserOptions const * options) const;
|
|
1898
1892
|
inline void CopyTextureForBrowser(TexelCopyTextureInfo const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize, CopyTextureForBrowserOptions const * options) const;
|
|
1899
|
-
template <typename F, typename T
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
Future OnSubmittedWorkDone(CallbackMode callbackMode,F callback, T userdata) const;
|
|
1904
|
-
template <typename L,
|
|
1905
|
-
typename Cb = QueueWorkDoneCallback<>,
|
|
1906
|
-
typename CbChar = std::function<void(QueueWorkDoneStatus status, const char* message)>,
|
|
1907
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1908
|
-
Future OnSubmittedWorkDone(CallbackMode callbackMode,L callback) const;
|
|
1893
|
+
template <typename F, typename T>
|
|
1894
|
+
Future OnSubmittedWorkDone(CallbackMode callbackMode, F callback, T userdata) const;
|
|
1895
|
+
template <typename F>
|
|
1896
|
+
Future OnSubmittedWorkDone(CallbackMode callbackMode, F callback) const;
|
|
1909
1897
|
inline void SetLabel(StringView label) const;
|
|
1910
1898
|
inline void Submit(size_t commandCount, CommandBuffer const * commands) const;
|
|
1911
1899
|
inline void WriteBuffer(Buffer const& buffer, uint64_t bufferOffset, void const * data, size_t size) const;
|
|
@@ -1956,6 +1944,7 @@ class ResourceTable : public ObjectBase<ResourceTable, WGPUResourceTable> {
|
|
|
1956
1944
|
inline uint32_t GetSize() const;
|
|
1957
1945
|
inline uint32_t InsertBinding(BindingResource const * resource) const;
|
|
1958
1946
|
inline ConvertibleStatus RemoveBinding(uint32_t slot) const;
|
|
1947
|
+
inline void SetLabel(StringView label) const;
|
|
1959
1948
|
inline ConvertibleStatus Update(uint32_t slot, BindingResource const * resource) const;
|
|
1960
1949
|
|
|
1961
1950
|
|
|
@@ -1984,16 +1973,10 @@ class ShaderModule : public ObjectBase<ShaderModule, WGPUShaderModule> {
|
|
|
1984
1973
|
using ObjectBase::ObjectBase;
|
|
1985
1974
|
using ObjectBase::operator=;
|
|
1986
1975
|
|
|
1987
|
-
template <typename F, typename T
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
Future GetCompilationInfo(CallbackMode callbackMode,F callback, T userdata) const;
|
|
1992
|
-
template <typename L,
|
|
1993
|
-
typename Cb = CompilationInfoCallback<>,
|
|
1994
|
-
typename CbChar = std::function<void(CompilationInfoRequestStatus status, CompilationInfo const * compilationInfo)>,
|
|
1995
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1996
|
-
Future GetCompilationInfo(CallbackMode callbackMode,L callback) const;
|
|
1976
|
+
template <typename F, typename T>
|
|
1977
|
+
Future GetCompilationInfo(CallbackMode callbackMode, F callback, T userdata) const;
|
|
1978
|
+
template <typename F>
|
|
1979
|
+
Future GetCompilationInfo(CallbackMode callbackMode, F callback) const;
|
|
1997
1980
|
inline void SetLabel(StringView label) const;
|
|
1998
1981
|
|
|
1999
1982
|
|
|
@@ -2235,54 +2218,52 @@ static_assert(offsetof(ChainedStruct, nextInChain) == offsetof(WGPUChainedStruct
|
|
|
2235
2218
|
static_assert(offsetof(ChainedStruct, sType) == offsetof(WGPUChainedStruct, sType),
|
|
2236
2219
|
"offsetof mismatch for ChainedStruct::sType");
|
|
2237
2220
|
|
|
2238
|
-
|
|
2239
2221
|
// Can be chained in AdapterInfo
|
|
2240
2222
|
struct AdapterPropertiesD3D : ChainedStructOut {
|
|
2241
2223
|
inline AdapterPropertiesD3D();
|
|
2242
|
-
|
|
2243
2224
|
struct Init;
|
|
2244
2225
|
inline AdapterPropertiesD3D(Init&& init);
|
|
2245
2226
|
inline operator const WGPUAdapterPropertiesD3D&() const noexcept;
|
|
2246
2227
|
|
|
2247
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2228
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(uint32_t));
|
|
2248
2229
|
alignas(kFirstMemberAlignment) uint32_t shaderModel;
|
|
2249
2230
|
};
|
|
2250
2231
|
|
|
2251
2232
|
// Can be chained in AdapterInfo
|
|
2252
|
-
struct
|
|
2253
|
-
inline
|
|
2254
|
-
|
|
2233
|
+
struct AdapterPropertiesDrm : ChainedStructOut {
|
|
2234
|
+
inline AdapterPropertiesDrm();
|
|
2255
2235
|
struct Init;
|
|
2256
|
-
inline
|
|
2257
|
-
inline operator const
|
|
2236
|
+
inline AdapterPropertiesDrm(Init&& init);
|
|
2237
|
+
inline operator const WGPUAdapterPropertiesDrm&() const noexcept;
|
|
2258
2238
|
|
|
2259
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2260
|
-
alignas(kFirstMemberAlignment)
|
|
2261
|
-
|
|
2262
|
-
|
|
2239
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(Bool));
|
|
2240
|
+
alignas(kFirstMemberAlignment) Bool hasPrimary = false;
|
|
2241
|
+
Bool hasRender = false;
|
|
2242
|
+
uint64_t primaryMajor = 0;
|
|
2243
|
+
uint64_t primaryMinor = 0;
|
|
2244
|
+
uint64_t renderMajor = 0;
|
|
2245
|
+
uint64_t renderMinor = 0;
|
|
2263
2246
|
};
|
|
2264
2247
|
|
|
2265
2248
|
// Can be chained in AdapterInfo
|
|
2266
2249
|
struct AdapterPropertiesVk : ChainedStructOut {
|
|
2267
2250
|
inline AdapterPropertiesVk();
|
|
2268
|
-
|
|
2269
2251
|
struct Init;
|
|
2270
2252
|
inline AdapterPropertiesVk(Init&& init);
|
|
2271
2253
|
inline operator const WGPUAdapterPropertiesVk&() const noexcept;
|
|
2272
2254
|
|
|
2273
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2255
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(uint32_t));
|
|
2274
2256
|
alignas(kFirstMemberAlignment) uint32_t driverVersion;
|
|
2275
2257
|
};
|
|
2276
2258
|
|
|
2277
2259
|
// Can be chained in AdapterInfo
|
|
2278
2260
|
struct AdapterPropertiesWGPU : ChainedStructOut {
|
|
2279
2261
|
inline AdapterPropertiesWGPU();
|
|
2280
|
-
|
|
2281
2262
|
struct Init;
|
|
2282
2263
|
inline AdapterPropertiesWGPU(Init&& init);
|
|
2283
2264
|
inline operator const WGPUAdapterPropertiesWGPU&() const noexcept;
|
|
2284
2265
|
|
|
2285
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2266
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(BackendType));
|
|
2286
2267
|
alignas(kFirstMemberAlignment) BackendType backendType = BackendType::Undefined;
|
|
2287
2268
|
};
|
|
2288
2269
|
|
|
@@ -2317,7 +2298,6 @@ struct BufferBindingLayout {
|
|
|
2317
2298
|
// Can be chained in BufferDescriptor
|
|
2318
2299
|
struct BufferHostMappedPointer : ChainedStruct {
|
|
2319
2300
|
inline BufferHostMappedPointer();
|
|
2320
|
-
|
|
2321
2301
|
struct Init;
|
|
2322
2302
|
inline BufferHostMappedPointer(Init&& init);
|
|
2323
2303
|
inline operator const WGPUBufferHostMappedPointer&() const noexcept;
|
|
@@ -2337,10 +2317,19 @@ struct Color {
|
|
|
2337
2317
|
double a;
|
|
2338
2318
|
};
|
|
2339
2319
|
|
|
2320
|
+
struct ColorSpaceDawn {
|
|
2321
|
+
inline operator const WGPUColorSpaceDawn&() const noexcept;
|
|
2322
|
+
|
|
2323
|
+
ChainedStruct const * nextInChain = nullptr;
|
|
2324
|
+
ColorSpacePrimariesDawn primaries = {};
|
|
2325
|
+
ColorSpaceTransferDawn transfer = ColorSpaceTransferDawn::Identity;
|
|
2326
|
+
ColorSpaceYCbCrRangeDawn yCbCrRange = ColorSpaceYCbCrRangeDawn::Identity;
|
|
2327
|
+
ColorSpaceYCbCrMatrixDawn yCbCrMatrix = ColorSpaceYCbCrMatrixDawn::Identity;
|
|
2328
|
+
};
|
|
2329
|
+
|
|
2340
2330
|
// Can be chained in ColorTargetState
|
|
2341
2331
|
struct ColorTargetStateExpandResolveTextureDawn : ChainedStruct {
|
|
2342
2332
|
inline ColorTargetStateExpandResolveTextureDawn();
|
|
2343
|
-
|
|
2344
2333
|
struct Init;
|
|
2345
2334
|
inline ColorTargetStateExpandResolveTextureDawn(Init&& init);
|
|
2346
2335
|
inline operator const WGPUColorTargetStateExpandResolveTextureDawn&() const noexcept;
|
|
@@ -2359,12 +2348,11 @@ struct CommandBufferDescriptor {
|
|
|
2359
2348
|
// Can be chained in Limits
|
|
2360
2349
|
struct CompatibilityModeLimits : ChainedStructOut {
|
|
2361
2350
|
inline CompatibilityModeLimits();
|
|
2362
|
-
|
|
2363
2351
|
struct Init;
|
|
2364
2352
|
inline CompatibilityModeLimits(Init&& init);
|
|
2365
2353
|
inline operator const WGPUCompatibilityModeLimits&() const noexcept;
|
|
2366
2354
|
|
|
2367
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2355
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(uint32_t));
|
|
2368
2356
|
alignas(kFirstMemberAlignment) uint32_t maxStorageBuffersInVertexStage = kLimitU32Undefined;
|
|
2369
2357
|
uint32_t maxStorageTexturesInVertexStage = kLimitU32Undefined;
|
|
2370
2358
|
uint32_t maxStorageBuffersInFragmentStage = kLimitU32Undefined;
|
|
@@ -2396,19 +2384,17 @@ struct CopyTextureForBrowserOptions {
|
|
|
2396
2384
|
// Can be chained in AdapterInfo
|
|
2397
2385
|
struct DawnAdapterPropertiesPowerPreference : ChainedStructOut {
|
|
2398
2386
|
inline DawnAdapterPropertiesPowerPreference();
|
|
2399
|
-
|
|
2400
2387
|
struct Init;
|
|
2401
2388
|
inline DawnAdapterPropertiesPowerPreference(Init&& init);
|
|
2402
2389
|
inline operator const WGPUDawnAdapterPropertiesPowerPreference&() const noexcept;
|
|
2403
2390
|
|
|
2404
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2391
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(PowerPreference));
|
|
2405
2392
|
alignas(kFirstMemberAlignment) PowerPreference powerPreference = PowerPreference::Undefined;
|
|
2406
2393
|
};
|
|
2407
2394
|
|
|
2408
2395
|
// Can be chained in BufferDescriptor
|
|
2409
2396
|
struct DawnBufferDescriptorErrorInfoFromWireClient : ChainedStruct {
|
|
2410
2397
|
inline DawnBufferDescriptorErrorInfoFromWireClient();
|
|
2411
|
-
|
|
2412
2398
|
struct Init;
|
|
2413
2399
|
inline DawnBufferDescriptorErrorInfoFromWireClient(Init&& init);
|
|
2414
2400
|
inline operator const WGPUDawnBufferDescriptorErrorInfoFromWireClient&() const noexcept;
|
|
@@ -2420,7 +2406,6 @@ struct DawnBufferDescriptorErrorInfoFromWireClient : ChainedStruct {
|
|
|
2420
2406
|
// Can be chained in DeviceDescriptor
|
|
2421
2407
|
struct DawnCacheDeviceDescriptor : ChainedStruct {
|
|
2422
2408
|
inline DawnCacheDeviceDescriptor();
|
|
2423
|
-
|
|
2424
2409
|
struct Init;
|
|
2425
2410
|
inline DawnCacheDeviceDescriptor(Init&& init);
|
|
2426
2411
|
inline operator const WGPUDawnCacheDeviceDescriptor&() const noexcept;
|
|
@@ -2435,7 +2420,6 @@ struct DawnCacheDeviceDescriptor : ChainedStruct {
|
|
|
2435
2420
|
// Can be chained in CompilationMessage
|
|
2436
2421
|
struct DawnCompilationMessageUtf16 : ChainedStruct {
|
|
2437
2422
|
inline DawnCompilationMessageUtf16();
|
|
2438
|
-
|
|
2439
2423
|
struct Init;
|
|
2440
2424
|
inline DawnCompilationMessageUtf16(Init&& init);
|
|
2441
2425
|
inline operator const WGPUDawnCompilationMessageUtf16&() const noexcept;
|
|
@@ -2449,7 +2433,6 @@ struct DawnCompilationMessageUtf16 : ChainedStruct {
|
|
|
2449
2433
|
// Can be chained in DeviceDescriptor
|
|
2450
2434
|
struct DawnConsumeAdapterDescriptor : ChainedStruct {
|
|
2451
2435
|
inline DawnConsumeAdapterDescriptor();
|
|
2452
|
-
|
|
2453
2436
|
struct Init;
|
|
2454
2437
|
inline DawnConsumeAdapterDescriptor(Init&& init);
|
|
2455
2438
|
inline operator const WGPUDawnConsumeAdapterDescriptor&() const noexcept;
|
|
@@ -2461,7 +2444,6 @@ struct DawnConsumeAdapterDescriptor : ChainedStruct {
|
|
|
2461
2444
|
// Can be chained in DeviceDescriptor
|
|
2462
2445
|
struct DawnDeviceAllocatorControl : ChainedStruct {
|
|
2463
2446
|
inline DawnDeviceAllocatorControl();
|
|
2464
|
-
|
|
2465
2447
|
struct Init;
|
|
2466
2448
|
inline DawnDeviceAllocatorControl(Init&& init);
|
|
2467
2449
|
inline operator const WGPUDawnDeviceAllocatorControl&() const noexcept;
|
|
@@ -2480,7 +2462,6 @@ struct DawnDrmFormatProperties {
|
|
|
2480
2462
|
// Can be chained in CommandEncoderDescriptor
|
|
2481
2463
|
struct DawnEncoderInternalUsageDescriptor : ChainedStruct {
|
|
2482
2464
|
inline DawnEncoderInternalUsageDescriptor();
|
|
2483
|
-
|
|
2484
2465
|
struct Init;
|
|
2485
2466
|
inline DawnEncoderInternalUsageDescriptor(Init&& init);
|
|
2486
2467
|
inline operator const WGPUDawnEncoderInternalUsageDescriptor&() const noexcept;
|
|
@@ -2492,7 +2473,6 @@ struct DawnEncoderInternalUsageDescriptor : ChainedStruct {
|
|
|
2492
2473
|
// Can be chained in BufferDescriptor
|
|
2493
2474
|
struct DawnFakeBufferOOMForTesting : ChainedStruct {
|
|
2494
2475
|
inline DawnFakeBufferOOMForTesting();
|
|
2495
|
-
|
|
2496
2476
|
struct Init;
|
|
2497
2477
|
inline DawnFakeBufferOOMForTesting(Init&& init);
|
|
2498
2478
|
inline operator const WGPUDawnFakeBufferOOMForTesting&() const noexcept;
|
|
@@ -2506,28 +2486,25 @@ struct DawnFakeBufferOOMForTesting : ChainedStruct {
|
|
|
2506
2486
|
// Can be chained in DeviceDescriptor
|
|
2507
2487
|
struct DawnFakeDeviceInitializeErrorForTesting : ChainedStruct {
|
|
2508
2488
|
inline DawnFakeDeviceInitializeErrorForTesting();
|
|
2509
|
-
|
|
2510
2489
|
struct Init;
|
|
2511
2490
|
inline DawnFakeDeviceInitializeErrorForTesting(Init&& init);
|
|
2512
2491
|
inline operator const WGPUDawnFakeDeviceInitializeErrorForTesting&() const noexcept;
|
|
2513
2492
|
|
|
2514
|
-
};
|
|
2493
|
+
};
|
|
2515
2494
|
|
|
2516
2495
|
// Can be chained in Limits
|
|
2517
2496
|
struct DawnHostMappedPointerLimits : ChainedStructOut {
|
|
2518
2497
|
inline DawnHostMappedPointerLimits();
|
|
2519
|
-
|
|
2520
2498
|
struct Init;
|
|
2521
2499
|
inline DawnHostMappedPointerLimits(Init&& init);
|
|
2522
2500
|
inline operator const WGPUDawnHostMappedPointerLimits&() const noexcept;
|
|
2523
2501
|
|
|
2524
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2502
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(uint32_t));
|
|
2525
2503
|
alignas(kFirstMemberAlignment) uint32_t hostMappedPointerAlignment = kLimitU32Undefined;
|
|
2526
2504
|
};
|
|
2527
2505
|
|
|
2528
2506
|
struct DawnInjectedInvalidSType : ChainedStruct {
|
|
2529
2507
|
inline DawnInjectedInvalidSType();
|
|
2530
|
-
|
|
2531
2508
|
struct Init;
|
|
2532
2509
|
inline DawnInjectedInvalidSType(Init&& init);
|
|
2533
2510
|
inline operator const WGPUDawnInjectedInvalidSType&() const noexcept;
|
|
@@ -2539,7 +2516,6 @@ struct DawnInjectedInvalidSType : ChainedStruct {
|
|
|
2539
2516
|
// Can be chained in RenderPassDescriptor
|
|
2540
2517
|
struct DawnRenderPassSampleCount : ChainedStruct {
|
|
2541
2518
|
inline DawnRenderPassSampleCount();
|
|
2542
|
-
|
|
2543
2519
|
struct Init;
|
|
2544
2520
|
inline DawnRenderPassSampleCount(Init&& init);
|
|
2545
2521
|
inline operator const WGPUDawnRenderPassSampleCount&() const noexcept;
|
|
@@ -2551,7 +2527,6 @@ struct DawnRenderPassSampleCount : ChainedStruct {
|
|
|
2551
2527
|
// Can be chained in ShaderModuleDescriptor
|
|
2552
2528
|
struct DawnShaderModuleSPIRVOptionsDescriptor : ChainedStruct {
|
|
2553
2529
|
inline DawnShaderModuleSPIRVOptionsDescriptor();
|
|
2554
|
-
|
|
2555
2530
|
struct Init;
|
|
2556
2531
|
inline DawnShaderModuleSPIRVOptionsDescriptor(Init&& init);
|
|
2557
2532
|
inline operator const WGPUDawnShaderModuleSPIRVOptionsDescriptor&() const noexcept;
|
|
@@ -2563,19 +2538,17 @@ struct DawnShaderModuleSPIRVOptionsDescriptor : ChainedStruct {
|
|
|
2563
2538
|
// Can be chained in Limits
|
|
2564
2539
|
struct DawnTexelCopyBufferRowAlignmentLimits : ChainedStructOut {
|
|
2565
2540
|
inline DawnTexelCopyBufferRowAlignmentLimits();
|
|
2566
|
-
|
|
2567
2541
|
struct Init;
|
|
2568
2542
|
inline DawnTexelCopyBufferRowAlignmentLimits(Init&& init);
|
|
2569
2543
|
inline operator const WGPUDawnTexelCopyBufferRowAlignmentLimits&() const noexcept;
|
|
2570
2544
|
|
|
2571
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2545
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(uint32_t));
|
|
2572
2546
|
alignas(kFirstMemberAlignment) uint32_t minTexelCopyBufferRowAlignment = kLimitU32Undefined;
|
|
2573
2547
|
};
|
|
2574
2548
|
|
|
2575
2549
|
// Can be chained in TextureDescriptor
|
|
2576
2550
|
struct DawnTextureInternalUsageDescriptor : ChainedStruct {
|
|
2577
2551
|
inline DawnTextureInternalUsageDescriptor();
|
|
2578
|
-
|
|
2579
2552
|
struct Init;
|
|
2580
2553
|
inline DawnTextureInternalUsageDescriptor(Init&& init);
|
|
2581
2554
|
inline operator const WGPUDawnTextureInternalUsageDescriptor&() const noexcept;
|
|
@@ -2589,7 +2562,6 @@ struct DawnTextureInternalUsageDescriptor : ChainedStruct {
|
|
|
2589
2562
|
// Can be chained in DeviceDescriptor
|
|
2590
2563
|
struct DawnTogglesDescriptor : ChainedStruct {
|
|
2591
2564
|
inline DawnTogglesDescriptor();
|
|
2592
|
-
|
|
2593
2565
|
struct Init;
|
|
2594
2566
|
inline DawnTogglesDescriptor(Init&& init);
|
|
2595
2567
|
inline operator const WGPUDawnTogglesDescriptor&() const noexcept;
|
|
@@ -2604,7 +2576,6 @@ struct DawnTogglesDescriptor : ChainedStruct {
|
|
|
2604
2576
|
// Can be chained in InstanceDescriptor
|
|
2605
2577
|
struct DawnWGSLBlocklist : ChainedStruct {
|
|
2606
2578
|
inline DawnWGSLBlocklist();
|
|
2607
|
-
|
|
2608
2579
|
struct Init;
|
|
2609
2580
|
inline DawnWGSLBlocklist(Init&& init);
|
|
2610
2581
|
inline operator const WGPUDawnWGSLBlocklist&() const noexcept;
|
|
@@ -2617,7 +2588,6 @@ struct DawnWGSLBlocklist : ChainedStruct {
|
|
|
2617
2588
|
// Can be chained in InstanceDescriptor
|
|
2618
2589
|
struct DawnWireWGSLControl : ChainedStruct {
|
|
2619
2590
|
inline DawnWireWGSLControl();
|
|
2620
|
-
|
|
2621
2591
|
struct Init;
|
|
2622
2592
|
inline DawnWireWGSLControl(Init&& init);
|
|
2623
2593
|
inline operator const WGPUDawnWireWGSLControl&() const noexcept;
|
|
@@ -2631,7 +2601,6 @@ struct DawnWireWGSLControl : ChainedStruct {
|
|
|
2631
2601
|
// Can be chained in SurfaceDescriptor
|
|
2632
2602
|
struct EmscriptenSurfaceSourceCanvasHTMLSelector : ChainedStruct {
|
|
2633
2603
|
inline EmscriptenSurfaceSourceCanvasHTMLSelector();
|
|
2634
|
-
|
|
2635
2604
|
struct Init;
|
|
2636
2605
|
inline EmscriptenSurfaceSourceCanvasHTMLSelector(Init&& init);
|
|
2637
2606
|
inline operator const WGPUEmscriptenSurfaceSourceCanvasHTMLSelector&() const noexcept;
|
|
@@ -2658,7 +2627,6 @@ struct Extent3D {
|
|
|
2658
2627
|
// Can be chained in BindGroupEntry
|
|
2659
2628
|
struct ExternalTextureBindingEntry : ChainedStruct {
|
|
2660
2629
|
inline ExternalTextureBindingEntry();
|
|
2661
|
-
|
|
2662
2630
|
struct Init;
|
|
2663
2631
|
inline ExternalTextureBindingEntry(Init&& init);
|
|
2664
2632
|
inline operator const WGPUExternalTextureBindingEntry&() const noexcept;
|
|
@@ -2670,12 +2638,11 @@ struct ExternalTextureBindingEntry : ChainedStruct {
|
|
|
2670
2638
|
// Can be chained in BindGroupLayoutEntry
|
|
2671
2639
|
struct ExternalTextureBindingLayout : ChainedStruct {
|
|
2672
2640
|
inline ExternalTextureBindingLayout();
|
|
2673
|
-
|
|
2674
2641
|
struct Init;
|
|
2675
2642
|
inline ExternalTextureBindingLayout(Init&& init);
|
|
2676
2643
|
inline operator const WGPUExternalTextureBindingLayout&() const noexcept;
|
|
2677
2644
|
|
|
2678
|
-
};
|
|
2645
|
+
};
|
|
2679
2646
|
|
|
2680
2647
|
struct Future {
|
|
2681
2648
|
inline operator const WGPUFuture&() const noexcept;
|
|
@@ -2739,7 +2706,6 @@ struct PassTimestampWrites {
|
|
|
2739
2706
|
// Can be chained in PipelineLayoutDescriptor
|
|
2740
2707
|
struct PipelineLayoutResourceTable : ChainedStruct {
|
|
2741
2708
|
inline PipelineLayoutResourceTable();
|
|
2742
|
-
|
|
2743
2709
|
struct Init;
|
|
2744
2710
|
inline PipelineLayoutResourceTable(Init&& init);
|
|
2745
2711
|
inline operator const WGPUPipelineLayoutResourceTable&() const noexcept;
|
|
@@ -2821,7 +2787,6 @@ struct RenderPassDepthStencilAttachment {
|
|
|
2821
2787
|
// Can be chained in RenderPassDescriptor
|
|
2822
2788
|
struct RenderPassDescriptorResolveRect : ChainedStruct {
|
|
2823
2789
|
inline RenderPassDescriptorResolveRect();
|
|
2824
|
-
|
|
2825
2790
|
struct Init;
|
|
2826
2791
|
inline RenderPassDescriptorResolveRect(Init&& init);
|
|
2827
2792
|
inline operator const WGPURenderPassDescriptorResolveRect&() const noexcept;
|
|
@@ -2838,7 +2803,6 @@ struct RenderPassDescriptorResolveRect : ChainedStruct {
|
|
|
2838
2803
|
// Can be chained in RenderPassDescriptor
|
|
2839
2804
|
struct RenderPassMaxDrawCount : ChainedStruct {
|
|
2840
2805
|
inline RenderPassMaxDrawCount();
|
|
2841
|
-
|
|
2842
2806
|
struct Init;
|
|
2843
2807
|
inline RenderPassMaxDrawCount(Init&& init);
|
|
2844
2808
|
inline operator const WGPURenderPassMaxDrawCount&() const noexcept;
|
|
@@ -2850,17 +2814,15 @@ struct RenderPassMaxDrawCount : ChainedStruct {
|
|
|
2850
2814
|
// Can be chained in RequestAdapterOptions
|
|
2851
2815
|
struct RequestAdapterWebGPUBackendOptions : ChainedStruct {
|
|
2852
2816
|
inline RequestAdapterWebGPUBackendOptions();
|
|
2853
|
-
|
|
2854
2817
|
struct Init;
|
|
2855
2818
|
inline RequestAdapterWebGPUBackendOptions(Init&& init);
|
|
2856
2819
|
inline operator const WGPURequestAdapterWebGPUBackendOptions&() const noexcept;
|
|
2857
2820
|
|
|
2858
|
-
};
|
|
2821
|
+
};
|
|
2859
2822
|
|
|
2860
2823
|
// Can be chained in RequestAdapterOptions
|
|
2861
2824
|
struct RequestAdapterWebXROptions : ChainedStruct {
|
|
2862
2825
|
inline RequestAdapterWebXROptions();
|
|
2863
|
-
|
|
2864
2826
|
struct Init;
|
|
2865
2827
|
inline RequestAdapterWebXROptions(Init&& init);
|
|
2866
2828
|
inline operator const WGPURequestAdapterWebXROptions&() const noexcept;
|
|
@@ -2887,7 +2849,6 @@ struct SamplerBindingLayout {
|
|
|
2887
2849
|
// Can be chained in ShaderModuleDescriptor
|
|
2888
2850
|
struct ShaderModuleCompilationOptions : ChainedStruct {
|
|
2889
2851
|
inline ShaderModuleCompilationOptions();
|
|
2890
|
-
|
|
2891
2852
|
struct Init;
|
|
2892
2853
|
inline ShaderModuleCompilationOptions(Init&& init);
|
|
2893
2854
|
inline operator const WGPUShaderModuleCompilationOptions&() const noexcept;
|
|
@@ -2899,7 +2860,6 @@ struct ShaderModuleCompilationOptions : ChainedStruct {
|
|
|
2899
2860
|
// Can be chained in ShaderModuleDescriptor
|
|
2900
2861
|
struct ShaderSourceSPIRV : ChainedStruct {
|
|
2901
2862
|
inline ShaderSourceSPIRV();
|
|
2902
|
-
|
|
2903
2863
|
struct Init;
|
|
2904
2864
|
inline ShaderSourceSPIRV(Init&& init);
|
|
2905
2865
|
inline operator const WGPUShaderSourceSPIRV&() const noexcept;
|
|
@@ -2912,7 +2872,6 @@ struct ShaderSourceSPIRV : ChainedStruct {
|
|
|
2912
2872
|
// Can be chained in ShaderModuleDescriptor
|
|
2913
2873
|
struct ShaderSourceWGSL : ChainedStruct {
|
|
2914
2874
|
inline ShaderSourceWGSL();
|
|
2915
|
-
|
|
2916
2875
|
struct Init;
|
|
2917
2876
|
inline ShaderSourceWGSL(Init&& init);
|
|
2918
2877
|
inline operator const WGPUShaderSourceWGSL&() const noexcept;
|
|
@@ -2934,7 +2893,6 @@ struct SharedBufferMemoryBeginAccessDescriptor {
|
|
|
2934
2893
|
// Can be chained in SharedBufferMemoryDescriptor
|
|
2935
2894
|
struct SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor : ChainedStruct {
|
|
2936
2895
|
inline SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor();
|
|
2937
|
-
|
|
2938
2896
|
struct Init;
|
|
2939
2897
|
inline SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor(Init&& init);
|
|
2940
2898
|
inline operator const WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor&() const noexcept;
|
|
@@ -2975,7 +2933,6 @@ struct SharedBufferMemoryProperties {
|
|
|
2975
2933
|
// Can be chained in SharedFenceDescriptor
|
|
2976
2934
|
struct SharedFenceDXGISharedHandleDescriptor : ChainedStruct {
|
|
2977
2935
|
inline SharedFenceDXGISharedHandleDescriptor();
|
|
2978
|
-
|
|
2979
2936
|
struct Init;
|
|
2980
2937
|
inline SharedFenceDXGISharedHandleDescriptor(Init&& init);
|
|
2981
2938
|
inline operator const WGPUSharedFenceDXGISharedHandleDescriptor&() const noexcept;
|
|
@@ -2987,19 +2944,17 @@ struct SharedFenceDXGISharedHandleDescriptor : ChainedStruct {
|
|
|
2987
2944
|
// Can be chained in SharedFenceExportInfo
|
|
2988
2945
|
struct SharedFenceDXGISharedHandleExportInfo : ChainedStructOut {
|
|
2989
2946
|
inline SharedFenceDXGISharedHandleExportInfo();
|
|
2990
|
-
|
|
2991
2947
|
struct Init;
|
|
2992
2948
|
inline SharedFenceDXGISharedHandleExportInfo(Init&& init);
|
|
2993
2949
|
inline operator const WGPUSharedFenceDXGISharedHandleExportInfo&() const noexcept;
|
|
2994
2950
|
|
|
2995
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2951
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(void *));
|
|
2996
2952
|
alignas(kFirstMemberAlignment) void * handle;
|
|
2997
2953
|
};
|
|
2998
2954
|
|
|
2999
2955
|
// Can be chained in SharedFenceDescriptor
|
|
3000
2956
|
struct SharedFenceEGLSyncDescriptor : ChainedStruct {
|
|
3001
2957
|
inline SharedFenceEGLSyncDescriptor();
|
|
3002
|
-
|
|
3003
2958
|
struct Init;
|
|
3004
2959
|
inline SharedFenceEGLSyncDescriptor(Init&& init);
|
|
3005
2960
|
inline operator const WGPUSharedFenceEGLSyncDescriptor&() const noexcept;
|
|
@@ -3011,19 +2966,17 @@ struct SharedFenceEGLSyncDescriptor : ChainedStruct {
|
|
|
3011
2966
|
// Can be chained in SharedFenceExportInfo
|
|
3012
2967
|
struct SharedFenceEGLSyncExportInfo : ChainedStructOut {
|
|
3013
2968
|
inline SharedFenceEGLSyncExportInfo();
|
|
3014
|
-
|
|
3015
2969
|
struct Init;
|
|
3016
2970
|
inline SharedFenceEGLSyncExportInfo(Init&& init);
|
|
3017
2971
|
inline operator const WGPUSharedFenceEGLSyncExportInfo&() const noexcept;
|
|
3018
2972
|
|
|
3019
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2973
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(void *));
|
|
3020
2974
|
alignas(kFirstMemberAlignment) void * sync;
|
|
3021
2975
|
};
|
|
3022
2976
|
|
|
3023
2977
|
// Can be chained in SharedFenceDescriptor
|
|
3024
2978
|
struct SharedFenceMTLSharedEventDescriptor : ChainedStruct {
|
|
3025
2979
|
inline SharedFenceMTLSharedEventDescriptor();
|
|
3026
|
-
|
|
3027
2980
|
struct Init;
|
|
3028
2981
|
inline SharedFenceMTLSharedEventDescriptor(Init&& init);
|
|
3029
2982
|
inline operator const WGPUSharedFenceMTLSharedEventDescriptor&() const noexcept;
|
|
@@ -3035,19 +2988,17 @@ struct SharedFenceMTLSharedEventDescriptor : ChainedStruct {
|
|
|
3035
2988
|
// Can be chained in SharedFenceExportInfo
|
|
3036
2989
|
struct SharedFenceMTLSharedEventExportInfo : ChainedStructOut {
|
|
3037
2990
|
inline SharedFenceMTLSharedEventExportInfo();
|
|
3038
|
-
|
|
3039
2991
|
struct Init;
|
|
3040
2992
|
inline SharedFenceMTLSharedEventExportInfo(Init&& init);
|
|
3041
2993
|
inline operator const WGPUSharedFenceMTLSharedEventExportInfo&() const noexcept;
|
|
3042
2994
|
|
|
3043
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
2995
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(void *));
|
|
3044
2996
|
alignas(kFirstMemberAlignment) void * sharedEvent;
|
|
3045
2997
|
};
|
|
3046
2998
|
|
|
3047
2999
|
// Can be chained in SharedFenceDescriptor
|
|
3048
3000
|
struct SharedFenceSyncFDDescriptor : ChainedStruct {
|
|
3049
3001
|
inline SharedFenceSyncFDDescriptor();
|
|
3050
|
-
|
|
3051
3002
|
struct Init;
|
|
3052
3003
|
inline SharedFenceSyncFDDescriptor(Init&& init);
|
|
3053
3004
|
inline operator const WGPUSharedFenceSyncFDDescriptor&() const noexcept;
|
|
@@ -3059,19 +3010,17 @@ struct SharedFenceSyncFDDescriptor : ChainedStruct {
|
|
|
3059
3010
|
// Can be chained in SharedFenceExportInfo
|
|
3060
3011
|
struct SharedFenceSyncFDExportInfo : ChainedStructOut {
|
|
3061
3012
|
inline SharedFenceSyncFDExportInfo();
|
|
3062
|
-
|
|
3063
3013
|
struct Init;
|
|
3064
3014
|
inline SharedFenceSyncFDExportInfo(Init&& init);
|
|
3065
3015
|
inline operator const WGPUSharedFenceSyncFDExportInfo&() const noexcept;
|
|
3066
3016
|
|
|
3067
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3017
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(int));
|
|
3068
3018
|
alignas(kFirstMemberAlignment) int handle;
|
|
3069
3019
|
};
|
|
3070
3020
|
|
|
3071
3021
|
// Can be chained in SharedFenceDescriptor
|
|
3072
3022
|
struct SharedFenceVkSemaphoreOpaqueFDDescriptor : ChainedStruct {
|
|
3073
3023
|
inline SharedFenceVkSemaphoreOpaqueFDDescriptor();
|
|
3074
|
-
|
|
3075
3024
|
struct Init;
|
|
3076
3025
|
inline SharedFenceVkSemaphoreOpaqueFDDescriptor(Init&& init);
|
|
3077
3026
|
inline operator const WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor&() const noexcept;
|
|
@@ -3083,19 +3032,17 @@ struct SharedFenceVkSemaphoreOpaqueFDDescriptor : ChainedStruct {
|
|
|
3083
3032
|
// Can be chained in SharedFenceExportInfo
|
|
3084
3033
|
struct SharedFenceVkSemaphoreOpaqueFDExportInfo : ChainedStructOut {
|
|
3085
3034
|
inline SharedFenceVkSemaphoreOpaqueFDExportInfo();
|
|
3086
|
-
|
|
3087
3035
|
struct Init;
|
|
3088
3036
|
inline SharedFenceVkSemaphoreOpaqueFDExportInfo(Init&& init);
|
|
3089
3037
|
inline operator const WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo&() const noexcept;
|
|
3090
3038
|
|
|
3091
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3039
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(int));
|
|
3092
3040
|
alignas(kFirstMemberAlignment) int handle;
|
|
3093
3041
|
};
|
|
3094
3042
|
|
|
3095
3043
|
// Can be chained in SharedFenceDescriptor
|
|
3096
3044
|
struct SharedFenceVkSemaphoreZirconHandleDescriptor : ChainedStruct {
|
|
3097
3045
|
inline SharedFenceVkSemaphoreZirconHandleDescriptor();
|
|
3098
|
-
|
|
3099
3046
|
struct Init;
|
|
3100
3047
|
inline SharedFenceVkSemaphoreZirconHandleDescriptor(Init&& init);
|
|
3101
3048
|
inline operator const WGPUSharedFenceVkSemaphoreZirconHandleDescriptor&() const noexcept;
|
|
@@ -3107,19 +3054,17 @@ struct SharedFenceVkSemaphoreZirconHandleDescriptor : ChainedStruct {
|
|
|
3107
3054
|
// Can be chained in SharedFenceExportInfo
|
|
3108
3055
|
struct SharedFenceVkSemaphoreZirconHandleExportInfo : ChainedStructOut {
|
|
3109
3056
|
inline SharedFenceVkSemaphoreZirconHandleExportInfo();
|
|
3110
|
-
|
|
3111
3057
|
struct Init;
|
|
3112
3058
|
inline SharedFenceVkSemaphoreZirconHandleExportInfo(Init&& init);
|
|
3113
3059
|
inline operator const WGPUSharedFenceVkSemaphoreZirconHandleExportInfo&() const noexcept;
|
|
3114
3060
|
|
|
3115
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3061
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(uint32_t));
|
|
3116
3062
|
alignas(kFirstMemberAlignment) uint32_t handle;
|
|
3117
3063
|
};
|
|
3118
3064
|
|
|
3119
3065
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3120
3066
|
struct SharedTextureMemoryAHardwareBufferDescriptor : ChainedStruct {
|
|
3121
3067
|
inline SharedTextureMemoryAHardwareBufferDescriptor();
|
|
3122
|
-
|
|
3123
3068
|
struct Init;
|
|
3124
3069
|
inline SharedTextureMemoryAHardwareBufferDescriptor(Init&& init);
|
|
3125
3070
|
inline operator const WGPUSharedTextureMemoryAHardwareBufferDescriptor&() const noexcept;
|
|
@@ -3131,7 +3076,6 @@ struct SharedTextureMemoryAHardwareBufferDescriptor : ChainedStruct {
|
|
|
3131
3076
|
// Can be chained in SharedTextureMemoryBeginAccessDescriptor
|
|
3132
3077
|
struct SharedTextureMemoryD3D11BeginState : ChainedStruct {
|
|
3133
3078
|
inline SharedTextureMemoryD3D11BeginState();
|
|
3134
|
-
|
|
3135
3079
|
struct Init;
|
|
3136
3080
|
inline SharedTextureMemoryD3D11BeginState(Init&& init);
|
|
3137
3081
|
inline operator const WGPUSharedTextureMemoryD3D11BeginState&() const noexcept;
|
|
@@ -3143,7 +3087,6 @@ struct SharedTextureMemoryD3D11BeginState : ChainedStruct {
|
|
|
3143
3087
|
// Can be chained in SharedTextureMemoryBeginAccessDescriptor
|
|
3144
3088
|
struct SharedTextureMemoryD3DSwapchainBeginState : ChainedStruct {
|
|
3145
3089
|
inline SharedTextureMemoryD3DSwapchainBeginState();
|
|
3146
|
-
|
|
3147
3090
|
struct Init;
|
|
3148
3091
|
inline SharedTextureMemoryD3DSwapchainBeginState(Init&& init);
|
|
3149
3092
|
inline operator const WGPUSharedTextureMemoryD3DSwapchainBeginState&() const noexcept;
|
|
@@ -3163,7 +3106,6 @@ struct SharedTextureMemoryDmaBufPlane {
|
|
|
3163
3106
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3164
3107
|
struct SharedTextureMemoryDXGISharedHandleDescriptor : ChainedStruct {
|
|
3165
3108
|
inline SharedTextureMemoryDXGISharedHandleDescriptor();
|
|
3166
|
-
|
|
3167
3109
|
struct Init;
|
|
3168
3110
|
inline SharedTextureMemoryDXGISharedHandleDescriptor(Init&& init);
|
|
3169
3111
|
inline operator const WGPUSharedTextureMemoryDXGISharedHandleDescriptor&() const noexcept;
|
|
@@ -3176,7 +3118,6 @@ struct SharedTextureMemoryDXGISharedHandleDescriptor : ChainedStruct {
|
|
|
3176
3118
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3177
3119
|
struct SharedTextureMemoryEGLImageDescriptor : ChainedStruct {
|
|
3178
3120
|
inline SharedTextureMemoryEGLImageDescriptor();
|
|
3179
|
-
|
|
3180
3121
|
struct Init;
|
|
3181
3122
|
inline SharedTextureMemoryEGLImageDescriptor(Init&& init);
|
|
3182
3123
|
inline operator const WGPUSharedTextureMemoryEGLImageDescriptor&() const noexcept;
|
|
@@ -3188,7 +3129,6 @@ struct SharedTextureMemoryEGLImageDescriptor : ChainedStruct {
|
|
|
3188
3129
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3189
3130
|
struct SharedTextureMemoryIOSurfaceDescriptor : ChainedStruct {
|
|
3190
3131
|
inline SharedTextureMemoryIOSurfaceDescriptor();
|
|
3191
|
-
|
|
3192
3132
|
struct Init;
|
|
3193
3133
|
inline SharedTextureMemoryIOSurfaceDescriptor(Init&& init);
|
|
3194
3134
|
inline operator const WGPUSharedTextureMemoryIOSurfaceDescriptor&() const noexcept;
|
|
@@ -3201,7 +3141,6 @@ struct SharedTextureMemoryIOSurfaceDescriptor : ChainedStruct {
|
|
|
3201
3141
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3202
3142
|
struct SharedTextureMemoryOpaqueFDDescriptor : ChainedStruct {
|
|
3203
3143
|
inline SharedTextureMemoryOpaqueFDDescriptor();
|
|
3204
|
-
|
|
3205
3144
|
struct Init;
|
|
3206
3145
|
inline SharedTextureMemoryOpaqueFDDescriptor(Init&& init);
|
|
3207
3146
|
inline operator const WGPUSharedTextureMemoryOpaqueFDDescriptor&() const noexcept;
|
|
@@ -3217,7 +3156,6 @@ struct SharedTextureMemoryOpaqueFDDescriptor : ChainedStruct {
|
|
|
3217
3156
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3218
3157
|
struct SharedTextureMemoryVkDedicatedAllocationDescriptor : ChainedStruct {
|
|
3219
3158
|
inline SharedTextureMemoryVkDedicatedAllocationDescriptor();
|
|
3220
|
-
|
|
3221
3159
|
struct Init;
|
|
3222
3160
|
inline SharedTextureMemoryVkDedicatedAllocationDescriptor(Init&& init);
|
|
3223
3161
|
inline operator const WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor&() const noexcept;
|
|
@@ -3229,7 +3167,6 @@ struct SharedTextureMemoryVkDedicatedAllocationDescriptor : ChainedStruct {
|
|
|
3229
3167
|
// Can be chained in SharedTextureMemoryBeginAccessDescriptor
|
|
3230
3168
|
struct SharedTextureMemoryVkImageLayoutBeginState : ChainedStruct {
|
|
3231
3169
|
inline SharedTextureMemoryVkImageLayoutBeginState();
|
|
3232
|
-
|
|
3233
3170
|
struct Init;
|
|
3234
3171
|
inline SharedTextureMemoryVkImageLayoutBeginState(Init&& init);
|
|
3235
3172
|
inline operator const WGPUSharedTextureMemoryVkImageLayoutBeginState&() const noexcept;
|
|
@@ -3242,12 +3179,11 @@ struct SharedTextureMemoryVkImageLayoutBeginState : ChainedStruct {
|
|
|
3242
3179
|
// Can be chained in SharedTextureMemoryEndAccessState
|
|
3243
3180
|
struct SharedTextureMemoryVkImageLayoutEndState : ChainedStructOut {
|
|
3244
3181
|
inline SharedTextureMemoryVkImageLayoutEndState();
|
|
3245
|
-
|
|
3246
3182
|
struct Init;
|
|
3247
3183
|
inline SharedTextureMemoryVkImageLayoutEndState(Init&& init);
|
|
3248
3184
|
inline operator const WGPUSharedTextureMemoryVkImageLayoutEndState&() const noexcept;
|
|
3249
3185
|
|
|
3250
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3186
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(int32_t));
|
|
3251
3187
|
alignas(kFirstMemberAlignment) int32_t oldLayout;
|
|
3252
3188
|
int32_t newLayout;
|
|
3253
3189
|
};
|
|
@@ -3255,7 +3191,6 @@ struct SharedTextureMemoryVkImageLayoutEndState : ChainedStructOut {
|
|
|
3255
3191
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
3256
3192
|
struct SharedTextureMemoryZirconHandleDescriptor : ChainedStruct {
|
|
3257
3193
|
inline SharedTextureMemoryZirconHandleDescriptor();
|
|
3258
|
-
|
|
3259
3194
|
struct Init;
|
|
3260
3195
|
inline SharedTextureMemoryZirconHandleDescriptor(Init&& init);
|
|
3261
3196
|
inline operator const WGPUSharedTextureMemoryZirconHandleDescriptor&() const noexcept;
|
|
@@ -3268,7 +3203,6 @@ struct SharedTextureMemoryZirconHandleDescriptor : ChainedStruct {
|
|
|
3268
3203
|
// Can be chained in BindGroupLayoutEntry
|
|
3269
3204
|
struct StaticSamplerBindingLayout : ChainedStruct {
|
|
3270
3205
|
inline StaticSamplerBindingLayout();
|
|
3271
|
-
|
|
3272
3206
|
struct Init;
|
|
3273
3207
|
inline StaticSamplerBindingLayout(Init&& init);
|
|
3274
3208
|
inline operator const WGPUStaticSamplerBindingLayout&() const noexcept;
|
|
@@ -3383,7 +3317,6 @@ struct SurfaceCapabilities {
|
|
|
3383
3317
|
// Can be chained in SurfaceDescriptor
|
|
3384
3318
|
struct SurfaceColorManagement : ChainedStruct {
|
|
3385
3319
|
inline SurfaceColorManagement();
|
|
3386
|
-
|
|
3387
3320
|
struct Init;
|
|
3388
3321
|
inline SurfaceColorManagement(Init&& init);
|
|
3389
3322
|
inline operator const WGPUSurfaceColorManagement&() const noexcept;
|
|
@@ -3411,7 +3344,6 @@ struct SurfaceConfiguration {
|
|
|
3411
3344
|
// Can be chained in SurfaceDescriptor
|
|
3412
3345
|
struct SurfaceDescriptorFromWindowsCoreWindow : ChainedStruct {
|
|
3413
3346
|
inline SurfaceDescriptorFromWindowsCoreWindow();
|
|
3414
|
-
|
|
3415
3347
|
struct Init;
|
|
3416
3348
|
inline SurfaceDescriptorFromWindowsCoreWindow(Init&& init);
|
|
3417
3349
|
inline operator const WGPUSurfaceDescriptorFromWindowsCoreWindow&() const noexcept;
|
|
@@ -3423,7 +3355,6 @@ struct SurfaceDescriptorFromWindowsCoreWindow : ChainedStruct {
|
|
|
3423
3355
|
// Can be chained in SurfaceDescriptor
|
|
3424
3356
|
struct SurfaceDescriptorFromWindowsUWPSwapChainPanel : ChainedStruct {
|
|
3425
3357
|
inline SurfaceDescriptorFromWindowsUWPSwapChainPanel();
|
|
3426
|
-
|
|
3427
3358
|
struct Init;
|
|
3428
3359
|
inline SurfaceDescriptorFromWindowsUWPSwapChainPanel(Init&& init);
|
|
3429
3360
|
inline operator const WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel&() const noexcept;
|
|
@@ -3435,7 +3366,6 @@ struct SurfaceDescriptorFromWindowsUWPSwapChainPanel : ChainedStruct {
|
|
|
3435
3366
|
// Can be chained in SurfaceDescriptor
|
|
3436
3367
|
struct SurfaceDescriptorFromWindowsWinUISwapChainPanel : ChainedStruct {
|
|
3437
3368
|
inline SurfaceDescriptorFromWindowsWinUISwapChainPanel();
|
|
3438
|
-
|
|
3439
3369
|
struct Init;
|
|
3440
3370
|
inline SurfaceDescriptorFromWindowsWinUISwapChainPanel(Init&& init);
|
|
3441
3371
|
inline operator const WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel&() const noexcept;
|
|
@@ -3447,7 +3377,6 @@ struct SurfaceDescriptorFromWindowsWinUISwapChainPanel : ChainedStruct {
|
|
|
3447
3377
|
// Can be chained in SurfaceDescriptor
|
|
3448
3378
|
struct SurfaceSourceAndroidNativeWindow : ChainedStruct {
|
|
3449
3379
|
inline SurfaceSourceAndroidNativeWindow();
|
|
3450
|
-
|
|
3451
3380
|
struct Init;
|
|
3452
3381
|
inline SurfaceSourceAndroidNativeWindow(Init&& init);
|
|
3453
3382
|
inline operator const WGPUSurfaceSourceAndroidNativeWindow&() const noexcept;
|
|
@@ -3459,7 +3388,6 @@ struct SurfaceSourceAndroidNativeWindow : ChainedStruct {
|
|
|
3459
3388
|
// Can be chained in SurfaceDescriptor
|
|
3460
3389
|
struct SurfaceSourceMetalLayer : ChainedStruct {
|
|
3461
3390
|
inline SurfaceSourceMetalLayer();
|
|
3462
|
-
|
|
3463
3391
|
struct Init;
|
|
3464
3392
|
inline SurfaceSourceMetalLayer(Init&& init);
|
|
3465
3393
|
inline operator const WGPUSurfaceSourceMetalLayer&() const noexcept;
|
|
@@ -3471,7 +3399,6 @@ struct SurfaceSourceMetalLayer : ChainedStruct {
|
|
|
3471
3399
|
// Can be chained in SurfaceDescriptor
|
|
3472
3400
|
struct SurfaceSourceWaylandSurface : ChainedStruct {
|
|
3473
3401
|
inline SurfaceSourceWaylandSurface();
|
|
3474
|
-
|
|
3475
3402
|
struct Init;
|
|
3476
3403
|
inline SurfaceSourceWaylandSurface(Init&& init);
|
|
3477
3404
|
inline operator const WGPUSurfaceSourceWaylandSurface&() const noexcept;
|
|
@@ -3484,7 +3411,6 @@ struct SurfaceSourceWaylandSurface : ChainedStruct {
|
|
|
3484
3411
|
// Can be chained in SurfaceDescriptor
|
|
3485
3412
|
struct SurfaceSourceWindowsHWND : ChainedStruct {
|
|
3486
3413
|
inline SurfaceSourceWindowsHWND();
|
|
3487
|
-
|
|
3488
3414
|
struct Init;
|
|
3489
3415
|
inline SurfaceSourceWindowsHWND(Init&& init);
|
|
3490
3416
|
inline operator const WGPUSurfaceSourceWindowsHWND&() const noexcept;
|
|
@@ -3497,7 +3423,6 @@ struct SurfaceSourceWindowsHWND : ChainedStruct {
|
|
|
3497
3423
|
// Can be chained in SurfaceDescriptor
|
|
3498
3424
|
struct SurfaceSourceXCBWindow : ChainedStruct {
|
|
3499
3425
|
inline SurfaceSourceXCBWindow();
|
|
3500
|
-
|
|
3501
3426
|
struct Init;
|
|
3502
3427
|
inline SurfaceSourceXCBWindow(Init&& init);
|
|
3503
3428
|
inline operator const WGPUSurfaceSourceXCBWindow&() const noexcept;
|
|
@@ -3510,7 +3435,6 @@ struct SurfaceSourceXCBWindow : ChainedStruct {
|
|
|
3510
3435
|
// Can be chained in SurfaceDescriptor
|
|
3511
3436
|
struct SurfaceSourceXlibWindow : ChainedStruct {
|
|
3512
3437
|
inline SurfaceSourceXlibWindow();
|
|
3513
|
-
|
|
3514
3438
|
struct Init;
|
|
3515
3439
|
inline SurfaceSourceXlibWindow(Init&& init);
|
|
3516
3440
|
inline operator const WGPUSurfaceSourceXlibWindow&() const noexcept;
|
|
@@ -3531,7 +3455,6 @@ struct SurfaceTexture {
|
|
|
3531
3455
|
// Can be chained in BindGroupEntry
|
|
3532
3456
|
struct TexelBufferBindingEntry : ChainedStruct {
|
|
3533
3457
|
inline TexelBufferBindingEntry();
|
|
3534
|
-
|
|
3535
3458
|
struct Init;
|
|
3536
3459
|
inline TexelBufferBindingEntry(Init&& init);
|
|
3537
3460
|
inline operator const WGPUTexelBufferBindingEntry&() const noexcept;
|
|
@@ -3543,7 +3466,6 @@ struct TexelBufferBindingEntry : ChainedStruct {
|
|
|
3543
3466
|
// Can be chained in BindGroupLayoutEntry
|
|
3544
3467
|
struct TexelBufferBindingLayout : ChainedStruct {
|
|
3545
3468
|
inline TexelBufferBindingLayout();
|
|
3546
|
-
|
|
3547
3469
|
struct Init;
|
|
3548
3470
|
inline TexelBufferBindingLayout(Init&& init);
|
|
3549
3471
|
inline operator const WGPUTexelBufferBindingLayout&() const noexcept;
|
|
@@ -3583,7 +3505,6 @@ struct TextureBindingLayout {
|
|
|
3583
3505
|
// Can be chained in TextureDescriptor
|
|
3584
3506
|
struct TextureBindingViewDimension : ChainedStruct {
|
|
3585
3507
|
inline TextureBindingViewDimension();
|
|
3586
|
-
|
|
3587
3508
|
struct Init;
|
|
3588
3509
|
inline TextureBindingViewDimension(Init&& init);
|
|
3589
3510
|
inline operator const WGPUTextureBindingViewDimension&() const noexcept;
|
|
@@ -3614,7 +3535,6 @@ struct VertexAttribute {
|
|
|
3614
3535
|
// Can be chained in TextureViewDescriptor
|
|
3615
3536
|
struct YCbCrVkDescriptor : ChainedStruct {
|
|
3616
3537
|
inline YCbCrVkDescriptor();
|
|
3617
|
-
|
|
3618
3538
|
struct Init;
|
|
3619
3539
|
inline YCbCrVkDescriptor(Init&& init);
|
|
3620
3540
|
inline operator const WGPUYCbCrVkDescriptor&() const noexcept;
|
|
@@ -3637,7 +3557,6 @@ struct YCbCrVkDescriptor : ChainedStruct {
|
|
|
3637
3557
|
// Can be chained in AdapterInfo
|
|
3638
3558
|
struct AdapterPropertiesMemoryHeaps : ChainedStructOut {
|
|
3639
3559
|
inline AdapterPropertiesMemoryHeaps();
|
|
3640
|
-
|
|
3641
3560
|
struct Init;
|
|
3642
3561
|
inline AdapterPropertiesMemoryHeaps(Init&& init);
|
|
3643
3562
|
inline ~AdapterPropertiesMemoryHeaps();
|
|
@@ -3647,7 +3566,7 @@ struct AdapterPropertiesMemoryHeaps : ChainedStructOut {
|
|
|
3647
3566
|
inline AdapterPropertiesMemoryHeaps& operator=(AdapterPropertiesMemoryHeaps&&);
|
|
3648
3567
|
inline operator const WGPUAdapterPropertiesMemoryHeaps&() const noexcept;
|
|
3649
3568
|
|
|
3650
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3569
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(size_t));
|
|
3651
3570
|
alignas(kFirstMemberAlignment) size_t const heapCount = {};
|
|
3652
3571
|
MemoryHeapInfo const * const heapInfo = nullptr;
|
|
3653
3572
|
|
|
@@ -3659,7 +3578,6 @@ struct AdapterPropertiesMemoryHeaps : ChainedStructOut {
|
|
|
3659
3578
|
// Can be chained in AdapterInfo
|
|
3660
3579
|
struct AdapterPropertiesSubgroupMatrixConfigs : ChainedStructOut {
|
|
3661
3580
|
inline AdapterPropertiesSubgroupMatrixConfigs();
|
|
3662
|
-
|
|
3663
3581
|
struct Init;
|
|
3664
3582
|
inline AdapterPropertiesSubgroupMatrixConfigs(Init&& init);
|
|
3665
3583
|
inline ~AdapterPropertiesSubgroupMatrixConfigs();
|
|
@@ -3669,7 +3587,7 @@ struct AdapterPropertiesSubgroupMatrixConfigs : ChainedStructOut {
|
|
|
3669
3587
|
inline AdapterPropertiesSubgroupMatrixConfigs& operator=(AdapterPropertiesSubgroupMatrixConfigs&&);
|
|
3670
3588
|
inline operator const WGPUAdapterPropertiesSubgroupMatrixConfigs&() const noexcept;
|
|
3671
3589
|
|
|
3672
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3590
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(size_t));
|
|
3673
3591
|
alignas(kFirstMemberAlignment) size_t const configCount = {};
|
|
3674
3592
|
SubgroupMatrixConfig const * const configs = nullptr;
|
|
3675
3593
|
|
|
@@ -3766,7 +3684,6 @@ struct ComputeState {
|
|
|
3766
3684
|
// Can be chained in DawnFormatCapabilities
|
|
3767
3685
|
struct DawnDrmFormatCapabilities : ChainedStructOut {
|
|
3768
3686
|
inline DawnDrmFormatCapabilities();
|
|
3769
|
-
|
|
3770
3687
|
struct Init;
|
|
3771
3688
|
inline DawnDrmFormatCapabilities(Init&& init);
|
|
3772
3689
|
inline ~DawnDrmFormatCapabilities();
|
|
@@ -3776,7 +3693,7 @@ struct DawnDrmFormatCapabilities : ChainedStructOut {
|
|
|
3776
3693
|
inline DawnDrmFormatCapabilities& operator=(DawnDrmFormatCapabilities&&);
|
|
3777
3694
|
inline operator const WGPUDawnDrmFormatCapabilities&() const noexcept;
|
|
3778
3695
|
|
|
3779
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3696
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(size_t));
|
|
3780
3697
|
alignas(kFirstMemberAlignment) size_t const propertiesCount = {};
|
|
3781
3698
|
DawnDrmFormatProperties const * const properties = nullptr;
|
|
3782
3699
|
|
|
@@ -3886,7 +3803,6 @@ struct Limits {
|
|
|
3886
3803
|
// Can be chained in PipelineLayoutDescriptor
|
|
3887
3804
|
struct PipelineLayoutPixelLocalStorage : ChainedStruct {
|
|
3888
3805
|
inline PipelineLayoutPixelLocalStorage();
|
|
3889
|
-
|
|
3890
3806
|
struct Init;
|
|
3891
3807
|
inline PipelineLayoutPixelLocalStorage(Init&& init);
|
|
3892
3808
|
inline operator const WGPUPipelineLayoutPixelLocalStorage&() const noexcept;
|
|
@@ -3912,7 +3828,6 @@ struct RenderPassColorAttachment {
|
|
|
3912
3828
|
// Can be chained in RenderPassDescriptor
|
|
3913
3829
|
struct RenderPassRenderAreaRect : ChainedStruct {
|
|
3914
3830
|
inline RenderPassRenderAreaRect();
|
|
3915
|
-
|
|
3916
3831
|
struct Init;
|
|
3917
3832
|
inline RenderPassRenderAreaRect(Init&& init);
|
|
3918
3833
|
inline operator const WGPURenderPassRenderAreaRect&() const noexcept;
|
|
@@ -3992,12 +3907,11 @@ struct SharedFenceExportInfo {
|
|
|
3992
3907
|
// Can be chained in SharedTextureMemoryProperties
|
|
3993
3908
|
struct SharedTextureMemoryAHardwareBufferProperties : ChainedStructOut {
|
|
3994
3909
|
inline SharedTextureMemoryAHardwareBufferProperties();
|
|
3995
|
-
|
|
3996
3910
|
struct Init;
|
|
3997
3911
|
inline SharedTextureMemoryAHardwareBufferProperties(Init&& init);
|
|
3998
3912
|
inline operator const WGPUSharedTextureMemoryAHardwareBufferProperties&() const noexcept;
|
|
3999
3913
|
|
|
4000
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3914
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(YCbCrVkDescriptor));
|
|
4001
3915
|
alignas(kFirstMemberAlignment) YCbCrVkDescriptor yCbCrInfo = {};
|
|
4002
3916
|
};
|
|
4003
3917
|
|
|
@@ -4015,7 +3929,6 @@ struct SharedTextureMemoryBeginAccessDescriptor {
|
|
|
4015
3929
|
// Can be chained in SharedTextureMemoryDescriptor
|
|
4016
3930
|
struct SharedTextureMemoryDmaBufDescriptor : ChainedStruct {
|
|
4017
3931
|
inline SharedTextureMemoryDmaBufDescriptor();
|
|
4018
|
-
|
|
4019
3932
|
struct Init;
|
|
4020
3933
|
inline SharedTextureMemoryDmaBufDescriptor(Init&& init);
|
|
4021
3934
|
inline operator const WGPUSharedTextureMemoryDmaBufDescriptor&() const noexcept;
|
|
@@ -4031,12 +3944,11 @@ struct SharedTextureMemoryDmaBufDescriptor : ChainedStruct {
|
|
|
4031
3944
|
// Can be chained in SharedTextureMemoryEndAccessState
|
|
4032
3945
|
struct SharedTextureMemoryMetalEndAccessState : ChainedStructOut {
|
|
4033
3946
|
inline SharedTextureMemoryMetalEndAccessState();
|
|
4034
|
-
|
|
4035
3947
|
struct Init;
|
|
4036
3948
|
inline SharedTextureMemoryMetalEndAccessState(Init&& init);
|
|
4037
3949
|
inline operator const WGPUSharedTextureMemoryMetalEndAccessState&() const noexcept;
|
|
4038
3950
|
|
|
4039
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(
|
|
3951
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStructOut), alignof(Future));
|
|
4040
3952
|
alignas(kFirstMemberAlignment) Future commandsScheduledFuture = {};
|
|
4041
3953
|
};
|
|
4042
3954
|
|
|
@@ -4066,7 +3978,6 @@ struct TexelCopyTextureInfo {
|
|
|
4066
3978
|
// Can be chained in TextureViewDescriptor
|
|
4067
3979
|
struct TextureComponentSwizzleDescriptor : ChainedStruct {
|
|
4068
3980
|
inline TextureComponentSwizzleDescriptor();
|
|
4069
|
-
|
|
4070
3981
|
struct Init;
|
|
4071
3982
|
inline TextureComponentSwizzleDescriptor(Init&& init);
|
|
4072
3983
|
inline operator const WGPUTextureComponentSwizzleDescriptor&() const noexcept;
|
|
@@ -4177,6 +4088,41 @@ struct DawnFormatCapabilities {
|
|
|
4177
4088
|
ChainedStructOut * nextInChain = nullptr;
|
|
4178
4089
|
};
|
|
4179
4090
|
|
|
4091
|
+
namespace detail {
|
|
4092
|
+
struct DeviceDescriptor {
|
|
4093
|
+
ChainedStruct const * nextInChain = nullptr;
|
|
4094
|
+
StringView label = {};
|
|
4095
|
+
size_t requiredFeatureCount = 0;
|
|
4096
|
+
FeatureName const * requiredFeatures = nullptr;
|
|
4097
|
+
Limits const * requiredLimits = nullptr;
|
|
4098
|
+
QueueDescriptor defaultQueue = {};
|
|
4099
|
+
WGPUDeviceLostCallbackInfo deviceLostCallbackInfo = WGPU_DEVICE_LOST_CALLBACK_INFO_INIT;
|
|
4100
|
+
WGPUUncapturedErrorCallbackInfo uncapturedErrorCallbackInfo = WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT;
|
|
4101
|
+
};
|
|
4102
|
+
} // namespace detail
|
|
4103
|
+
struct DeviceDescriptor : protected detail::DeviceDescriptor {
|
|
4104
|
+
inline DeviceDescriptor();
|
|
4105
|
+
struct Init;
|
|
4106
|
+
inline DeviceDescriptor(Init&& init);
|
|
4107
|
+
inline operator const WGPUDeviceDescriptor&() const noexcept;
|
|
4108
|
+
|
|
4109
|
+
using detail::DeviceDescriptor::nextInChain;
|
|
4110
|
+
using detail::DeviceDescriptor::label;
|
|
4111
|
+
using detail::DeviceDescriptor::requiredFeatureCount;
|
|
4112
|
+
using detail::DeviceDescriptor::requiredFeatures;
|
|
4113
|
+
using detail::DeviceDescriptor::requiredLimits;
|
|
4114
|
+
using detail::DeviceDescriptor::defaultQueue;
|
|
4115
|
+
|
|
4116
|
+
template <typename F, typename T>
|
|
4117
|
+
void SetDeviceLostCallback(CallbackMode callbackMode, F callback, T userdata);
|
|
4118
|
+
template <typename F>
|
|
4119
|
+
void SetDeviceLostCallback(CallbackMode callbackMode, F callback);
|
|
4120
|
+
template <typename F, typename T>
|
|
4121
|
+
void SetUncapturedErrorCallback(F callback, T userdata);
|
|
4122
|
+
template <typename F>
|
|
4123
|
+
void SetUncapturedErrorCallback(F callback);
|
|
4124
|
+
};
|
|
4125
|
+
|
|
4180
4126
|
struct PipelineLayoutDescriptor {
|
|
4181
4127
|
inline operator const WGPUPipelineLayoutDescriptor&() const noexcept;
|
|
4182
4128
|
|
|
@@ -4190,7 +4136,6 @@ struct PipelineLayoutDescriptor {
|
|
|
4190
4136
|
// Can be chained in RenderPassDescriptor
|
|
4191
4137
|
struct RenderPassPixelLocalStorage : ChainedStruct {
|
|
4192
4138
|
inline RenderPassPixelLocalStorage();
|
|
4193
|
-
|
|
4194
4139
|
struct Init;
|
|
4195
4140
|
inline RenderPassPixelLocalStorage(Init&& init);
|
|
4196
4141
|
inline operator const WGPURenderPassPixelLocalStorage&() const noexcept;
|
|
@@ -4302,51 +4247,273 @@ struct RenderPipelineDescriptor {
|
|
|
4302
4247
|
};
|
|
4303
4248
|
|
|
4304
4249
|
|
|
4250
|
+
// Callback info handling is generated and/or custom implemented here to convert the types between C and C++.
|
|
4305
4251
|
namespace detail {
|
|
4306
|
-
struct
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4252
|
+
struct Untyped {};
|
|
4253
|
+
|
|
4254
|
+
// The current interface of CppFTraits exposes the following values:
|
|
4255
|
+
// - CppFTraits::capturing: true if the callback is a capturing callback (i.e. a lambda that
|
|
4256
|
+
// captures its environment).
|
|
4257
|
+
// - CppFTraits::PtrT: The C++ callback function pointer type.
|
|
4258
|
+
// - CppFTraits::BaseArgsTuple: A tuple of the C++ arguments minus the user specified typed
|
|
4259
|
+
// parameter.
|
|
4260
|
+
//
|
|
4261
|
+
// Implementation notes:
|
|
4262
|
+
// - The |Untyped| struct is only used to differentiate whether |T| is a user specified type
|
|
4263
|
+
// in which case we need to strip the type from the callback arguments for speecialization
|
|
4264
|
+
// deduction.
|
|
4265
|
+
template <typename CppFT, typename CppFPtr, typename T>
|
|
4266
|
+
struct CppFTraitsImpl;
|
|
4267
|
+
// Specialization for raw function pointers.
|
|
4268
|
+
template <typename CppFT, typename R, typename... CppArgs, typename T>
|
|
4269
|
+
struct CppFTraitsImpl<CppFT, R(*)(CppArgs...), T> {
|
|
4270
|
+
using PtrT = R(*)(CppArgs...);
|
|
4271
|
+
static constexpr bool capturing = false;
|
|
4272
|
+
|
|
4273
|
+
static constexpr size_t NumCppArgs = sizeof...(CppArgs);
|
|
4274
|
+
using BaseArgsTuple = decltype([]<std::size_t... Is>(std::index_sequence<Is...>) {
|
|
4275
|
+
return std::type_identity<std::tuple<std::tuple_element_t<Is, std::tuple<CppArgs...>>...>>{};
|
|
4276
|
+
}(std::make_index_sequence<std::is_same_v<T, Untyped> ? NumCppArgs : NumCppArgs - 1>{})
|
|
4277
|
+
)::type;
|
|
4278
|
+
};
|
|
4279
|
+
// Specialization for member function pointers (lambdas);
|
|
4280
|
+
template <typename CppFT, typename R, typename C, typename... CppArgs, typename T>
|
|
4281
|
+
struct CppFTraitsImpl<CppFT, R(C::*)(CppArgs...) const, T> {
|
|
4282
|
+
using PtrT = R(*)(CppArgs...);
|
|
4283
|
+
static constexpr bool capturing = !std::is_convertible_v<CppFT, PtrT>;
|
|
4284
|
+
|
|
4285
|
+
static constexpr size_t NumCppArgs = sizeof...(CppArgs);
|
|
4286
|
+
using BaseArgsTuple = decltype([]<std::size_t... Is>(std::index_sequence<Is...>) {
|
|
4287
|
+
return std::type_identity<std::tuple<std::tuple_element_t<Is, std::tuple<CppArgs...>>...>>{};
|
|
4288
|
+
}(std::make_index_sequence<std::is_same_v<T, Untyped> ? NumCppArgs : NumCppArgs - 1>{})
|
|
4289
|
+
)::type;
|
|
4290
|
+
};
|
|
4291
|
+
template <typename CppFT, typename T = Untyped>
|
|
4292
|
+
struct CppFTraits : CppFTraitsImpl<CppFT, decltype(&CppFT::operator()), T> {};
|
|
4293
|
+
template <typename R, typename... CppArgs, typename T>
|
|
4294
|
+
struct CppFTraits<R(*)(CppArgs...), T> :
|
|
4295
|
+
CppFTraitsImpl<R(*)(CppArgs...), R(*)(CppArgs...), T> {};
|
|
4296
|
+
|
|
4297
|
+
// CArgConverter are specialization structs that specialize a conversion from a C CallbackInfo's
|
|
4298
|
+
// callback argument types to a set of valid C++ types. These specializations provide us a way to
|
|
4299
|
+
// support additional C++ callback types, i.e. converting raw pointers to more C++ friendly
|
|
4300
|
+
// structures when applicable.
|
|
4301
|
+
template <typename CInfoT, typename CppArgs>
|
|
4302
|
+
struct CArgConverter;
|
|
4303
|
+
template <>
|
|
4304
|
+
struct CArgConverter<WGPUBufferMapCallbackInfo, std::tuple<MapAsyncStatus, StringView>> {
|
|
4305
|
+
using Result = std::tuple<MapAsyncStatus, StringView>;
|
|
4306
|
+
static Result Convert(WGPUMapAsyncStatus status, WGPUStringView message) {
|
|
4307
|
+
return std::make_tuple(static_cast<MapAsyncStatus>(status), StringView {
|
|
4308
|
+
message.data,
|
|
4309
|
+
message.length
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4315
4312
|
};
|
|
4316
|
-
|
|
4317
|
-
struct
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
using
|
|
4313
|
+
template <>
|
|
4314
|
+
struct CArgConverter<WGPUCompilationInfoCallbackInfo, std::tuple<CompilationInfoRequestStatus, CompilationInfo const *>> {
|
|
4315
|
+
using Result = std::tuple<CompilationInfoRequestStatus, CompilationInfo const *>;
|
|
4316
|
+
static Result Convert(WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo) {
|
|
4317
|
+
return std::make_tuple(static_cast<CompilationInfoRequestStatus>(status), reinterpret_cast<CompilationInfo const*>(compilationInfo));
|
|
4318
|
+
}
|
|
4319
|
+
};
|
|
4320
|
+
template <>
|
|
4321
|
+
struct CArgConverter<WGPUCreateComputePipelineAsyncCallbackInfo, std::tuple<CreatePipelineAsyncStatus, ComputePipeline, StringView>> {
|
|
4322
|
+
using Result = std::tuple<CreatePipelineAsyncStatus, ComputePipeline, StringView>;
|
|
4323
|
+
static Result Convert(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message) {
|
|
4324
|
+
return std::make_tuple(static_cast<CreatePipelineAsyncStatus>(status), ComputePipeline::Acquire(pipeline), StringView {
|
|
4325
|
+
message.data,
|
|
4326
|
+
message.length
|
|
4327
|
+
});
|
|
4328
|
+
}
|
|
4329
|
+
};
|
|
4330
|
+
template <>
|
|
4331
|
+
struct CArgConverter<WGPUCreateRenderPipelineAsyncCallbackInfo, std::tuple<CreatePipelineAsyncStatus, RenderPipeline, StringView>> {
|
|
4332
|
+
using Result = std::tuple<CreatePipelineAsyncStatus, RenderPipeline, StringView>;
|
|
4333
|
+
static Result Convert(WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message) {
|
|
4334
|
+
return std::make_tuple(static_cast<CreatePipelineAsyncStatus>(status), RenderPipeline::Acquire(pipeline), StringView {
|
|
4335
|
+
message.data,
|
|
4336
|
+
message.length
|
|
4337
|
+
});
|
|
4338
|
+
}
|
|
4339
|
+
};
|
|
4340
|
+
template <>
|
|
4341
|
+
struct CArgConverter<WGPULoggingCallbackInfo, std::tuple<LoggingType, StringView>> {
|
|
4342
|
+
using Result = std::tuple<LoggingType, StringView>;
|
|
4343
|
+
static Result Convert(WGPULoggingType type, WGPUStringView message) {
|
|
4344
|
+
return std::make_tuple(static_cast<LoggingType>(type), StringView {
|
|
4345
|
+
message.data,
|
|
4346
|
+
message.length
|
|
4347
|
+
});
|
|
4348
|
+
}
|
|
4349
|
+
};
|
|
4350
|
+
template <>
|
|
4351
|
+
struct CArgConverter<WGPUPopErrorScopeCallbackInfo, std::tuple<PopErrorScopeStatus, ErrorType, StringView>> {
|
|
4352
|
+
using Result = std::tuple<PopErrorScopeStatus, ErrorType, StringView>;
|
|
4353
|
+
static Result Convert(WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message) {
|
|
4354
|
+
return std::make_tuple(static_cast<PopErrorScopeStatus>(status), static_cast<ErrorType>(type), StringView {
|
|
4355
|
+
message.data,
|
|
4356
|
+
message.length
|
|
4357
|
+
});
|
|
4358
|
+
}
|
|
4359
|
+
};
|
|
4360
|
+
template <>
|
|
4361
|
+
struct CArgConverter<WGPUQueueWorkDoneCallbackInfo, std::tuple<QueueWorkDoneStatus, StringView>> {
|
|
4362
|
+
using Result = std::tuple<QueueWorkDoneStatus, StringView>;
|
|
4363
|
+
static Result Convert(WGPUQueueWorkDoneStatus status, WGPUStringView message) {
|
|
4364
|
+
return std::make_tuple(static_cast<QueueWorkDoneStatus>(status), StringView {
|
|
4365
|
+
message.data,
|
|
4366
|
+
message.length
|
|
4367
|
+
});
|
|
4368
|
+
}
|
|
4369
|
+
};
|
|
4370
|
+
template <>
|
|
4371
|
+
struct CArgConverter<WGPURequestAdapterCallbackInfo, std::tuple<RequestAdapterStatus, Adapter, StringView>> {
|
|
4372
|
+
using Result = std::tuple<RequestAdapterStatus, Adapter, StringView>;
|
|
4373
|
+
static Result Convert(WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message) {
|
|
4374
|
+
return std::make_tuple(static_cast<RequestAdapterStatus>(status), Adapter::Acquire(adapter), StringView {
|
|
4375
|
+
message.data,
|
|
4376
|
+
message.length
|
|
4377
|
+
});
|
|
4378
|
+
}
|
|
4379
|
+
};
|
|
4380
|
+
template <>
|
|
4381
|
+
struct CArgConverter<WGPURequestDeviceCallbackInfo, std::tuple<RequestDeviceStatus, Device, StringView>> {
|
|
4382
|
+
using Result = std::tuple<RequestDeviceStatus, Device, StringView>;
|
|
4383
|
+
static Result Convert(WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message) {
|
|
4384
|
+
return std::make_tuple(static_cast<RequestDeviceStatus>(status), Device::Acquire(device), StringView {
|
|
4385
|
+
message.data,
|
|
4386
|
+
message.length
|
|
4387
|
+
});
|
|
4388
|
+
}
|
|
4389
|
+
};
|
|
4390
|
+
template <>
|
|
4391
|
+
struct CArgConverter<WGPUDeviceLostCallbackInfo,
|
|
4392
|
+
std::tuple<const Device&, DeviceLostReason, StringView>> {
|
|
4393
|
+
using Result = std::tuple<const Device&, DeviceLostReason, StringView>;
|
|
4394
|
+
static Result Convert(WGPUDevice const* device,
|
|
4395
|
+
WGPUDeviceLostReason reason,
|
|
4396
|
+
WGPUStringView message) {
|
|
4397
|
+
return std::make_tuple(std::cref(*reinterpret_cast<const Device*>(device)),
|
|
4398
|
+
static_cast<DeviceLostReason>(reason), message);
|
|
4399
|
+
}
|
|
4400
|
+
};
|
|
4401
|
+
template <>
|
|
4402
|
+
struct CArgConverter<WGPUUncapturedErrorCallbackInfo,
|
|
4403
|
+
std::tuple<const Device&, ErrorType, StringView>> {
|
|
4404
|
+
using Result = std::tuple<const Device&, ErrorType, StringView>;
|
|
4405
|
+
static Result Convert(WGPUDevice const* device, WGPUErrorType type, WGPUStringView message) {
|
|
4406
|
+
return std::make_tuple(std::cref(*reinterpret_cast<const Device*>(device)),
|
|
4407
|
+
static_cast<ErrorType>(type), message);
|
|
4408
|
+
}
|
|
4409
|
+
};
|
|
4410
|
+
|
|
4411
|
+
// The CallbackHelper struct implements the static functions needed to convert the base C callbacks
|
|
4412
|
+
// into the user provided C++ callbacks. More than anything, it handles converting the real C
|
|
4413
|
+
// callback arguments (i.e. not the userdata pointers we use internally) to C++ arguments, and
|
|
4414
|
+
// casts the userdata pointers appropriately to ensure that everything is typed.
|
|
4415
|
+
template <typename CInfoT, typename CppF, typename CArgsTuple, typename Indices>
|
|
4416
|
+
struct CallbackHelperImpl;
|
|
4417
|
+
template <typename CInfoT, typename CppF, typename... CArgs, std::size_t... Is>
|
|
4418
|
+
struct CallbackHelperImpl<CInfoT, CppF, std::tuple<CArgs...>, std::index_sequence<Is...>> {
|
|
4419
|
+
// Implementation for callbacks without an additional typed argument. We support capturing
|
|
4420
|
+
// lambdas if users can specify a callback mode in this case and make an allocation.
|
|
4421
|
+
static void Call(std::tuple_element_t<Is, std::tuple<CArgs...>>... cArgs,
|
|
4422
|
+
void* callbackParam, void*) {
|
|
4423
|
+
using CppFTraits = CppFTraits<CppF>;
|
|
4424
|
+
using Converter = CArgConverter<CInfoT, typename CppFTraits::BaseArgsTuple>;
|
|
4425
|
+
|
|
4426
|
+
if constexpr (CppFTraits::capturing) {
|
|
4427
|
+
std::unique_ptr<CppF> callback(reinterpret_cast<CppF*>(callbackParam));
|
|
4428
|
+
std::apply(*callback, Converter::Convert(cArgs...));
|
|
4429
|
+
} else {
|
|
4430
|
+
auto callback = reinterpret_cast<typename CppFTraits::PtrT>(callbackParam);
|
|
4431
|
+
std::apply(callback, Converter::Convert(cArgs...));
|
|
4432
|
+
}
|
|
4433
|
+
}
|
|
4326
4434
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4435
|
+
// Implementation for callbacks where the user specifies an additional typed argument. We do
|
|
4436
|
+
// not support capturing lambdas in this case since the user is already providing a typed
|
|
4437
|
+
// argument and would make more sense for any other state to be capturing by that argument
|
|
4438
|
+
// instead.
|
|
4439
|
+
template <typename T>
|
|
4440
|
+
static void Call(std::tuple_element_t<Is, std::tuple<CArgs...>>... cArgs,
|
|
4441
|
+
void* callbackParam, void* userdataParam) {
|
|
4442
|
+
using CppFTraits = CppFTraits<CppF, T>;
|
|
4443
|
+
using Converter = CArgConverter<CInfoT, typename CppFTraits::BaseArgsTuple>;
|
|
4444
|
+
|
|
4445
|
+
auto callback = reinterpret_cast<typename CppFTraits::PtrT>(callbackParam);
|
|
4446
|
+
auto param = std::make_tuple(static_cast<T>(userdataParam));
|
|
4447
|
+
std::apply(callback, std::tuple_cat(Converter::Convert(cArgs...), param));
|
|
4448
|
+
}
|
|
4449
|
+
};
|
|
4450
|
+
template <typename CInfoT, typename F, typename CbT>
|
|
4451
|
+
struct CallbackHelper;
|
|
4452
|
+
template <typename CInfoT, typename F, typename... CArgs>
|
|
4453
|
+
struct CallbackHelper<CInfoT, F, void(*)(CArgs...)> {
|
|
4454
|
+
static constexpr size_t NumCArgs = sizeof...(CArgs);
|
|
4455
|
+
using CArgsTuple = std::tuple<CArgs...>;
|
|
4456
|
+
static_assert(NumCArgs >= 2, "C Function pointers must have two void* trailing arguments.");
|
|
4457
|
+
static_assert(
|
|
4458
|
+
std::is_same_v<std::tuple_element_t<NumCArgs - 1, CArgsTuple>, void*>,
|
|
4459
|
+
"C Function pointer's last argument must be void*."
|
|
4460
|
+
);
|
|
4461
|
+
static_assert(
|
|
4462
|
+
std::is_same_v<std::tuple_element_t<NumCArgs - 2, CArgsTuple>, void*>,
|
|
4463
|
+
"C Function pointer's second to last argument must be void*."
|
|
4464
|
+
);
|
|
4465
|
+
|
|
4466
|
+
using Impl = CallbackHelperImpl<CInfoT, F, CArgsTuple, std::make_index_sequence<NumCArgs - 2>>;
|
|
4467
|
+
static void Call(CArgs... args) {
|
|
4468
|
+
Impl::Call(std::forward<CArgs>(args)...);
|
|
4469
|
+
}
|
|
4470
|
+
template <typename T>
|
|
4471
|
+
static void Call(CArgs... args) {
|
|
4472
|
+
Impl::template Call<T>(std::forward<CArgs>(args)...);
|
|
4473
|
+
}
|
|
4474
|
+
};
|
|
4475
|
+
|
|
4476
|
+
// The CallbackInfoHelper provides a utility to create a C CallbackInfo struct type from a C++
|
|
4477
|
+
// callback. This allows us to de-duplicates the logic used for WebGPU structs that have
|
|
4478
|
+
// CallbackInfo members and WebGPU API functions that return a Future.
|
|
4479
|
+
template <typename CInfoT, typename F>
|
|
4480
|
+
struct CallbackInfoHelper {
|
|
4481
|
+
static CInfoT Create(F lambda) {
|
|
4482
|
+
CInfoT info = {};
|
|
4483
|
+
if constexpr (CppFTraits<F>::capturing) {
|
|
4484
|
+
if constexpr (requires(CInfoT x) { x.mode; }) {
|
|
4485
|
+
// If we have a mode argument, then the callback is guaranteed to be called only
|
|
4486
|
+
// once so we can support it by moving it and making an allocation for it.
|
|
4487
|
+
std::unique_ptr<F> alloc = std::make_unique<F>(std::move(lambda));
|
|
4488
|
+
info.userdata1 = reinterpret_cast<void*>(alloc.release());
|
|
4489
|
+
} else {
|
|
4490
|
+
static_assert(
|
|
4491
|
+
false, "capturing lambdas aren't supported for repeatable callbacks"
|
|
4492
|
+
);
|
|
4493
|
+
}
|
|
4494
|
+
} else {
|
|
4495
|
+
// Otherwise, if the lambda is not capturing, that means we can refer to it as a
|
|
4496
|
+
// pointer directly.
|
|
4497
|
+
info.userdata1 = reinterpret_cast<void*>(+lambda);
|
|
4498
|
+
}
|
|
4499
|
+
info.callback = CallbackHelper<CInfoT, F, decltype(CInfoT::callback)>::Call;
|
|
4500
|
+
info.userdata2 = nullptr;
|
|
4501
|
+
return info;
|
|
4502
|
+
}
|
|
4330
4503
|
|
|
4331
|
-
template <typename
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
template <typename F, typename T,
|
|
4341
|
-
typename Cb = UncapturedErrorCallback<T>,
|
|
4342
|
-
typename = std::enable_if_t<std::is_convertible_v<F, Cb*>>>
|
|
4343
|
-
void SetUncapturedErrorCallback(F callback, T userdata);
|
|
4344
|
-
template <typename L,
|
|
4345
|
-
typename Cb = UncapturedErrorCallback<>,
|
|
4346
|
-
typename = std::enable_if_t<std::is_convertible_v<L, Cb>>>
|
|
4347
|
-
void SetUncapturedErrorCallback(L callback);
|
|
4504
|
+
template <typename T>
|
|
4505
|
+
requires (!CppFTraits<F>::capturing)
|
|
4506
|
+
static CInfoT Create(F lambda, T userdata) {
|
|
4507
|
+
CInfoT info = {};
|
|
4508
|
+
info.callback = CallbackHelper<CInfoT, F, decltype(CInfoT::callback)>::template Call<T>;
|
|
4509
|
+
info.userdata1 = reinterpret_cast<void*>(+lambda);
|
|
4510
|
+
info.userdata2 = userdata;
|
|
4511
|
+
return info;
|
|
4512
|
+
}
|
|
4348
4513
|
};
|
|
4349
4514
|
|
|
4515
|
+
} // namespace detail
|
|
4516
|
+
|
|
4350
4517
|
#if defined(__GNUC__) || defined(__clang__)
|
|
4351
4518
|
#pragma GCC diagnostic push
|
|
4352
4519
|
// error: 'offsetof' within non-standard-layout type 'wgpu::XXX' is conditionally-supported
|
|
@@ -4355,14 +4522,14 @@ struct DeviceDescriptor : protected detail::DeviceDescriptor {
|
|
|
4355
4522
|
|
|
4356
4523
|
// AdapterPropertiesD3D implementation
|
|
4357
4524
|
AdapterPropertiesD3D::AdapterPropertiesD3D()
|
|
4358
|
-
|
|
4525
|
+
: ChainedStructOut { nullptr, SType::AdapterPropertiesD3D } {}
|
|
4359
4526
|
struct AdapterPropertiesD3D::Init {
|
|
4360
4527
|
ChainedStructOut * nextInChain;
|
|
4361
4528
|
uint32_t shaderModel;
|
|
4362
4529
|
};
|
|
4363
|
-
AdapterPropertiesD3D::AdapterPropertiesD3D(AdapterPropertiesD3D::Init&& init)
|
|
4364
|
-
|
|
4365
|
-
shaderModel(std::move(init.shaderModel)){}
|
|
4530
|
+
AdapterPropertiesD3D::AdapterPropertiesD3D(AdapterPropertiesD3D::Init&& init) :
|
|
4531
|
+
ChainedStructOut { init.nextInChain, SType::AdapterPropertiesD3D },
|
|
4532
|
+
shaderModel(std::move(init.shaderModel)) {}
|
|
4366
4533
|
|
|
4367
4534
|
AdapterPropertiesD3D::operator const WGPUAdapterPropertiesD3D&() const noexcept {
|
|
4368
4535
|
return *reinterpret_cast<const WGPUAdapterPropertiesD3D*>(this);
|
|
@@ -4373,44 +4540,56 @@ static_assert(alignof(AdapterPropertiesD3D) == alignof(WGPUAdapterPropertiesD3D)
|
|
|
4373
4540
|
static_assert(offsetof(AdapterPropertiesD3D, shaderModel) == offsetof(WGPUAdapterPropertiesD3D, shaderModel),
|
|
4374
4541
|
"offsetof mismatch for AdapterPropertiesD3D::shaderModel");
|
|
4375
4542
|
|
|
4376
|
-
//
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
struct
|
|
4543
|
+
// AdapterPropertiesDrm implementation
|
|
4544
|
+
AdapterPropertiesDrm::AdapterPropertiesDrm()
|
|
4545
|
+
: ChainedStructOut { nullptr, SType::AdapterPropertiesDrm } {}
|
|
4546
|
+
struct AdapterPropertiesDrm::Init {
|
|
4380
4547
|
ChainedStructOut * nextInChain;
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
static_assert(
|
|
4402
|
-
|
|
4548
|
+
Bool hasPrimary = false;
|
|
4549
|
+
Bool hasRender = false;
|
|
4550
|
+
uint64_t primaryMajor = 0;
|
|
4551
|
+
uint64_t primaryMinor = 0;
|
|
4552
|
+
uint64_t renderMajor = 0;
|
|
4553
|
+
uint64_t renderMinor = 0;
|
|
4554
|
+
};
|
|
4555
|
+
AdapterPropertiesDrm::AdapterPropertiesDrm(AdapterPropertiesDrm::Init&& init) :
|
|
4556
|
+
ChainedStructOut { init.nextInChain, SType::AdapterPropertiesDrm },
|
|
4557
|
+
hasPrimary(std::move(init.hasPrimary)),
|
|
4558
|
+
hasRender(std::move(init.hasRender)),
|
|
4559
|
+
primaryMajor(std::move(init.primaryMajor)),
|
|
4560
|
+
primaryMinor(std::move(init.primaryMinor)),
|
|
4561
|
+
renderMajor(std::move(init.renderMajor)),
|
|
4562
|
+
renderMinor(std::move(init.renderMinor)) {}
|
|
4563
|
+
|
|
4564
|
+
AdapterPropertiesDrm::operator const WGPUAdapterPropertiesDrm&() const noexcept {
|
|
4565
|
+
return *reinterpret_cast<const WGPUAdapterPropertiesDrm*>(this);
|
|
4566
|
+
}
|
|
4567
|
+
|
|
4568
|
+
static_assert(sizeof(AdapterPropertiesDrm) == sizeof(WGPUAdapterPropertiesDrm), "sizeof mismatch for AdapterPropertiesDrm");
|
|
4569
|
+
static_assert(alignof(AdapterPropertiesDrm) == alignof(WGPUAdapterPropertiesDrm), "alignof mismatch for AdapterPropertiesDrm");
|
|
4570
|
+
static_assert(offsetof(AdapterPropertiesDrm, hasPrimary) == offsetof(WGPUAdapterPropertiesDrm, hasPrimary),
|
|
4571
|
+
"offsetof mismatch for AdapterPropertiesDrm::hasPrimary");
|
|
4572
|
+
static_assert(offsetof(AdapterPropertiesDrm, hasRender) == offsetof(WGPUAdapterPropertiesDrm, hasRender),
|
|
4573
|
+
"offsetof mismatch for AdapterPropertiesDrm::hasRender");
|
|
4574
|
+
static_assert(offsetof(AdapterPropertiesDrm, primaryMajor) == offsetof(WGPUAdapterPropertiesDrm, primaryMajor),
|
|
4575
|
+
"offsetof mismatch for AdapterPropertiesDrm::primaryMajor");
|
|
4576
|
+
static_assert(offsetof(AdapterPropertiesDrm, primaryMinor) == offsetof(WGPUAdapterPropertiesDrm, primaryMinor),
|
|
4577
|
+
"offsetof mismatch for AdapterPropertiesDrm::primaryMinor");
|
|
4578
|
+
static_assert(offsetof(AdapterPropertiesDrm, renderMajor) == offsetof(WGPUAdapterPropertiesDrm, renderMajor),
|
|
4579
|
+
"offsetof mismatch for AdapterPropertiesDrm::renderMajor");
|
|
4580
|
+
static_assert(offsetof(AdapterPropertiesDrm, renderMinor) == offsetof(WGPUAdapterPropertiesDrm, renderMinor),
|
|
4581
|
+
"offsetof mismatch for AdapterPropertiesDrm::renderMinor");
|
|
4403
4582
|
|
|
4404
4583
|
// AdapterPropertiesVk implementation
|
|
4405
4584
|
AdapterPropertiesVk::AdapterPropertiesVk()
|
|
4406
|
-
|
|
4585
|
+
: ChainedStructOut { nullptr, SType::AdapterPropertiesVk } {}
|
|
4407
4586
|
struct AdapterPropertiesVk::Init {
|
|
4408
4587
|
ChainedStructOut * nextInChain;
|
|
4409
4588
|
uint32_t driverVersion;
|
|
4410
4589
|
};
|
|
4411
|
-
AdapterPropertiesVk::AdapterPropertiesVk(AdapterPropertiesVk::Init&& init)
|
|
4412
|
-
|
|
4413
|
-
driverVersion(std::move(init.driverVersion)){}
|
|
4590
|
+
AdapterPropertiesVk::AdapterPropertiesVk(AdapterPropertiesVk::Init&& init) :
|
|
4591
|
+
ChainedStructOut { init.nextInChain, SType::AdapterPropertiesVk },
|
|
4592
|
+
driverVersion(std::move(init.driverVersion)) {}
|
|
4414
4593
|
|
|
4415
4594
|
AdapterPropertiesVk::operator const WGPUAdapterPropertiesVk&() const noexcept {
|
|
4416
4595
|
return *reinterpret_cast<const WGPUAdapterPropertiesVk*>(this);
|
|
@@ -4423,14 +4602,14 @@ static_assert(offsetof(AdapterPropertiesVk, driverVersion) == offsetof(WGPUAdapt
|
|
|
4423
4602
|
|
|
4424
4603
|
// AdapterPropertiesWGPU implementation
|
|
4425
4604
|
AdapterPropertiesWGPU::AdapterPropertiesWGPU()
|
|
4426
|
-
|
|
4605
|
+
: ChainedStructOut { nullptr, SType::AdapterPropertiesWGPU } {}
|
|
4427
4606
|
struct AdapterPropertiesWGPU::Init {
|
|
4428
4607
|
ChainedStructOut * nextInChain;
|
|
4429
4608
|
BackendType backendType = BackendType::Undefined;
|
|
4430
4609
|
};
|
|
4431
|
-
AdapterPropertiesWGPU::AdapterPropertiesWGPU(AdapterPropertiesWGPU::Init&& init)
|
|
4432
|
-
|
|
4433
|
-
backendType(std::move(init.backendType)){}
|
|
4610
|
+
AdapterPropertiesWGPU::AdapterPropertiesWGPU(AdapterPropertiesWGPU::Init&& init) :
|
|
4611
|
+
ChainedStructOut { init.nextInChain, SType::AdapterPropertiesWGPU },
|
|
4612
|
+
backendType(std::move(init.backendType)) {}
|
|
4434
4613
|
|
|
4435
4614
|
AdapterPropertiesWGPU::operator const WGPUAdapterPropertiesWGPU&() const noexcept {
|
|
4436
4615
|
return *reinterpret_cast<const WGPUAdapterPropertiesWGPU*>(this);
|
|
@@ -4496,18 +4675,18 @@ static_assert(offsetof(BufferBindingLayout, minBindingSize) == offsetof(WGPUBuff
|
|
|
4496
4675
|
|
|
4497
4676
|
// BufferHostMappedPointer implementation
|
|
4498
4677
|
BufferHostMappedPointer::BufferHostMappedPointer()
|
|
4499
|
-
|
|
4678
|
+
: ChainedStruct { nullptr, SType::BufferHostMappedPointer } {}
|
|
4500
4679
|
struct BufferHostMappedPointer::Init {
|
|
4501
4680
|
ChainedStruct * const nextInChain;
|
|
4502
4681
|
void * pointer;
|
|
4503
4682
|
Callback disposeCallback;
|
|
4504
4683
|
void * userdata;
|
|
4505
4684
|
};
|
|
4506
|
-
BufferHostMappedPointer::BufferHostMappedPointer(BufferHostMappedPointer::Init&& init)
|
|
4507
|
-
|
|
4508
|
-
pointer(std::move(init.pointer)),
|
|
4509
|
-
disposeCallback(std::move(init.disposeCallback)),
|
|
4510
|
-
userdata(std::move(init.userdata)){}
|
|
4685
|
+
BufferHostMappedPointer::BufferHostMappedPointer(BufferHostMappedPointer::Init&& init) :
|
|
4686
|
+
ChainedStruct { init.nextInChain, SType::BufferHostMappedPointer },
|
|
4687
|
+
pointer(std::move(init.pointer)),
|
|
4688
|
+
disposeCallback(std::move(init.disposeCallback)),
|
|
4689
|
+
userdata(std::move(init.userdata)) {}
|
|
4511
4690
|
|
|
4512
4691
|
BufferHostMappedPointer::operator const WGPUBufferHostMappedPointer&() const noexcept {
|
|
4513
4692
|
return *reinterpret_cast<const WGPUBufferHostMappedPointer*>(this);
|
|
@@ -4539,16 +4718,35 @@ static_assert(offsetof(Color, b) == offsetof(WGPUColor, b),
|
|
|
4539
4718
|
static_assert(offsetof(Color, a) == offsetof(WGPUColor, a),
|
|
4540
4719
|
"offsetof mismatch for Color::a");
|
|
4541
4720
|
|
|
4721
|
+
// ColorSpaceDawn implementation
|
|
4722
|
+
|
|
4723
|
+
ColorSpaceDawn::operator const WGPUColorSpaceDawn&() const noexcept {
|
|
4724
|
+
return *reinterpret_cast<const WGPUColorSpaceDawn*>(this);
|
|
4725
|
+
}
|
|
4726
|
+
|
|
4727
|
+
static_assert(sizeof(ColorSpaceDawn) == sizeof(WGPUColorSpaceDawn), "sizeof mismatch for ColorSpaceDawn");
|
|
4728
|
+
static_assert(alignof(ColorSpaceDawn) == alignof(WGPUColorSpaceDawn), "alignof mismatch for ColorSpaceDawn");
|
|
4729
|
+
static_assert(offsetof(ColorSpaceDawn, nextInChain) == offsetof(WGPUColorSpaceDawn, nextInChain),
|
|
4730
|
+
"offsetof mismatch for ColorSpaceDawn::nextInChain");
|
|
4731
|
+
static_assert(offsetof(ColorSpaceDawn, primaries) == offsetof(WGPUColorSpaceDawn, primaries),
|
|
4732
|
+
"offsetof mismatch for ColorSpaceDawn::primaries");
|
|
4733
|
+
static_assert(offsetof(ColorSpaceDawn, transfer) == offsetof(WGPUColorSpaceDawn, transfer),
|
|
4734
|
+
"offsetof mismatch for ColorSpaceDawn::transfer");
|
|
4735
|
+
static_assert(offsetof(ColorSpaceDawn, yCbCrRange) == offsetof(WGPUColorSpaceDawn, yCbCrRange),
|
|
4736
|
+
"offsetof mismatch for ColorSpaceDawn::yCbCrRange");
|
|
4737
|
+
static_assert(offsetof(ColorSpaceDawn, yCbCrMatrix) == offsetof(WGPUColorSpaceDawn, yCbCrMatrix),
|
|
4738
|
+
"offsetof mismatch for ColorSpaceDawn::yCbCrMatrix");
|
|
4739
|
+
|
|
4542
4740
|
// ColorTargetStateExpandResolveTextureDawn implementation
|
|
4543
4741
|
ColorTargetStateExpandResolveTextureDawn::ColorTargetStateExpandResolveTextureDawn()
|
|
4544
|
-
|
|
4742
|
+
: ChainedStruct { nullptr, SType::ColorTargetStateExpandResolveTextureDawn } {}
|
|
4545
4743
|
struct ColorTargetStateExpandResolveTextureDawn::Init {
|
|
4546
4744
|
ChainedStruct * const nextInChain;
|
|
4547
4745
|
Bool enabled = false;
|
|
4548
4746
|
};
|
|
4549
|
-
ColorTargetStateExpandResolveTextureDawn::ColorTargetStateExpandResolveTextureDawn(ColorTargetStateExpandResolveTextureDawn::Init&& init)
|
|
4550
|
-
|
|
4551
|
-
enabled(std::move(init.enabled)){}
|
|
4747
|
+
ColorTargetStateExpandResolveTextureDawn::ColorTargetStateExpandResolveTextureDawn(ColorTargetStateExpandResolveTextureDawn::Init&& init) :
|
|
4748
|
+
ChainedStruct { init.nextInChain, SType::ColorTargetStateExpandResolveTextureDawn },
|
|
4749
|
+
enabled(std::move(init.enabled)) {}
|
|
4552
4750
|
|
|
4553
4751
|
ColorTargetStateExpandResolveTextureDawn::operator const WGPUColorTargetStateExpandResolveTextureDawn&() const noexcept {
|
|
4554
4752
|
return *reinterpret_cast<const WGPUColorTargetStateExpandResolveTextureDawn*>(this);
|
|
@@ -4574,7 +4772,7 @@ static_assert(offsetof(CommandBufferDescriptor, label) == offsetof(WGPUCommandBu
|
|
|
4574
4772
|
|
|
4575
4773
|
// CompatibilityModeLimits implementation
|
|
4576
4774
|
CompatibilityModeLimits::CompatibilityModeLimits()
|
|
4577
|
-
|
|
4775
|
+
: ChainedStructOut { nullptr, SType::CompatibilityModeLimits } {}
|
|
4578
4776
|
struct CompatibilityModeLimits::Init {
|
|
4579
4777
|
ChainedStructOut * nextInChain;
|
|
4580
4778
|
uint32_t maxStorageBuffersInVertexStage = kLimitU32Undefined;
|
|
@@ -4582,12 +4780,12 @@ struct CompatibilityModeLimits::Init {
|
|
|
4582
4780
|
uint32_t maxStorageBuffersInFragmentStage = kLimitU32Undefined;
|
|
4583
4781
|
uint32_t maxStorageTexturesInFragmentStage = kLimitU32Undefined;
|
|
4584
4782
|
};
|
|
4585
|
-
CompatibilityModeLimits::CompatibilityModeLimits(CompatibilityModeLimits::Init&& init)
|
|
4586
|
-
|
|
4587
|
-
maxStorageBuffersInVertexStage(std::move(init.maxStorageBuffersInVertexStage)),
|
|
4588
|
-
maxStorageTexturesInVertexStage(std::move(init.maxStorageTexturesInVertexStage)),
|
|
4589
|
-
maxStorageBuffersInFragmentStage(std::move(init.maxStorageBuffersInFragmentStage)),
|
|
4590
|
-
maxStorageTexturesInFragmentStage(std::move(init.maxStorageTexturesInFragmentStage)){}
|
|
4783
|
+
CompatibilityModeLimits::CompatibilityModeLimits(CompatibilityModeLimits::Init&& init) :
|
|
4784
|
+
ChainedStructOut { init.nextInChain, SType::CompatibilityModeLimits },
|
|
4785
|
+
maxStorageBuffersInVertexStage(std::move(init.maxStorageBuffersInVertexStage)),
|
|
4786
|
+
maxStorageTexturesInVertexStage(std::move(init.maxStorageTexturesInVertexStage)),
|
|
4787
|
+
maxStorageBuffersInFragmentStage(std::move(init.maxStorageBuffersInFragmentStage)),
|
|
4788
|
+
maxStorageTexturesInFragmentStage(std::move(init.maxStorageTexturesInFragmentStage)) {}
|
|
4591
4789
|
|
|
4592
4790
|
CompatibilityModeLimits::operator const WGPUCompatibilityModeLimits&() const noexcept {
|
|
4593
4791
|
return *reinterpret_cast<const WGPUCompatibilityModeLimits*>(this);
|
|
@@ -4648,14 +4846,14 @@ static_assert(offsetof(CopyTextureForBrowserOptions, internalUsage) == offsetof(
|
|
|
4648
4846
|
|
|
4649
4847
|
// DawnAdapterPropertiesPowerPreference implementation
|
|
4650
4848
|
DawnAdapterPropertiesPowerPreference::DawnAdapterPropertiesPowerPreference()
|
|
4651
|
-
|
|
4849
|
+
: ChainedStructOut { nullptr, SType::DawnAdapterPropertiesPowerPreference } {}
|
|
4652
4850
|
struct DawnAdapterPropertiesPowerPreference::Init {
|
|
4653
4851
|
ChainedStructOut * nextInChain;
|
|
4654
4852
|
PowerPreference powerPreference = PowerPreference::Undefined;
|
|
4655
4853
|
};
|
|
4656
|
-
DawnAdapterPropertiesPowerPreference::DawnAdapterPropertiesPowerPreference(DawnAdapterPropertiesPowerPreference::Init&& init)
|
|
4657
|
-
|
|
4658
|
-
powerPreference(std::move(init.powerPreference)){}
|
|
4854
|
+
DawnAdapterPropertiesPowerPreference::DawnAdapterPropertiesPowerPreference(DawnAdapterPropertiesPowerPreference::Init&& init) :
|
|
4855
|
+
ChainedStructOut { init.nextInChain, SType::DawnAdapterPropertiesPowerPreference },
|
|
4856
|
+
powerPreference(std::move(init.powerPreference)) {}
|
|
4659
4857
|
|
|
4660
4858
|
DawnAdapterPropertiesPowerPreference::operator const WGPUDawnAdapterPropertiesPowerPreference&() const noexcept {
|
|
4661
4859
|
return *reinterpret_cast<const WGPUDawnAdapterPropertiesPowerPreference*>(this);
|
|
@@ -4668,14 +4866,14 @@ static_assert(offsetof(DawnAdapterPropertiesPowerPreference, powerPreference) ==
|
|
|
4668
4866
|
|
|
4669
4867
|
// DawnBufferDescriptorErrorInfoFromWireClient implementation
|
|
4670
4868
|
DawnBufferDescriptorErrorInfoFromWireClient::DawnBufferDescriptorErrorInfoFromWireClient()
|
|
4671
|
-
|
|
4869
|
+
: ChainedStruct { nullptr, SType::DawnBufferDescriptorErrorInfoFromWireClient } {}
|
|
4672
4870
|
struct DawnBufferDescriptorErrorInfoFromWireClient::Init {
|
|
4673
4871
|
ChainedStruct * const nextInChain;
|
|
4674
4872
|
Bool outOfMemory = false;
|
|
4675
4873
|
};
|
|
4676
|
-
DawnBufferDescriptorErrorInfoFromWireClient::DawnBufferDescriptorErrorInfoFromWireClient(DawnBufferDescriptorErrorInfoFromWireClient::Init&& init)
|
|
4677
|
-
|
|
4678
|
-
outOfMemory(std::move(init.outOfMemory)){}
|
|
4874
|
+
DawnBufferDescriptorErrorInfoFromWireClient::DawnBufferDescriptorErrorInfoFromWireClient(DawnBufferDescriptorErrorInfoFromWireClient::Init&& init) :
|
|
4875
|
+
ChainedStruct { init.nextInChain, SType::DawnBufferDescriptorErrorInfoFromWireClient },
|
|
4876
|
+
outOfMemory(std::move(init.outOfMemory)) {}
|
|
4679
4877
|
|
|
4680
4878
|
DawnBufferDescriptorErrorInfoFromWireClient::operator const WGPUDawnBufferDescriptorErrorInfoFromWireClient&() const noexcept {
|
|
4681
4879
|
return *reinterpret_cast<const WGPUDawnBufferDescriptorErrorInfoFromWireClient*>(this);
|
|
@@ -4688,7 +4886,7 @@ static_assert(offsetof(DawnBufferDescriptorErrorInfoFromWireClient, outOfMemory)
|
|
|
4688
4886
|
|
|
4689
4887
|
// DawnCacheDeviceDescriptor implementation
|
|
4690
4888
|
DawnCacheDeviceDescriptor::DawnCacheDeviceDescriptor()
|
|
4691
|
-
|
|
4889
|
+
: ChainedStruct { nullptr, SType::DawnCacheDeviceDescriptor } {}
|
|
4692
4890
|
struct DawnCacheDeviceDescriptor::Init {
|
|
4693
4891
|
ChainedStruct * const nextInChain;
|
|
4694
4892
|
StringView isolationKey = {};
|
|
@@ -4696,12 +4894,12 @@ struct DawnCacheDeviceDescriptor::Init {
|
|
|
4696
4894
|
DawnStoreCacheDataFunction storeDataFunction = nullptr;
|
|
4697
4895
|
void * functionUserdata = nullptr;
|
|
4698
4896
|
};
|
|
4699
|
-
DawnCacheDeviceDescriptor::DawnCacheDeviceDescriptor(DawnCacheDeviceDescriptor::Init&& init)
|
|
4700
|
-
|
|
4701
|
-
isolationKey(std::move(init.isolationKey)),
|
|
4702
|
-
loadDataFunction(std::move(init.loadDataFunction)),
|
|
4703
|
-
storeDataFunction(std::move(init.storeDataFunction)),
|
|
4704
|
-
functionUserdata(std::move(init.functionUserdata)){}
|
|
4897
|
+
DawnCacheDeviceDescriptor::DawnCacheDeviceDescriptor(DawnCacheDeviceDescriptor::Init&& init) :
|
|
4898
|
+
ChainedStruct { init.nextInChain, SType::DawnCacheDeviceDescriptor },
|
|
4899
|
+
isolationKey(std::move(init.isolationKey)),
|
|
4900
|
+
loadDataFunction(std::move(init.loadDataFunction)),
|
|
4901
|
+
storeDataFunction(std::move(init.storeDataFunction)),
|
|
4902
|
+
functionUserdata(std::move(init.functionUserdata)) {}
|
|
4705
4903
|
|
|
4706
4904
|
DawnCacheDeviceDescriptor::operator const WGPUDawnCacheDeviceDescriptor&() const noexcept {
|
|
4707
4905
|
return *reinterpret_cast<const WGPUDawnCacheDeviceDescriptor*>(this);
|
|
@@ -4720,18 +4918,18 @@ static_assert(offsetof(DawnCacheDeviceDescriptor, functionUserdata) == offsetof(
|
|
|
4720
4918
|
|
|
4721
4919
|
// DawnCompilationMessageUtf16 implementation
|
|
4722
4920
|
DawnCompilationMessageUtf16::DawnCompilationMessageUtf16()
|
|
4723
|
-
|
|
4921
|
+
: ChainedStruct { nullptr, SType::DawnCompilationMessageUtf16 } {}
|
|
4724
4922
|
struct DawnCompilationMessageUtf16::Init {
|
|
4725
4923
|
ChainedStruct * const nextInChain;
|
|
4726
4924
|
uint64_t linePos;
|
|
4727
4925
|
uint64_t offset;
|
|
4728
4926
|
uint64_t length;
|
|
4729
4927
|
};
|
|
4730
|
-
DawnCompilationMessageUtf16::DawnCompilationMessageUtf16(DawnCompilationMessageUtf16::Init&& init)
|
|
4731
|
-
|
|
4732
|
-
linePos(std::move(init.linePos)),
|
|
4733
|
-
offset(std::move(init.offset)),
|
|
4734
|
-
length(std::move(init.length)){}
|
|
4928
|
+
DawnCompilationMessageUtf16::DawnCompilationMessageUtf16(DawnCompilationMessageUtf16::Init&& init) :
|
|
4929
|
+
ChainedStruct { init.nextInChain, SType::DawnCompilationMessageUtf16 },
|
|
4930
|
+
linePos(std::move(init.linePos)),
|
|
4931
|
+
offset(std::move(init.offset)),
|
|
4932
|
+
length(std::move(init.length)) {}
|
|
4735
4933
|
|
|
4736
4934
|
DawnCompilationMessageUtf16::operator const WGPUDawnCompilationMessageUtf16&() const noexcept {
|
|
4737
4935
|
return *reinterpret_cast<const WGPUDawnCompilationMessageUtf16*>(this);
|
|
@@ -4748,14 +4946,14 @@ static_assert(offsetof(DawnCompilationMessageUtf16, length) == offsetof(WGPUDawn
|
|
|
4748
4946
|
|
|
4749
4947
|
// DawnConsumeAdapterDescriptor implementation
|
|
4750
4948
|
DawnConsumeAdapterDescriptor::DawnConsumeAdapterDescriptor()
|
|
4751
|
-
|
|
4949
|
+
: ChainedStruct { nullptr, SType::DawnConsumeAdapterDescriptor } {}
|
|
4752
4950
|
struct DawnConsumeAdapterDescriptor::Init {
|
|
4753
4951
|
ChainedStruct * const nextInChain;
|
|
4754
4952
|
Bool consumeAdapter = false;
|
|
4755
4953
|
};
|
|
4756
|
-
DawnConsumeAdapterDescriptor::DawnConsumeAdapterDescriptor(DawnConsumeAdapterDescriptor::Init&& init)
|
|
4757
|
-
|
|
4758
|
-
consumeAdapter(std::move(init.consumeAdapter)){}
|
|
4954
|
+
DawnConsumeAdapterDescriptor::DawnConsumeAdapterDescriptor(DawnConsumeAdapterDescriptor::Init&& init) :
|
|
4955
|
+
ChainedStruct { init.nextInChain, SType::DawnConsumeAdapterDescriptor },
|
|
4956
|
+
consumeAdapter(std::move(init.consumeAdapter)) {}
|
|
4759
4957
|
|
|
4760
4958
|
DawnConsumeAdapterDescriptor::operator const WGPUDawnConsumeAdapterDescriptor&() const noexcept {
|
|
4761
4959
|
return *reinterpret_cast<const WGPUDawnConsumeAdapterDescriptor*>(this);
|
|
@@ -4768,14 +4966,14 @@ static_assert(offsetof(DawnConsumeAdapterDescriptor, consumeAdapter) == offsetof
|
|
|
4768
4966
|
|
|
4769
4967
|
// DawnDeviceAllocatorControl implementation
|
|
4770
4968
|
DawnDeviceAllocatorControl::DawnDeviceAllocatorControl()
|
|
4771
|
-
|
|
4969
|
+
: ChainedStruct { nullptr, SType::DawnDeviceAllocatorControl } {}
|
|
4772
4970
|
struct DawnDeviceAllocatorControl::Init {
|
|
4773
4971
|
ChainedStruct * const nextInChain;
|
|
4774
4972
|
size_t allocatorHeapBlockSize = 0;
|
|
4775
4973
|
};
|
|
4776
|
-
DawnDeviceAllocatorControl::DawnDeviceAllocatorControl(DawnDeviceAllocatorControl::Init&& init)
|
|
4777
|
-
|
|
4778
|
-
allocatorHeapBlockSize(std::move(init.allocatorHeapBlockSize)){}
|
|
4974
|
+
DawnDeviceAllocatorControl::DawnDeviceAllocatorControl(DawnDeviceAllocatorControl::Init&& init) :
|
|
4975
|
+
ChainedStruct { init.nextInChain, SType::DawnDeviceAllocatorControl },
|
|
4976
|
+
allocatorHeapBlockSize(std::move(init.allocatorHeapBlockSize)) {}
|
|
4779
4977
|
|
|
4780
4978
|
DawnDeviceAllocatorControl::operator const WGPUDawnDeviceAllocatorControl&() const noexcept {
|
|
4781
4979
|
return *reinterpret_cast<const WGPUDawnDeviceAllocatorControl*>(this);
|
|
@@ -4801,14 +4999,14 @@ static_assert(offsetof(DawnDrmFormatProperties, modifierPlaneCount) == offsetof(
|
|
|
4801
4999
|
|
|
4802
5000
|
// DawnEncoderInternalUsageDescriptor implementation
|
|
4803
5001
|
DawnEncoderInternalUsageDescriptor::DawnEncoderInternalUsageDescriptor()
|
|
4804
|
-
|
|
5002
|
+
: ChainedStruct { nullptr, SType::DawnEncoderInternalUsageDescriptor } {}
|
|
4805
5003
|
struct DawnEncoderInternalUsageDescriptor::Init {
|
|
4806
5004
|
ChainedStruct * const nextInChain;
|
|
4807
5005
|
Bool useInternalUsages = false;
|
|
4808
5006
|
};
|
|
4809
|
-
DawnEncoderInternalUsageDescriptor::DawnEncoderInternalUsageDescriptor(DawnEncoderInternalUsageDescriptor::Init&& init)
|
|
4810
|
-
|
|
4811
|
-
useInternalUsages(std::move(init.useInternalUsages)){}
|
|
5007
|
+
DawnEncoderInternalUsageDescriptor::DawnEncoderInternalUsageDescriptor(DawnEncoderInternalUsageDescriptor::Init&& init) :
|
|
5008
|
+
ChainedStruct { init.nextInChain, SType::DawnEncoderInternalUsageDescriptor },
|
|
5009
|
+
useInternalUsages(std::move(init.useInternalUsages)) {}
|
|
4812
5010
|
|
|
4813
5011
|
DawnEncoderInternalUsageDescriptor::operator const WGPUDawnEncoderInternalUsageDescriptor&() const noexcept {
|
|
4814
5012
|
return *reinterpret_cast<const WGPUDawnEncoderInternalUsageDescriptor*>(this);
|
|
@@ -4821,18 +5019,18 @@ static_assert(offsetof(DawnEncoderInternalUsageDescriptor, useInternalUsages) ==
|
|
|
4821
5019
|
|
|
4822
5020
|
// DawnFakeBufferOOMForTesting implementation
|
|
4823
5021
|
DawnFakeBufferOOMForTesting::DawnFakeBufferOOMForTesting()
|
|
4824
|
-
|
|
5022
|
+
: ChainedStruct { nullptr, SType::DawnFakeBufferOOMForTesting } {}
|
|
4825
5023
|
struct DawnFakeBufferOOMForTesting::Init {
|
|
4826
5024
|
ChainedStruct * const nextInChain;
|
|
4827
5025
|
Bool fakeOOMAtWireClientMap;
|
|
4828
5026
|
Bool fakeOOMAtNativeMap;
|
|
4829
5027
|
Bool fakeOOMAtDevice;
|
|
4830
5028
|
};
|
|
4831
|
-
DawnFakeBufferOOMForTesting::DawnFakeBufferOOMForTesting(DawnFakeBufferOOMForTesting::Init&& init)
|
|
4832
|
-
|
|
4833
|
-
fakeOOMAtWireClientMap(std::move(init.fakeOOMAtWireClientMap)),
|
|
4834
|
-
fakeOOMAtNativeMap(std::move(init.fakeOOMAtNativeMap)),
|
|
4835
|
-
fakeOOMAtDevice(std::move(init.fakeOOMAtDevice)){}
|
|
5029
|
+
DawnFakeBufferOOMForTesting::DawnFakeBufferOOMForTesting(DawnFakeBufferOOMForTesting::Init&& init) :
|
|
5030
|
+
ChainedStruct { init.nextInChain, SType::DawnFakeBufferOOMForTesting },
|
|
5031
|
+
fakeOOMAtWireClientMap(std::move(init.fakeOOMAtWireClientMap)),
|
|
5032
|
+
fakeOOMAtNativeMap(std::move(init.fakeOOMAtNativeMap)),
|
|
5033
|
+
fakeOOMAtDevice(std::move(init.fakeOOMAtDevice)) {}
|
|
4836
5034
|
|
|
4837
5035
|
DawnFakeBufferOOMForTesting::operator const WGPUDawnFakeBufferOOMForTesting&() const noexcept {
|
|
4838
5036
|
return *reinterpret_cast<const WGPUDawnFakeBufferOOMForTesting*>(this);
|
|
@@ -4849,12 +5047,12 @@ static_assert(offsetof(DawnFakeBufferOOMForTesting, fakeOOMAtDevice) == offsetof
|
|
|
4849
5047
|
|
|
4850
5048
|
// DawnFakeDeviceInitializeErrorForTesting implementation
|
|
4851
5049
|
DawnFakeDeviceInitializeErrorForTesting::DawnFakeDeviceInitializeErrorForTesting()
|
|
4852
|
-
|
|
5050
|
+
: ChainedStruct { nullptr, SType::DawnFakeDeviceInitializeErrorForTesting } {}
|
|
4853
5051
|
struct DawnFakeDeviceInitializeErrorForTesting::Init {
|
|
4854
5052
|
ChainedStruct * const nextInChain;
|
|
4855
5053
|
};
|
|
4856
|
-
DawnFakeDeviceInitializeErrorForTesting::DawnFakeDeviceInitializeErrorForTesting(DawnFakeDeviceInitializeErrorForTesting::Init&& init)
|
|
4857
|
-
|
|
5054
|
+
DawnFakeDeviceInitializeErrorForTesting::DawnFakeDeviceInitializeErrorForTesting(DawnFakeDeviceInitializeErrorForTesting::Init&& init) :
|
|
5055
|
+
ChainedStruct { init.nextInChain, SType::DawnFakeDeviceInitializeErrorForTesting } {}
|
|
4858
5056
|
|
|
4859
5057
|
DawnFakeDeviceInitializeErrorForTesting::operator const WGPUDawnFakeDeviceInitializeErrorForTesting&() const noexcept {
|
|
4860
5058
|
return *reinterpret_cast<const WGPUDawnFakeDeviceInitializeErrorForTesting*>(this);
|
|
@@ -4865,14 +5063,14 @@ static_assert(alignof(DawnFakeDeviceInitializeErrorForTesting) == alignof(WGPUDa
|
|
|
4865
5063
|
|
|
4866
5064
|
// DawnHostMappedPointerLimits implementation
|
|
4867
5065
|
DawnHostMappedPointerLimits::DawnHostMappedPointerLimits()
|
|
4868
|
-
|
|
5066
|
+
: ChainedStructOut { nullptr, SType::DawnHostMappedPointerLimits } {}
|
|
4869
5067
|
struct DawnHostMappedPointerLimits::Init {
|
|
4870
5068
|
ChainedStructOut * nextInChain;
|
|
4871
5069
|
uint32_t hostMappedPointerAlignment = kLimitU32Undefined;
|
|
4872
5070
|
};
|
|
4873
|
-
DawnHostMappedPointerLimits::DawnHostMappedPointerLimits(DawnHostMappedPointerLimits::Init&& init)
|
|
4874
|
-
|
|
4875
|
-
hostMappedPointerAlignment(std::move(init.hostMappedPointerAlignment)){}
|
|
5071
|
+
DawnHostMappedPointerLimits::DawnHostMappedPointerLimits(DawnHostMappedPointerLimits::Init&& init) :
|
|
5072
|
+
ChainedStructOut { init.nextInChain, SType::DawnHostMappedPointerLimits },
|
|
5073
|
+
hostMappedPointerAlignment(std::move(init.hostMappedPointerAlignment)) {}
|
|
4876
5074
|
|
|
4877
5075
|
DawnHostMappedPointerLimits::operator const WGPUDawnHostMappedPointerLimits&() const noexcept {
|
|
4878
5076
|
return *reinterpret_cast<const WGPUDawnHostMappedPointerLimits*>(this);
|
|
@@ -4885,14 +5083,14 @@ static_assert(offsetof(DawnHostMappedPointerLimits, hostMappedPointerAlignment)
|
|
|
4885
5083
|
|
|
4886
5084
|
// DawnInjectedInvalidSType implementation
|
|
4887
5085
|
DawnInjectedInvalidSType::DawnInjectedInvalidSType()
|
|
4888
|
-
|
|
5086
|
+
: ChainedStruct { nullptr, SType::DawnInjectedInvalidSType } {}
|
|
4889
5087
|
struct DawnInjectedInvalidSType::Init {
|
|
4890
5088
|
ChainedStruct * const nextInChain;
|
|
4891
5089
|
SType invalidSType = {};
|
|
4892
5090
|
};
|
|
4893
|
-
DawnInjectedInvalidSType::DawnInjectedInvalidSType(DawnInjectedInvalidSType::Init&& init)
|
|
4894
|
-
|
|
4895
|
-
invalidSType(std::move(init.invalidSType)){}
|
|
5091
|
+
DawnInjectedInvalidSType::DawnInjectedInvalidSType(DawnInjectedInvalidSType::Init&& init) :
|
|
5092
|
+
ChainedStruct { init.nextInChain, SType::DawnInjectedInvalidSType },
|
|
5093
|
+
invalidSType(std::move(init.invalidSType)) {}
|
|
4896
5094
|
|
|
4897
5095
|
DawnInjectedInvalidSType::operator const WGPUDawnInjectedInvalidSType&() const noexcept {
|
|
4898
5096
|
return *reinterpret_cast<const WGPUDawnInjectedInvalidSType*>(this);
|
|
@@ -4905,14 +5103,14 @@ static_assert(offsetof(DawnInjectedInvalidSType, invalidSType) == offsetof(WGPUD
|
|
|
4905
5103
|
|
|
4906
5104
|
// DawnRenderPassSampleCount implementation
|
|
4907
5105
|
DawnRenderPassSampleCount::DawnRenderPassSampleCount()
|
|
4908
|
-
|
|
5106
|
+
: ChainedStruct { nullptr, SType::DawnRenderPassSampleCount } {}
|
|
4909
5107
|
struct DawnRenderPassSampleCount::Init {
|
|
4910
5108
|
ChainedStruct * const nextInChain;
|
|
4911
5109
|
uint32_t sampleCount = 1;
|
|
4912
5110
|
};
|
|
4913
|
-
DawnRenderPassSampleCount::DawnRenderPassSampleCount(DawnRenderPassSampleCount::Init&& init)
|
|
4914
|
-
|
|
4915
|
-
sampleCount(std::move(init.sampleCount)){}
|
|
5111
|
+
DawnRenderPassSampleCount::DawnRenderPassSampleCount(DawnRenderPassSampleCount::Init&& init) :
|
|
5112
|
+
ChainedStruct { init.nextInChain, SType::DawnRenderPassSampleCount },
|
|
5113
|
+
sampleCount(std::move(init.sampleCount)) {}
|
|
4916
5114
|
|
|
4917
5115
|
DawnRenderPassSampleCount::operator const WGPUDawnRenderPassSampleCount&() const noexcept {
|
|
4918
5116
|
return *reinterpret_cast<const WGPUDawnRenderPassSampleCount*>(this);
|
|
@@ -4925,14 +5123,14 @@ static_assert(offsetof(DawnRenderPassSampleCount, sampleCount) == offsetof(WGPUD
|
|
|
4925
5123
|
|
|
4926
5124
|
// DawnShaderModuleSPIRVOptionsDescriptor implementation
|
|
4927
5125
|
DawnShaderModuleSPIRVOptionsDescriptor::DawnShaderModuleSPIRVOptionsDescriptor()
|
|
4928
|
-
|
|
5126
|
+
: ChainedStruct { nullptr, SType::DawnShaderModuleSPIRVOptionsDescriptor } {}
|
|
4929
5127
|
struct DawnShaderModuleSPIRVOptionsDescriptor::Init {
|
|
4930
5128
|
ChainedStruct * const nextInChain;
|
|
4931
5129
|
Bool allowNonUniformDerivatives = false;
|
|
4932
5130
|
};
|
|
4933
|
-
DawnShaderModuleSPIRVOptionsDescriptor::DawnShaderModuleSPIRVOptionsDescriptor(DawnShaderModuleSPIRVOptionsDescriptor::Init&& init)
|
|
4934
|
-
|
|
4935
|
-
allowNonUniformDerivatives(std::move(init.allowNonUniformDerivatives)){}
|
|
5131
|
+
DawnShaderModuleSPIRVOptionsDescriptor::DawnShaderModuleSPIRVOptionsDescriptor(DawnShaderModuleSPIRVOptionsDescriptor::Init&& init) :
|
|
5132
|
+
ChainedStruct { init.nextInChain, SType::DawnShaderModuleSPIRVOptionsDescriptor },
|
|
5133
|
+
allowNonUniformDerivatives(std::move(init.allowNonUniformDerivatives)) {}
|
|
4936
5134
|
|
|
4937
5135
|
DawnShaderModuleSPIRVOptionsDescriptor::operator const WGPUDawnShaderModuleSPIRVOptionsDescriptor&() const noexcept {
|
|
4938
5136
|
return *reinterpret_cast<const WGPUDawnShaderModuleSPIRVOptionsDescriptor*>(this);
|
|
@@ -4945,14 +5143,14 @@ static_assert(offsetof(DawnShaderModuleSPIRVOptionsDescriptor, allowNonUniformDe
|
|
|
4945
5143
|
|
|
4946
5144
|
// DawnTexelCopyBufferRowAlignmentLimits implementation
|
|
4947
5145
|
DawnTexelCopyBufferRowAlignmentLimits::DawnTexelCopyBufferRowAlignmentLimits()
|
|
4948
|
-
|
|
5146
|
+
: ChainedStructOut { nullptr, SType::DawnTexelCopyBufferRowAlignmentLimits } {}
|
|
4949
5147
|
struct DawnTexelCopyBufferRowAlignmentLimits::Init {
|
|
4950
5148
|
ChainedStructOut * nextInChain;
|
|
4951
5149
|
uint32_t minTexelCopyBufferRowAlignment = kLimitU32Undefined;
|
|
4952
5150
|
};
|
|
4953
|
-
DawnTexelCopyBufferRowAlignmentLimits::DawnTexelCopyBufferRowAlignmentLimits(DawnTexelCopyBufferRowAlignmentLimits::Init&& init)
|
|
4954
|
-
|
|
4955
|
-
minTexelCopyBufferRowAlignment(std::move(init.minTexelCopyBufferRowAlignment)){}
|
|
5151
|
+
DawnTexelCopyBufferRowAlignmentLimits::DawnTexelCopyBufferRowAlignmentLimits(DawnTexelCopyBufferRowAlignmentLimits::Init&& init) :
|
|
5152
|
+
ChainedStructOut { init.nextInChain, SType::DawnTexelCopyBufferRowAlignmentLimits },
|
|
5153
|
+
minTexelCopyBufferRowAlignment(std::move(init.minTexelCopyBufferRowAlignment)) {}
|
|
4956
5154
|
|
|
4957
5155
|
DawnTexelCopyBufferRowAlignmentLimits::operator const WGPUDawnTexelCopyBufferRowAlignmentLimits&() const noexcept {
|
|
4958
5156
|
return *reinterpret_cast<const WGPUDawnTexelCopyBufferRowAlignmentLimits*>(this);
|
|
@@ -4965,14 +5163,14 @@ static_assert(offsetof(DawnTexelCopyBufferRowAlignmentLimits, minTexelCopyBuffer
|
|
|
4965
5163
|
|
|
4966
5164
|
// DawnTextureInternalUsageDescriptor implementation
|
|
4967
5165
|
DawnTextureInternalUsageDescriptor::DawnTextureInternalUsageDescriptor()
|
|
4968
|
-
|
|
5166
|
+
: ChainedStruct { nullptr, SType::DawnTextureInternalUsageDescriptor } {}
|
|
4969
5167
|
struct DawnTextureInternalUsageDescriptor::Init {
|
|
4970
5168
|
ChainedStruct * const nextInChain;
|
|
4971
5169
|
TextureUsage internalUsage = TextureUsage::None;
|
|
4972
5170
|
};
|
|
4973
|
-
DawnTextureInternalUsageDescriptor::DawnTextureInternalUsageDescriptor(DawnTextureInternalUsageDescriptor::Init&& init)
|
|
4974
|
-
|
|
4975
|
-
internalUsage(std::move(init.internalUsage)){}
|
|
5171
|
+
DawnTextureInternalUsageDescriptor::DawnTextureInternalUsageDescriptor(DawnTextureInternalUsageDescriptor::Init&& init) :
|
|
5172
|
+
ChainedStruct { init.nextInChain, SType::DawnTextureInternalUsageDescriptor },
|
|
5173
|
+
internalUsage(std::move(init.internalUsage)) {}
|
|
4976
5174
|
|
|
4977
5175
|
DawnTextureInternalUsageDescriptor::operator const WGPUDawnTextureInternalUsageDescriptor&() const noexcept {
|
|
4978
5176
|
return *reinterpret_cast<const WGPUDawnTextureInternalUsageDescriptor*>(this);
|
|
@@ -4985,7 +5183,7 @@ static_assert(offsetof(DawnTextureInternalUsageDescriptor, internalUsage) == off
|
|
|
4985
5183
|
|
|
4986
5184
|
// DawnTogglesDescriptor implementation
|
|
4987
5185
|
DawnTogglesDescriptor::DawnTogglesDescriptor()
|
|
4988
|
-
|
|
5186
|
+
: ChainedStruct { nullptr, SType::DawnTogglesDescriptor } {}
|
|
4989
5187
|
struct DawnTogglesDescriptor::Init {
|
|
4990
5188
|
ChainedStruct * const nextInChain;
|
|
4991
5189
|
size_t enabledToggleCount = 0;
|
|
@@ -4993,12 +5191,12 @@ struct DawnTogglesDescriptor::Init {
|
|
|
4993
5191
|
size_t disabledToggleCount = 0;
|
|
4994
5192
|
const char* const * disabledToggles = nullptr;
|
|
4995
5193
|
};
|
|
4996
|
-
DawnTogglesDescriptor::DawnTogglesDescriptor(DawnTogglesDescriptor::Init&& init)
|
|
4997
|
-
|
|
4998
|
-
enabledToggleCount(std::move(init.enabledToggleCount)),
|
|
4999
|
-
enabledToggles(std::move(init.enabledToggles)),
|
|
5000
|
-
disabledToggleCount(std::move(init.disabledToggleCount)),
|
|
5001
|
-
disabledToggles(std::move(init.disabledToggles)){}
|
|
5194
|
+
DawnTogglesDescriptor::DawnTogglesDescriptor(DawnTogglesDescriptor::Init&& init) :
|
|
5195
|
+
ChainedStruct { init.nextInChain, SType::DawnTogglesDescriptor },
|
|
5196
|
+
enabledToggleCount(std::move(init.enabledToggleCount)),
|
|
5197
|
+
enabledToggles(std::move(init.enabledToggles)),
|
|
5198
|
+
disabledToggleCount(std::move(init.disabledToggleCount)),
|
|
5199
|
+
disabledToggles(std::move(init.disabledToggles)) {}
|
|
5002
5200
|
|
|
5003
5201
|
DawnTogglesDescriptor::operator const WGPUDawnTogglesDescriptor&() const noexcept {
|
|
5004
5202
|
return *reinterpret_cast<const WGPUDawnTogglesDescriptor*>(this);
|
|
@@ -5017,16 +5215,16 @@ static_assert(offsetof(DawnTogglesDescriptor, disabledToggles) == offsetof(WGPUD
|
|
|
5017
5215
|
|
|
5018
5216
|
// DawnWGSLBlocklist implementation
|
|
5019
5217
|
DawnWGSLBlocklist::DawnWGSLBlocklist()
|
|
5020
|
-
|
|
5218
|
+
: ChainedStruct { nullptr, SType::DawnWGSLBlocklist } {}
|
|
5021
5219
|
struct DawnWGSLBlocklist::Init {
|
|
5022
5220
|
ChainedStruct * const nextInChain;
|
|
5023
5221
|
size_t blocklistedFeatureCount = 0;
|
|
5024
5222
|
const char* const * blocklistedFeatures = nullptr;
|
|
5025
5223
|
};
|
|
5026
|
-
DawnWGSLBlocklist::DawnWGSLBlocklist(DawnWGSLBlocklist::Init&& init)
|
|
5027
|
-
|
|
5028
|
-
blocklistedFeatureCount(std::move(init.blocklistedFeatureCount)),
|
|
5029
|
-
blocklistedFeatures(std::move(init.blocklistedFeatures)){}
|
|
5224
|
+
DawnWGSLBlocklist::DawnWGSLBlocklist(DawnWGSLBlocklist::Init&& init) :
|
|
5225
|
+
ChainedStruct { init.nextInChain, SType::DawnWGSLBlocklist },
|
|
5226
|
+
blocklistedFeatureCount(std::move(init.blocklistedFeatureCount)),
|
|
5227
|
+
blocklistedFeatures(std::move(init.blocklistedFeatures)) {}
|
|
5030
5228
|
|
|
5031
5229
|
DawnWGSLBlocklist::operator const WGPUDawnWGSLBlocklist&() const noexcept {
|
|
5032
5230
|
return *reinterpret_cast<const WGPUDawnWGSLBlocklist*>(this);
|
|
@@ -5041,18 +5239,18 @@ static_assert(offsetof(DawnWGSLBlocklist, blocklistedFeatures) == offsetof(WGPUD
|
|
|
5041
5239
|
|
|
5042
5240
|
// DawnWireWGSLControl implementation
|
|
5043
5241
|
DawnWireWGSLControl::DawnWireWGSLControl()
|
|
5044
|
-
|
|
5242
|
+
: ChainedStruct { nullptr, SType::DawnWireWGSLControl } {}
|
|
5045
5243
|
struct DawnWireWGSLControl::Init {
|
|
5046
5244
|
ChainedStruct * const nextInChain;
|
|
5047
5245
|
Bool enableExperimental = false;
|
|
5048
5246
|
Bool enableUnsafe = false;
|
|
5049
5247
|
Bool enableTesting = false;
|
|
5050
5248
|
};
|
|
5051
|
-
DawnWireWGSLControl::DawnWireWGSLControl(DawnWireWGSLControl::Init&& init)
|
|
5052
|
-
|
|
5053
|
-
enableExperimental(std::move(init.enableExperimental)),
|
|
5054
|
-
enableUnsafe(std::move(init.enableUnsafe)),
|
|
5055
|
-
enableTesting(std::move(init.enableTesting)){}
|
|
5249
|
+
DawnWireWGSLControl::DawnWireWGSLControl(DawnWireWGSLControl::Init&& init) :
|
|
5250
|
+
ChainedStruct { init.nextInChain, SType::DawnWireWGSLControl },
|
|
5251
|
+
enableExperimental(std::move(init.enableExperimental)),
|
|
5252
|
+
enableUnsafe(std::move(init.enableUnsafe)),
|
|
5253
|
+
enableTesting(std::move(init.enableTesting)) {}
|
|
5056
5254
|
|
|
5057
5255
|
DawnWireWGSLControl::operator const WGPUDawnWireWGSLControl&() const noexcept {
|
|
5058
5256
|
return *reinterpret_cast<const WGPUDawnWireWGSLControl*>(this);
|
|
@@ -5069,14 +5267,14 @@ static_assert(offsetof(DawnWireWGSLControl, enableTesting) == offsetof(WGPUDawnW
|
|
|
5069
5267
|
|
|
5070
5268
|
// EmscriptenSurfaceSourceCanvasHTMLSelector implementation
|
|
5071
5269
|
EmscriptenSurfaceSourceCanvasHTMLSelector::EmscriptenSurfaceSourceCanvasHTMLSelector()
|
|
5072
|
-
|
|
5270
|
+
: ChainedStruct { nullptr, SType::EmscriptenSurfaceSourceCanvasHTMLSelector } {}
|
|
5073
5271
|
struct EmscriptenSurfaceSourceCanvasHTMLSelector::Init {
|
|
5074
5272
|
ChainedStruct * const nextInChain;
|
|
5075
5273
|
StringView selector = {};
|
|
5076
5274
|
};
|
|
5077
|
-
EmscriptenSurfaceSourceCanvasHTMLSelector::EmscriptenSurfaceSourceCanvasHTMLSelector(EmscriptenSurfaceSourceCanvasHTMLSelector::Init&& init)
|
|
5078
|
-
|
|
5079
|
-
selector(std::move(init.selector)){}
|
|
5275
|
+
EmscriptenSurfaceSourceCanvasHTMLSelector::EmscriptenSurfaceSourceCanvasHTMLSelector(EmscriptenSurfaceSourceCanvasHTMLSelector::Init&& init) :
|
|
5276
|
+
ChainedStruct { init.nextInChain, SType::EmscriptenSurfaceSourceCanvasHTMLSelector },
|
|
5277
|
+
selector(std::move(init.selector)) {}
|
|
5080
5278
|
|
|
5081
5279
|
EmscriptenSurfaceSourceCanvasHTMLSelector::operator const WGPUEmscriptenSurfaceSourceCanvasHTMLSelector&() const noexcept {
|
|
5082
5280
|
return *reinterpret_cast<const WGPUEmscriptenSurfaceSourceCanvasHTMLSelector*>(this);
|
|
@@ -5117,14 +5315,14 @@ static_assert(offsetof(Extent3D, depthOrArrayLayers) == offsetof(WGPUExtent3D, d
|
|
|
5117
5315
|
|
|
5118
5316
|
// ExternalTextureBindingEntry implementation
|
|
5119
5317
|
ExternalTextureBindingEntry::ExternalTextureBindingEntry()
|
|
5120
|
-
|
|
5318
|
+
: ChainedStruct { nullptr, SType::ExternalTextureBindingEntry } {}
|
|
5121
5319
|
struct ExternalTextureBindingEntry::Init {
|
|
5122
5320
|
ChainedStruct * const nextInChain;
|
|
5123
5321
|
ExternalTexture externalTexture = nullptr;
|
|
5124
5322
|
};
|
|
5125
|
-
ExternalTextureBindingEntry::ExternalTextureBindingEntry(ExternalTextureBindingEntry::Init&& init)
|
|
5126
|
-
|
|
5127
|
-
externalTexture(std::move(init.externalTexture)){}
|
|
5323
|
+
ExternalTextureBindingEntry::ExternalTextureBindingEntry(ExternalTextureBindingEntry::Init&& init) :
|
|
5324
|
+
ChainedStruct { init.nextInChain, SType::ExternalTextureBindingEntry },
|
|
5325
|
+
externalTexture(std::move(init.externalTexture)) {}
|
|
5128
5326
|
|
|
5129
5327
|
ExternalTextureBindingEntry::operator const WGPUExternalTextureBindingEntry&() const noexcept {
|
|
5130
5328
|
return *reinterpret_cast<const WGPUExternalTextureBindingEntry*>(this);
|
|
@@ -5137,12 +5335,12 @@ static_assert(offsetof(ExternalTextureBindingEntry, externalTexture) == offsetof
|
|
|
5137
5335
|
|
|
5138
5336
|
// ExternalTextureBindingLayout implementation
|
|
5139
5337
|
ExternalTextureBindingLayout::ExternalTextureBindingLayout()
|
|
5140
|
-
|
|
5338
|
+
: ChainedStruct { nullptr, SType::ExternalTextureBindingLayout } {}
|
|
5141
5339
|
struct ExternalTextureBindingLayout::Init {
|
|
5142
5340
|
ChainedStruct * const nextInChain;
|
|
5143
5341
|
};
|
|
5144
|
-
ExternalTextureBindingLayout::ExternalTextureBindingLayout(ExternalTextureBindingLayout::Init&& init)
|
|
5145
|
-
|
|
5342
|
+
ExternalTextureBindingLayout::ExternalTextureBindingLayout(ExternalTextureBindingLayout::Init&& init) :
|
|
5343
|
+
ChainedStruct { init.nextInChain, SType::ExternalTextureBindingLayout } {}
|
|
5146
5344
|
|
|
5147
5345
|
ExternalTextureBindingLayout::operator const WGPUExternalTextureBindingLayout&() const noexcept {
|
|
5148
5346
|
return *reinterpret_cast<const WGPUExternalTextureBindingLayout*>(this);
|
|
@@ -5263,14 +5461,14 @@ static_assert(offsetof(PassTimestampWrites, endOfPassWriteIndex) == offsetof(WGP
|
|
|
5263
5461
|
|
|
5264
5462
|
// PipelineLayoutResourceTable implementation
|
|
5265
5463
|
PipelineLayoutResourceTable::PipelineLayoutResourceTable()
|
|
5266
|
-
|
|
5464
|
+
: ChainedStruct { nullptr, SType::PipelineLayoutResourceTable } {}
|
|
5267
5465
|
struct PipelineLayoutResourceTable::Init {
|
|
5268
5466
|
ChainedStruct * const nextInChain;
|
|
5269
5467
|
Bool usesResourceTable = false;
|
|
5270
5468
|
};
|
|
5271
|
-
PipelineLayoutResourceTable::PipelineLayoutResourceTable(PipelineLayoutResourceTable::Init&& init)
|
|
5272
|
-
|
|
5273
|
-
usesResourceTable(std::move(init.usesResourceTable)){}
|
|
5469
|
+
PipelineLayoutResourceTable::PipelineLayoutResourceTable(PipelineLayoutResourceTable::Init&& init) :
|
|
5470
|
+
ChainedStruct { init.nextInChain, SType::PipelineLayoutResourceTable },
|
|
5471
|
+
usesResourceTable(std::move(init.usesResourceTable)) {}
|
|
5274
5472
|
|
|
5275
5473
|
PipelineLayoutResourceTable::operator const WGPUPipelineLayoutResourceTable&() const noexcept {
|
|
5276
5474
|
return *reinterpret_cast<const WGPUPipelineLayoutResourceTable*>(this);
|
|
@@ -5416,7 +5614,7 @@ static_assert(offsetof(RenderPassDepthStencilAttachment, stencilReadOnly) == off
|
|
|
5416
5614
|
|
|
5417
5615
|
// RenderPassDescriptorResolveRect implementation
|
|
5418
5616
|
RenderPassDescriptorResolveRect::RenderPassDescriptorResolveRect()
|
|
5419
|
-
|
|
5617
|
+
: ChainedStruct { nullptr, SType::RenderPassDescriptorResolveRect } {}
|
|
5420
5618
|
struct RenderPassDescriptorResolveRect::Init {
|
|
5421
5619
|
ChainedStruct * const nextInChain;
|
|
5422
5620
|
uint32_t colorOffsetX;
|
|
@@ -5426,14 +5624,14 @@ struct RenderPassDescriptorResolveRect::Init {
|
|
|
5426
5624
|
uint32_t width;
|
|
5427
5625
|
uint32_t height;
|
|
5428
5626
|
};
|
|
5429
|
-
RenderPassDescriptorResolveRect::RenderPassDescriptorResolveRect(RenderPassDescriptorResolveRect::Init&& init)
|
|
5430
|
-
|
|
5431
|
-
colorOffsetX(std::move(init.colorOffsetX)),
|
|
5432
|
-
colorOffsetY(std::move(init.colorOffsetY)),
|
|
5433
|
-
resolveOffsetX(std::move(init.resolveOffsetX)),
|
|
5434
|
-
resolveOffsetY(std::move(init.resolveOffsetY)),
|
|
5435
|
-
width(std::move(init.width)),
|
|
5436
|
-
height(std::move(init.height)){}
|
|
5627
|
+
RenderPassDescriptorResolveRect::RenderPassDescriptorResolveRect(RenderPassDescriptorResolveRect::Init&& init) :
|
|
5628
|
+
ChainedStruct { init.nextInChain, SType::RenderPassDescriptorResolveRect },
|
|
5629
|
+
colorOffsetX(std::move(init.colorOffsetX)),
|
|
5630
|
+
colorOffsetY(std::move(init.colorOffsetY)),
|
|
5631
|
+
resolveOffsetX(std::move(init.resolveOffsetX)),
|
|
5632
|
+
resolveOffsetY(std::move(init.resolveOffsetY)),
|
|
5633
|
+
width(std::move(init.width)),
|
|
5634
|
+
height(std::move(init.height)) {}
|
|
5437
5635
|
|
|
5438
5636
|
RenderPassDescriptorResolveRect::operator const WGPURenderPassDescriptorResolveRect&() const noexcept {
|
|
5439
5637
|
return *reinterpret_cast<const WGPURenderPassDescriptorResolveRect*>(this);
|
|
@@ -5456,14 +5654,14 @@ static_assert(offsetof(RenderPassDescriptorResolveRect, height) == offsetof(WGPU
|
|
|
5456
5654
|
|
|
5457
5655
|
// RenderPassMaxDrawCount implementation
|
|
5458
5656
|
RenderPassMaxDrawCount::RenderPassMaxDrawCount()
|
|
5459
|
-
|
|
5657
|
+
: ChainedStruct { nullptr, SType::RenderPassMaxDrawCount } {}
|
|
5460
5658
|
struct RenderPassMaxDrawCount::Init {
|
|
5461
5659
|
ChainedStruct * const nextInChain;
|
|
5462
5660
|
uint64_t maxDrawCount = 50000000;
|
|
5463
5661
|
};
|
|
5464
|
-
RenderPassMaxDrawCount::RenderPassMaxDrawCount(RenderPassMaxDrawCount::Init&& init)
|
|
5465
|
-
|
|
5466
|
-
maxDrawCount(std::move(init.maxDrawCount)){}
|
|
5662
|
+
RenderPassMaxDrawCount::RenderPassMaxDrawCount(RenderPassMaxDrawCount::Init&& init) :
|
|
5663
|
+
ChainedStruct { init.nextInChain, SType::RenderPassMaxDrawCount },
|
|
5664
|
+
maxDrawCount(std::move(init.maxDrawCount)) {}
|
|
5467
5665
|
|
|
5468
5666
|
RenderPassMaxDrawCount::operator const WGPURenderPassMaxDrawCount&() const noexcept {
|
|
5469
5667
|
return *reinterpret_cast<const WGPURenderPassMaxDrawCount*>(this);
|
|
@@ -5476,12 +5674,12 @@ static_assert(offsetof(RenderPassMaxDrawCount, maxDrawCount) == offsetof(WGPURen
|
|
|
5476
5674
|
|
|
5477
5675
|
// RequestAdapterWebGPUBackendOptions implementation
|
|
5478
5676
|
RequestAdapterWebGPUBackendOptions::RequestAdapterWebGPUBackendOptions()
|
|
5479
|
-
|
|
5677
|
+
: ChainedStruct { nullptr, SType::RequestAdapterWebGPUBackendOptions } {}
|
|
5480
5678
|
struct RequestAdapterWebGPUBackendOptions::Init {
|
|
5481
5679
|
ChainedStruct * const nextInChain;
|
|
5482
5680
|
};
|
|
5483
|
-
RequestAdapterWebGPUBackendOptions::RequestAdapterWebGPUBackendOptions(RequestAdapterWebGPUBackendOptions::Init&& init)
|
|
5484
|
-
|
|
5681
|
+
RequestAdapterWebGPUBackendOptions::RequestAdapterWebGPUBackendOptions(RequestAdapterWebGPUBackendOptions::Init&& init) :
|
|
5682
|
+
ChainedStruct { init.nextInChain, SType::RequestAdapterWebGPUBackendOptions } {}
|
|
5485
5683
|
|
|
5486
5684
|
RequestAdapterWebGPUBackendOptions::operator const WGPURequestAdapterWebGPUBackendOptions&() const noexcept {
|
|
5487
5685
|
return *reinterpret_cast<const WGPURequestAdapterWebGPUBackendOptions*>(this);
|
|
@@ -5492,14 +5690,14 @@ static_assert(alignof(RequestAdapterWebGPUBackendOptions) == alignof(WGPURequest
|
|
|
5492
5690
|
|
|
5493
5691
|
// RequestAdapterWebXROptions implementation
|
|
5494
5692
|
RequestAdapterWebXROptions::RequestAdapterWebXROptions()
|
|
5495
|
-
|
|
5693
|
+
: ChainedStruct { nullptr, SType::RequestAdapterWebXROptions } {}
|
|
5496
5694
|
struct RequestAdapterWebXROptions::Init {
|
|
5497
5695
|
ChainedStruct * const nextInChain;
|
|
5498
5696
|
Bool xrCompatible;
|
|
5499
5697
|
};
|
|
5500
|
-
RequestAdapterWebXROptions::RequestAdapterWebXROptions(RequestAdapterWebXROptions::Init&& init)
|
|
5501
|
-
|
|
5502
|
-
xrCompatible(std::move(init.xrCompatible)){}
|
|
5698
|
+
RequestAdapterWebXROptions::RequestAdapterWebXROptions(RequestAdapterWebXROptions::Init&& init) :
|
|
5699
|
+
ChainedStruct { init.nextInChain, SType::RequestAdapterWebXROptions },
|
|
5700
|
+
xrCompatible(std::move(init.xrCompatible)) {}
|
|
5503
5701
|
|
|
5504
5702
|
RequestAdapterWebXROptions::operator const WGPURequestAdapterWebXROptions&() const noexcept {
|
|
5505
5703
|
return *reinterpret_cast<const WGPURequestAdapterWebXROptions*>(this);
|
|
@@ -5540,14 +5738,14 @@ static_assert(offsetof(SamplerBindingLayout, type) == offsetof(WGPUSamplerBindin
|
|
|
5540
5738
|
|
|
5541
5739
|
// ShaderModuleCompilationOptions implementation
|
|
5542
5740
|
ShaderModuleCompilationOptions::ShaderModuleCompilationOptions()
|
|
5543
|
-
|
|
5741
|
+
: ChainedStruct { nullptr, SType::ShaderModuleCompilationOptions } {}
|
|
5544
5742
|
struct ShaderModuleCompilationOptions::Init {
|
|
5545
5743
|
ChainedStruct * const nextInChain;
|
|
5546
5744
|
Bool strictMath;
|
|
5547
5745
|
};
|
|
5548
|
-
ShaderModuleCompilationOptions::ShaderModuleCompilationOptions(ShaderModuleCompilationOptions::Init&& init)
|
|
5549
|
-
|
|
5550
|
-
strictMath(std::move(init.strictMath)){}
|
|
5746
|
+
ShaderModuleCompilationOptions::ShaderModuleCompilationOptions(ShaderModuleCompilationOptions::Init&& init) :
|
|
5747
|
+
ChainedStruct { init.nextInChain, SType::ShaderModuleCompilationOptions },
|
|
5748
|
+
strictMath(std::move(init.strictMath)) {}
|
|
5551
5749
|
|
|
5552
5750
|
ShaderModuleCompilationOptions::operator const WGPUShaderModuleCompilationOptions&() const noexcept {
|
|
5553
5751
|
return *reinterpret_cast<const WGPUShaderModuleCompilationOptions*>(this);
|
|
@@ -5560,16 +5758,16 @@ static_assert(offsetof(ShaderModuleCompilationOptions, strictMath) == offsetof(W
|
|
|
5560
5758
|
|
|
5561
5759
|
// ShaderSourceSPIRV implementation
|
|
5562
5760
|
ShaderSourceSPIRV::ShaderSourceSPIRV()
|
|
5563
|
-
|
|
5761
|
+
: ChainedStruct { nullptr, SType::ShaderSourceSPIRV } {}
|
|
5564
5762
|
struct ShaderSourceSPIRV::Init {
|
|
5565
5763
|
ChainedStruct * const nextInChain;
|
|
5566
5764
|
uint32_t codeSize;
|
|
5567
5765
|
uint32_t const * code = nullptr;
|
|
5568
5766
|
};
|
|
5569
|
-
ShaderSourceSPIRV::ShaderSourceSPIRV(ShaderSourceSPIRV::Init&& init)
|
|
5570
|
-
|
|
5571
|
-
codeSize(std::move(init.codeSize)),
|
|
5572
|
-
code(std::move(init.code)){}
|
|
5767
|
+
ShaderSourceSPIRV::ShaderSourceSPIRV(ShaderSourceSPIRV::Init&& init) :
|
|
5768
|
+
ChainedStruct { init.nextInChain, SType::ShaderSourceSPIRV },
|
|
5769
|
+
codeSize(std::move(init.codeSize)),
|
|
5770
|
+
code(std::move(init.code)) {}
|
|
5573
5771
|
|
|
5574
5772
|
ShaderSourceSPIRV::operator const WGPUShaderSourceSPIRV&() const noexcept {
|
|
5575
5773
|
return *reinterpret_cast<const WGPUShaderSourceSPIRV*>(this);
|
|
@@ -5584,14 +5782,14 @@ static_assert(offsetof(ShaderSourceSPIRV, code) == offsetof(WGPUShaderSourceSPIR
|
|
|
5584
5782
|
|
|
5585
5783
|
// ShaderSourceWGSL implementation
|
|
5586
5784
|
ShaderSourceWGSL::ShaderSourceWGSL()
|
|
5587
|
-
|
|
5785
|
+
: ChainedStruct { nullptr, SType::ShaderSourceWGSL } {}
|
|
5588
5786
|
struct ShaderSourceWGSL::Init {
|
|
5589
5787
|
ChainedStruct * const nextInChain;
|
|
5590
5788
|
StringView code = {};
|
|
5591
5789
|
};
|
|
5592
|
-
ShaderSourceWGSL::ShaderSourceWGSL(ShaderSourceWGSL::Init&& init)
|
|
5593
|
-
|
|
5594
|
-
code(std::move(init.code)){}
|
|
5790
|
+
ShaderSourceWGSL::ShaderSourceWGSL(ShaderSourceWGSL::Init&& init) :
|
|
5791
|
+
ChainedStruct { init.nextInChain, SType::ShaderSourceWGSL },
|
|
5792
|
+
code(std::move(init.code)) {}
|
|
5595
5793
|
|
|
5596
5794
|
ShaderSourceWGSL::operator const WGPUShaderSourceWGSL&() const noexcept {
|
|
5597
5795
|
return *reinterpret_cast<const WGPUShaderSourceWGSL*>(this);
|
|
@@ -5623,16 +5821,16 @@ static_assert(offsetof(SharedBufferMemoryBeginAccessDescriptor, signaledValues)
|
|
|
5623
5821
|
|
|
5624
5822
|
// SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor implementation
|
|
5625
5823
|
SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor()
|
|
5626
|
-
|
|
5824
|
+
: ChainedStruct { nullptr, SType::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor } {}
|
|
5627
5825
|
struct SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::Init {
|
|
5628
5826
|
ChainedStruct * const nextInChain;
|
|
5629
5827
|
void * handle;
|
|
5630
5828
|
uint64_t size;
|
|
5631
5829
|
};
|
|
5632
|
-
SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::Init&& init)
|
|
5633
|
-
|
|
5634
|
-
handle(std::move(init.handle)),
|
|
5635
|
-
size(std::move(init.size)){}
|
|
5830
|
+
SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::Init&& init) :
|
|
5831
|
+
ChainedStruct { init.nextInChain, SType::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor },
|
|
5832
|
+
handle(std::move(init.handle)),
|
|
5833
|
+
size(std::move(init.size)) {}
|
|
5636
5834
|
|
|
5637
5835
|
SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::operator const WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor&() const noexcept {
|
|
5638
5836
|
return *reinterpret_cast<const WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor*>(this);
|
|
@@ -5722,14 +5920,14 @@ static_assert(offsetof(SharedBufferMemoryProperties, size) == offsetof(WGPUShare
|
|
|
5722
5920
|
|
|
5723
5921
|
// SharedFenceDXGISharedHandleDescriptor implementation
|
|
5724
5922
|
SharedFenceDXGISharedHandleDescriptor::SharedFenceDXGISharedHandleDescriptor()
|
|
5725
|
-
|
|
5923
|
+
: ChainedStruct { nullptr, SType::SharedFenceDXGISharedHandleDescriptor } {}
|
|
5726
5924
|
struct SharedFenceDXGISharedHandleDescriptor::Init {
|
|
5727
5925
|
ChainedStruct * const nextInChain;
|
|
5728
5926
|
void * handle;
|
|
5729
5927
|
};
|
|
5730
|
-
SharedFenceDXGISharedHandleDescriptor::SharedFenceDXGISharedHandleDescriptor(SharedFenceDXGISharedHandleDescriptor::Init&& init)
|
|
5731
|
-
|
|
5732
|
-
handle(std::move(init.handle)){}
|
|
5928
|
+
SharedFenceDXGISharedHandleDescriptor::SharedFenceDXGISharedHandleDescriptor(SharedFenceDXGISharedHandleDescriptor::Init&& init) :
|
|
5929
|
+
ChainedStruct { init.nextInChain, SType::SharedFenceDXGISharedHandleDescriptor },
|
|
5930
|
+
handle(std::move(init.handle)) {}
|
|
5733
5931
|
|
|
5734
5932
|
SharedFenceDXGISharedHandleDescriptor::operator const WGPUSharedFenceDXGISharedHandleDescriptor&() const noexcept {
|
|
5735
5933
|
return *reinterpret_cast<const WGPUSharedFenceDXGISharedHandleDescriptor*>(this);
|
|
@@ -5742,14 +5940,14 @@ static_assert(offsetof(SharedFenceDXGISharedHandleDescriptor, handle) == offseto
|
|
|
5742
5940
|
|
|
5743
5941
|
// SharedFenceDXGISharedHandleExportInfo implementation
|
|
5744
5942
|
SharedFenceDXGISharedHandleExportInfo::SharedFenceDXGISharedHandleExportInfo()
|
|
5745
|
-
|
|
5943
|
+
: ChainedStructOut { nullptr, SType::SharedFenceDXGISharedHandleExportInfo } {}
|
|
5746
5944
|
struct SharedFenceDXGISharedHandleExportInfo::Init {
|
|
5747
5945
|
ChainedStructOut * nextInChain;
|
|
5748
5946
|
void * handle;
|
|
5749
5947
|
};
|
|
5750
|
-
SharedFenceDXGISharedHandleExportInfo::SharedFenceDXGISharedHandleExportInfo(SharedFenceDXGISharedHandleExportInfo::Init&& init)
|
|
5751
|
-
|
|
5752
|
-
handle(std::move(init.handle)){}
|
|
5948
|
+
SharedFenceDXGISharedHandleExportInfo::SharedFenceDXGISharedHandleExportInfo(SharedFenceDXGISharedHandleExportInfo::Init&& init) :
|
|
5949
|
+
ChainedStructOut { init.nextInChain, SType::SharedFenceDXGISharedHandleExportInfo },
|
|
5950
|
+
handle(std::move(init.handle)) {}
|
|
5753
5951
|
|
|
5754
5952
|
SharedFenceDXGISharedHandleExportInfo::operator const WGPUSharedFenceDXGISharedHandleExportInfo&() const noexcept {
|
|
5755
5953
|
return *reinterpret_cast<const WGPUSharedFenceDXGISharedHandleExportInfo*>(this);
|
|
@@ -5762,14 +5960,14 @@ static_assert(offsetof(SharedFenceDXGISharedHandleExportInfo, handle) == offseto
|
|
|
5762
5960
|
|
|
5763
5961
|
// SharedFenceEGLSyncDescriptor implementation
|
|
5764
5962
|
SharedFenceEGLSyncDescriptor::SharedFenceEGLSyncDescriptor()
|
|
5765
|
-
|
|
5963
|
+
: ChainedStruct { nullptr, SType::SharedFenceEGLSyncDescriptor } {}
|
|
5766
5964
|
struct SharedFenceEGLSyncDescriptor::Init {
|
|
5767
5965
|
ChainedStruct * const nextInChain;
|
|
5768
5966
|
void * sync;
|
|
5769
5967
|
};
|
|
5770
|
-
SharedFenceEGLSyncDescriptor::SharedFenceEGLSyncDescriptor(SharedFenceEGLSyncDescriptor::Init&& init)
|
|
5771
|
-
|
|
5772
|
-
sync(std::move(init.sync)){}
|
|
5968
|
+
SharedFenceEGLSyncDescriptor::SharedFenceEGLSyncDescriptor(SharedFenceEGLSyncDescriptor::Init&& init) :
|
|
5969
|
+
ChainedStruct { init.nextInChain, SType::SharedFenceEGLSyncDescriptor },
|
|
5970
|
+
sync(std::move(init.sync)) {}
|
|
5773
5971
|
|
|
5774
5972
|
SharedFenceEGLSyncDescriptor::operator const WGPUSharedFenceEGLSyncDescriptor&() const noexcept {
|
|
5775
5973
|
return *reinterpret_cast<const WGPUSharedFenceEGLSyncDescriptor*>(this);
|
|
@@ -5782,14 +5980,14 @@ static_assert(offsetof(SharedFenceEGLSyncDescriptor, sync) == offsetof(WGPUShare
|
|
|
5782
5980
|
|
|
5783
5981
|
// SharedFenceEGLSyncExportInfo implementation
|
|
5784
5982
|
SharedFenceEGLSyncExportInfo::SharedFenceEGLSyncExportInfo()
|
|
5785
|
-
|
|
5983
|
+
: ChainedStructOut { nullptr, SType::SharedFenceEGLSyncExportInfo } {}
|
|
5786
5984
|
struct SharedFenceEGLSyncExportInfo::Init {
|
|
5787
5985
|
ChainedStructOut * nextInChain;
|
|
5788
5986
|
void * sync;
|
|
5789
5987
|
};
|
|
5790
|
-
SharedFenceEGLSyncExportInfo::SharedFenceEGLSyncExportInfo(SharedFenceEGLSyncExportInfo::Init&& init)
|
|
5791
|
-
|
|
5792
|
-
sync(std::move(init.sync)){}
|
|
5988
|
+
SharedFenceEGLSyncExportInfo::SharedFenceEGLSyncExportInfo(SharedFenceEGLSyncExportInfo::Init&& init) :
|
|
5989
|
+
ChainedStructOut { init.nextInChain, SType::SharedFenceEGLSyncExportInfo },
|
|
5990
|
+
sync(std::move(init.sync)) {}
|
|
5793
5991
|
|
|
5794
5992
|
SharedFenceEGLSyncExportInfo::operator const WGPUSharedFenceEGLSyncExportInfo&() const noexcept {
|
|
5795
5993
|
return *reinterpret_cast<const WGPUSharedFenceEGLSyncExportInfo*>(this);
|
|
@@ -5802,14 +6000,14 @@ static_assert(offsetof(SharedFenceEGLSyncExportInfo, sync) == offsetof(WGPUShare
|
|
|
5802
6000
|
|
|
5803
6001
|
// SharedFenceMTLSharedEventDescriptor implementation
|
|
5804
6002
|
SharedFenceMTLSharedEventDescriptor::SharedFenceMTLSharedEventDescriptor()
|
|
5805
|
-
|
|
6003
|
+
: ChainedStruct { nullptr, SType::SharedFenceMTLSharedEventDescriptor } {}
|
|
5806
6004
|
struct SharedFenceMTLSharedEventDescriptor::Init {
|
|
5807
6005
|
ChainedStruct * const nextInChain;
|
|
5808
6006
|
void * sharedEvent;
|
|
5809
6007
|
};
|
|
5810
|
-
SharedFenceMTLSharedEventDescriptor::SharedFenceMTLSharedEventDescriptor(SharedFenceMTLSharedEventDescriptor::Init&& init)
|
|
5811
|
-
|
|
5812
|
-
sharedEvent(std::move(init.sharedEvent)){}
|
|
6008
|
+
SharedFenceMTLSharedEventDescriptor::SharedFenceMTLSharedEventDescriptor(SharedFenceMTLSharedEventDescriptor::Init&& init) :
|
|
6009
|
+
ChainedStruct { init.nextInChain, SType::SharedFenceMTLSharedEventDescriptor },
|
|
6010
|
+
sharedEvent(std::move(init.sharedEvent)) {}
|
|
5813
6011
|
|
|
5814
6012
|
SharedFenceMTLSharedEventDescriptor::operator const WGPUSharedFenceMTLSharedEventDescriptor&() const noexcept {
|
|
5815
6013
|
return *reinterpret_cast<const WGPUSharedFenceMTLSharedEventDescriptor*>(this);
|
|
@@ -5822,14 +6020,14 @@ static_assert(offsetof(SharedFenceMTLSharedEventDescriptor, sharedEvent) == offs
|
|
|
5822
6020
|
|
|
5823
6021
|
// SharedFenceMTLSharedEventExportInfo implementation
|
|
5824
6022
|
SharedFenceMTLSharedEventExportInfo::SharedFenceMTLSharedEventExportInfo()
|
|
5825
|
-
|
|
6023
|
+
: ChainedStructOut { nullptr, SType::SharedFenceMTLSharedEventExportInfo } {}
|
|
5826
6024
|
struct SharedFenceMTLSharedEventExportInfo::Init {
|
|
5827
6025
|
ChainedStructOut * nextInChain;
|
|
5828
6026
|
void * sharedEvent;
|
|
5829
6027
|
};
|
|
5830
|
-
SharedFenceMTLSharedEventExportInfo::SharedFenceMTLSharedEventExportInfo(SharedFenceMTLSharedEventExportInfo::Init&& init)
|
|
5831
|
-
|
|
5832
|
-
sharedEvent(std::move(init.sharedEvent)){}
|
|
6028
|
+
SharedFenceMTLSharedEventExportInfo::SharedFenceMTLSharedEventExportInfo(SharedFenceMTLSharedEventExportInfo::Init&& init) :
|
|
6029
|
+
ChainedStructOut { init.nextInChain, SType::SharedFenceMTLSharedEventExportInfo },
|
|
6030
|
+
sharedEvent(std::move(init.sharedEvent)) {}
|
|
5833
6031
|
|
|
5834
6032
|
SharedFenceMTLSharedEventExportInfo::operator const WGPUSharedFenceMTLSharedEventExportInfo&() const noexcept {
|
|
5835
6033
|
return *reinterpret_cast<const WGPUSharedFenceMTLSharedEventExportInfo*>(this);
|
|
@@ -5842,14 +6040,14 @@ static_assert(offsetof(SharedFenceMTLSharedEventExportInfo, sharedEvent) == offs
|
|
|
5842
6040
|
|
|
5843
6041
|
// SharedFenceSyncFDDescriptor implementation
|
|
5844
6042
|
SharedFenceSyncFDDescriptor::SharedFenceSyncFDDescriptor()
|
|
5845
|
-
|
|
6043
|
+
: ChainedStruct { nullptr, SType::SharedFenceSyncFDDescriptor } {}
|
|
5846
6044
|
struct SharedFenceSyncFDDescriptor::Init {
|
|
5847
6045
|
ChainedStruct * const nextInChain;
|
|
5848
6046
|
int handle;
|
|
5849
6047
|
};
|
|
5850
|
-
SharedFenceSyncFDDescriptor::SharedFenceSyncFDDescriptor(SharedFenceSyncFDDescriptor::Init&& init)
|
|
5851
|
-
|
|
5852
|
-
handle(std::move(init.handle)){}
|
|
6048
|
+
SharedFenceSyncFDDescriptor::SharedFenceSyncFDDescriptor(SharedFenceSyncFDDescriptor::Init&& init) :
|
|
6049
|
+
ChainedStruct { init.nextInChain, SType::SharedFenceSyncFDDescriptor },
|
|
6050
|
+
handle(std::move(init.handle)) {}
|
|
5853
6051
|
|
|
5854
6052
|
SharedFenceSyncFDDescriptor::operator const WGPUSharedFenceSyncFDDescriptor&() const noexcept {
|
|
5855
6053
|
return *reinterpret_cast<const WGPUSharedFenceSyncFDDescriptor*>(this);
|
|
@@ -5862,14 +6060,14 @@ static_assert(offsetof(SharedFenceSyncFDDescriptor, handle) == offsetof(WGPUShar
|
|
|
5862
6060
|
|
|
5863
6061
|
// SharedFenceSyncFDExportInfo implementation
|
|
5864
6062
|
SharedFenceSyncFDExportInfo::SharedFenceSyncFDExportInfo()
|
|
5865
|
-
|
|
6063
|
+
: ChainedStructOut { nullptr, SType::SharedFenceSyncFDExportInfo } {}
|
|
5866
6064
|
struct SharedFenceSyncFDExportInfo::Init {
|
|
5867
6065
|
ChainedStructOut * nextInChain;
|
|
5868
6066
|
int handle;
|
|
5869
6067
|
};
|
|
5870
|
-
SharedFenceSyncFDExportInfo::SharedFenceSyncFDExportInfo(SharedFenceSyncFDExportInfo::Init&& init)
|
|
5871
|
-
|
|
5872
|
-
handle(std::move(init.handle)){}
|
|
6068
|
+
SharedFenceSyncFDExportInfo::SharedFenceSyncFDExportInfo(SharedFenceSyncFDExportInfo::Init&& init) :
|
|
6069
|
+
ChainedStructOut { init.nextInChain, SType::SharedFenceSyncFDExportInfo },
|
|
6070
|
+
handle(std::move(init.handle)) {}
|
|
5873
6071
|
|
|
5874
6072
|
SharedFenceSyncFDExportInfo::operator const WGPUSharedFenceSyncFDExportInfo&() const noexcept {
|
|
5875
6073
|
return *reinterpret_cast<const WGPUSharedFenceSyncFDExportInfo*>(this);
|
|
@@ -5882,14 +6080,14 @@ static_assert(offsetof(SharedFenceSyncFDExportInfo, handle) == offsetof(WGPUShar
|
|
|
5882
6080
|
|
|
5883
6081
|
// SharedFenceVkSemaphoreOpaqueFDDescriptor implementation
|
|
5884
6082
|
SharedFenceVkSemaphoreOpaqueFDDescriptor::SharedFenceVkSemaphoreOpaqueFDDescriptor()
|
|
5885
|
-
|
|
6083
|
+
: ChainedStruct { nullptr, SType::SharedFenceVkSemaphoreOpaqueFDDescriptor } {}
|
|
5886
6084
|
struct SharedFenceVkSemaphoreOpaqueFDDescriptor::Init {
|
|
5887
6085
|
ChainedStruct * const nextInChain;
|
|
5888
6086
|
int handle;
|
|
5889
6087
|
};
|
|
5890
|
-
SharedFenceVkSemaphoreOpaqueFDDescriptor::SharedFenceVkSemaphoreOpaqueFDDescriptor(SharedFenceVkSemaphoreOpaqueFDDescriptor::Init&& init)
|
|
5891
|
-
|
|
5892
|
-
handle(std::move(init.handle)){}
|
|
6088
|
+
SharedFenceVkSemaphoreOpaqueFDDescriptor::SharedFenceVkSemaphoreOpaqueFDDescriptor(SharedFenceVkSemaphoreOpaqueFDDescriptor::Init&& init) :
|
|
6089
|
+
ChainedStruct { init.nextInChain, SType::SharedFenceVkSemaphoreOpaqueFDDescriptor },
|
|
6090
|
+
handle(std::move(init.handle)) {}
|
|
5893
6091
|
|
|
5894
6092
|
SharedFenceVkSemaphoreOpaqueFDDescriptor::operator const WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor&() const noexcept {
|
|
5895
6093
|
return *reinterpret_cast<const WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor*>(this);
|
|
@@ -5902,14 +6100,14 @@ static_assert(offsetof(SharedFenceVkSemaphoreOpaqueFDDescriptor, handle) == offs
|
|
|
5902
6100
|
|
|
5903
6101
|
// SharedFenceVkSemaphoreOpaqueFDExportInfo implementation
|
|
5904
6102
|
SharedFenceVkSemaphoreOpaqueFDExportInfo::SharedFenceVkSemaphoreOpaqueFDExportInfo()
|
|
5905
|
-
|
|
6103
|
+
: ChainedStructOut { nullptr, SType::SharedFenceVkSemaphoreOpaqueFDExportInfo } {}
|
|
5906
6104
|
struct SharedFenceVkSemaphoreOpaqueFDExportInfo::Init {
|
|
5907
6105
|
ChainedStructOut * nextInChain;
|
|
5908
6106
|
int handle;
|
|
5909
6107
|
};
|
|
5910
|
-
SharedFenceVkSemaphoreOpaqueFDExportInfo::SharedFenceVkSemaphoreOpaqueFDExportInfo(SharedFenceVkSemaphoreOpaqueFDExportInfo::Init&& init)
|
|
5911
|
-
|
|
5912
|
-
handle(std::move(init.handle)){}
|
|
6108
|
+
SharedFenceVkSemaphoreOpaqueFDExportInfo::SharedFenceVkSemaphoreOpaqueFDExportInfo(SharedFenceVkSemaphoreOpaqueFDExportInfo::Init&& init) :
|
|
6109
|
+
ChainedStructOut { init.nextInChain, SType::SharedFenceVkSemaphoreOpaqueFDExportInfo },
|
|
6110
|
+
handle(std::move(init.handle)) {}
|
|
5913
6111
|
|
|
5914
6112
|
SharedFenceVkSemaphoreOpaqueFDExportInfo::operator const WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo&() const noexcept {
|
|
5915
6113
|
return *reinterpret_cast<const WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo*>(this);
|
|
@@ -5922,14 +6120,14 @@ static_assert(offsetof(SharedFenceVkSemaphoreOpaqueFDExportInfo, handle) == offs
|
|
|
5922
6120
|
|
|
5923
6121
|
// SharedFenceVkSemaphoreZirconHandleDescriptor implementation
|
|
5924
6122
|
SharedFenceVkSemaphoreZirconHandleDescriptor::SharedFenceVkSemaphoreZirconHandleDescriptor()
|
|
5925
|
-
|
|
6123
|
+
: ChainedStruct { nullptr, SType::SharedFenceVkSemaphoreZirconHandleDescriptor } {}
|
|
5926
6124
|
struct SharedFenceVkSemaphoreZirconHandleDescriptor::Init {
|
|
5927
6125
|
ChainedStruct * const nextInChain;
|
|
5928
6126
|
uint32_t handle;
|
|
5929
6127
|
};
|
|
5930
|
-
SharedFenceVkSemaphoreZirconHandleDescriptor::SharedFenceVkSemaphoreZirconHandleDescriptor(SharedFenceVkSemaphoreZirconHandleDescriptor::Init&& init)
|
|
5931
|
-
|
|
5932
|
-
handle(std::move(init.handle)){}
|
|
6128
|
+
SharedFenceVkSemaphoreZirconHandleDescriptor::SharedFenceVkSemaphoreZirconHandleDescriptor(SharedFenceVkSemaphoreZirconHandleDescriptor::Init&& init) :
|
|
6129
|
+
ChainedStruct { init.nextInChain, SType::SharedFenceVkSemaphoreZirconHandleDescriptor },
|
|
6130
|
+
handle(std::move(init.handle)) {}
|
|
5933
6131
|
|
|
5934
6132
|
SharedFenceVkSemaphoreZirconHandleDescriptor::operator const WGPUSharedFenceVkSemaphoreZirconHandleDescriptor&() const noexcept {
|
|
5935
6133
|
return *reinterpret_cast<const WGPUSharedFenceVkSemaphoreZirconHandleDescriptor*>(this);
|
|
@@ -5942,14 +6140,14 @@ static_assert(offsetof(SharedFenceVkSemaphoreZirconHandleDescriptor, handle) ==
|
|
|
5942
6140
|
|
|
5943
6141
|
// SharedFenceVkSemaphoreZirconHandleExportInfo implementation
|
|
5944
6142
|
SharedFenceVkSemaphoreZirconHandleExportInfo::SharedFenceVkSemaphoreZirconHandleExportInfo()
|
|
5945
|
-
|
|
6143
|
+
: ChainedStructOut { nullptr, SType::SharedFenceVkSemaphoreZirconHandleExportInfo } {}
|
|
5946
6144
|
struct SharedFenceVkSemaphoreZirconHandleExportInfo::Init {
|
|
5947
6145
|
ChainedStructOut * nextInChain;
|
|
5948
6146
|
uint32_t handle;
|
|
5949
6147
|
};
|
|
5950
|
-
SharedFenceVkSemaphoreZirconHandleExportInfo::SharedFenceVkSemaphoreZirconHandleExportInfo(SharedFenceVkSemaphoreZirconHandleExportInfo::Init&& init)
|
|
5951
|
-
|
|
5952
|
-
handle(std::move(init.handle)){}
|
|
6148
|
+
SharedFenceVkSemaphoreZirconHandleExportInfo::SharedFenceVkSemaphoreZirconHandleExportInfo(SharedFenceVkSemaphoreZirconHandleExportInfo::Init&& init) :
|
|
6149
|
+
ChainedStructOut { init.nextInChain, SType::SharedFenceVkSemaphoreZirconHandleExportInfo },
|
|
6150
|
+
handle(std::move(init.handle)) {}
|
|
5953
6151
|
|
|
5954
6152
|
SharedFenceVkSemaphoreZirconHandleExportInfo::operator const WGPUSharedFenceVkSemaphoreZirconHandleExportInfo&() const noexcept {
|
|
5955
6153
|
return *reinterpret_cast<const WGPUSharedFenceVkSemaphoreZirconHandleExportInfo*>(this);
|
|
@@ -5962,14 +6160,14 @@ static_assert(offsetof(SharedFenceVkSemaphoreZirconHandleExportInfo, handle) ==
|
|
|
5962
6160
|
|
|
5963
6161
|
// SharedTextureMemoryAHardwareBufferDescriptor implementation
|
|
5964
6162
|
SharedTextureMemoryAHardwareBufferDescriptor::SharedTextureMemoryAHardwareBufferDescriptor()
|
|
5965
|
-
|
|
6163
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryAHardwareBufferDescriptor } {}
|
|
5966
6164
|
struct SharedTextureMemoryAHardwareBufferDescriptor::Init {
|
|
5967
6165
|
ChainedStruct * const nextInChain;
|
|
5968
6166
|
void * handle;
|
|
5969
6167
|
};
|
|
5970
|
-
SharedTextureMemoryAHardwareBufferDescriptor::SharedTextureMemoryAHardwareBufferDescriptor(SharedTextureMemoryAHardwareBufferDescriptor::Init&& init)
|
|
5971
|
-
|
|
5972
|
-
handle(std::move(init.handle)){}
|
|
6168
|
+
SharedTextureMemoryAHardwareBufferDescriptor::SharedTextureMemoryAHardwareBufferDescriptor(SharedTextureMemoryAHardwareBufferDescriptor::Init&& init) :
|
|
6169
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryAHardwareBufferDescriptor },
|
|
6170
|
+
handle(std::move(init.handle)) {}
|
|
5973
6171
|
|
|
5974
6172
|
SharedTextureMemoryAHardwareBufferDescriptor::operator const WGPUSharedTextureMemoryAHardwareBufferDescriptor&() const noexcept {
|
|
5975
6173
|
return *reinterpret_cast<const WGPUSharedTextureMemoryAHardwareBufferDescriptor*>(this);
|
|
@@ -5982,14 +6180,14 @@ static_assert(offsetof(SharedTextureMemoryAHardwareBufferDescriptor, handle) ==
|
|
|
5982
6180
|
|
|
5983
6181
|
// SharedTextureMemoryD3D11BeginState implementation
|
|
5984
6182
|
SharedTextureMemoryD3D11BeginState::SharedTextureMemoryD3D11BeginState()
|
|
5985
|
-
|
|
6183
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryD3D11BeginState } {}
|
|
5986
6184
|
struct SharedTextureMemoryD3D11BeginState::Init {
|
|
5987
6185
|
ChainedStruct * const nextInChain;
|
|
5988
6186
|
Bool requiresEndAccessFence = true;
|
|
5989
6187
|
};
|
|
5990
|
-
SharedTextureMemoryD3D11BeginState::SharedTextureMemoryD3D11BeginState(SharedTextureMemoryD3D11BeginState::Init&& init)
|
|
5991
|
-
|
|
5992
|
-
requiresEndAccessFence(std::move(init.requiresEndAccessFence)){}
|
|
6188
|
+
SharedTextureMemoryD3D11BeginState::SharedTextureMemoryD3D11BeginState(SharedTextureMemoryD3D11BeginState::Init&& init) :
|
|
6189
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryD3D11BeginState },
|
|
6190
|
+
requiresEndAccessFence(std::move(init.requiresEndAccessFence)) {}
|
|
5993
6191
|
|
|
5994
6192
|
SharedTextureMemoryD3D11BeginState::operator const WGPUSharedTextureMemoryD3D11BeginState&() const noexcept {
|
|
5995
6193
|
return *reinterpret_cast<const WGPUSharedTextureMemoryD3D11BeginState*>(this);
|
|
@@ -6002,14 +6200,14 @@ static_assert(offsetof(SharedTextureMemoryD3D11BeginState, requiresEndAccessFenc
|
|
|
6002
6200
|
|
|
6003
6201
|
// SharedTextureMemoryD3DSwapchainBeginState implementation
|
|
6004
6202
|
SharedTextureMemoryD3DSwapchainBeginState::SharedTextureMemoryD3DSwapchainBeginState()
|
|
6005
|
-
|
|
6203
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryD3DSwapchainBeginState } {}
|
|
6006
6204
|
struct SharedTextureMemoryD3DSwapchainBeginState::Init {
|
|
6007
6205
|
ChainedStruct * const nextInChain;
|
|
6008
6206
|
Bool isSwapchain = false;
|
|
6009
6207
|
};
|
|
6010
|
-
SharedTextureMemoryD3DSwapchainBeginState::SharedTextureMemoryD3DSwapchainBeginState(SharedTextureMemoryD3DSwapchainBeginState::Init&& init)
|
|
6011
|
-
|
|
6012
|
-
isSwapchain(std::move(init.isSwapchain)){}
|
|
6208
|
+
SharedTextureMemoryD3DSwapchainBeginState::SharedTextureMemoryD3DSwapchainBeginState(SharedTextureMemoryD3DSwapchainBeginState::Init&& init) :
|
|
6209
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryD3DSwapchainBeginState },
|
|
6210
|
+
isSwapchain(std::move(init.isSwapchain)) {}
|
|
6013
6211
|
|
|
6014
6212
|
SharedTextureMemoryD3DSwapchainBeginState::operator const WGPUSharedTextureMemoryD3DSwapchainBeginState&() const noexcept {
|
|
6015
6213
|
return *reinterpret_cast<const WGPUSharedTextureMemoryD3DSwapchainBeginState*>(this);
|
|
@@ -6037,16 +6235,16 @@ static_assert(offsetof(SharedTextureMemoryDmaBufPlane, stride) == offsetof(WGPUS
|
|
|
6037
6235
|
|
|
6038
6236
|
// SharedTextureMemoryDXGISharedHandleDescriptor implementation
|
|
6039
6237
|
SharedTextureMemoryDXGISharedHandleDescriptor::SharedTextureMemoryDXGISharedHandleDescriptor()
|
|
6040
|
-
|
|
6238
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryDXGISharedHandleDescriptor } {}
|
|
6041
6239
|
struct SharedTextureMemoryDXGISharedHandleDescriptor::Init {
|
|
6042
6240
|
ChainedStruct * const nextInChain;
|
|
6043
6241
|
void * handle;
|
|
6044
6242
|
Bool useKeyedMutex;
|
|
6045
6243
|
};
|
|
6046
|
-
SharedTextureMemoryDXGISharedHandleDescriptor::SharedTextureMemoryDXGISharedHandleDescriptor(SharedTextureMemoryDXGISharedHandleDescriptor::Init&& init)
|
|
6047
|
-
|
|
6048
|
-
handle(std::move(init.handle)),
|
|
6049
|
-
useKeyedMutex(std::move(init.useKeyedMutex)){}
|
|
6244
|
+
SharedTextureMemoryDXGISharedHandleDescriptor::SharedTextureMemoryDXGISharedHandleDescriptor(SharedTextureMemoryDXGISharedHandleDescriptor::Init&& init) :
|
|
6245
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryDXGISharedHandleDescriptor },
|
|
6246
|
+
handle(std::move(init.handle)),
|
|
6247
|
+
useKeyedMutex(std::move(init.useKeyedMutex)) {}
|
|
6050
6248
|
|
|
6051
6249
|
SharedTextureMemoryDXGISharedHandleDescriptor::operator const WGPUSharedTextureMemoryDXGISharedHandleDescriptor&() const noexcept {
|
|
6052
6250
|
return *reinterpret_cast<const WGPUSharedTextureMemoryDXGISharedHandleDescriptor*>(this);
|
|
@@ -6061,14 +6259,14 @@ static_assert(offsetof(SharedTextureMemoryDXGISharedHandleDescriptor, useKeyedMu
|
|
|
6061
6259
|
|
|
6062
6260
|
// SharedTextureMemoryEGLImageDescriptor implementation
|
|
6063
6261
|
SharedTextureMemoryEGLImageDescriptor::SharedTextureMemoryEGLImageDescriptor()
|
|
6064
|
-
|
|
6262
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryEGLImageDescriptor } {}
|
|
6065
6263
|
struct SharedTextureMemoryEGLImageDescriptor::Init {
|
|
6066
6264
|
ChainedStruct * const nextInChain;
|
|
6067
6265
|
void * image;
|
|
6068
6266
|
};
|
|
6069
|
-
SharedTextureMemoryEGLImageDescriptor::SharedTextureMemoryEGLImageDescriptor(SharedTextureMemoryEGLImageDescriptor::Init&& init)
|
|
6070
|
-
|
|
6071
|
-
image(std::move(init.image)){}
|
|
6267
|
+
SharedTextureMemoryEGLImageDescriptor::SharedTextureMemoryEGLImageDescriptor(SharedTextureMemoryEGLImageDescriptor::Init&& init) :
|
|
6268
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryEGLImageDescriptor },
|
|
6269
|
+
image(std::move(init.image)) {}
|
|
6072
6270
|
|
|
6073
6271
|
SharedTextureMemoryEGLImageDescriptor::operator const WGPUSharedTextureMemoryEGLImageDescriptor&() const noexcept {
|
|
6074
6272
|
return *reinterpret_cast<const WGPUSharedTextureMemoryEGLImageDescriptor*>(this);
|
|
@@ -6081,16 +6279,16 @@ static_assert(offsetof(SharedTextureMemoryEGLImageDescriptor, image) == offsetof
|
|
|
6081
6279
|
|
|
6082
6280
|
// SharedTextureMemoryIOSurfaceDescriptor implementation
|
|
6083
6281
|
SharedTextureMemoryIOSurfaceDescriptor::SharedTextureMemoryIOSurfaceDescriptor()
|
|
6084
|
-
|
|
6282
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryIOSurfaceDescriptor } {}
|
|
6085
6283
|
struct SharedTextureMemoryIOSurfaceDescriptor::Init {
|
|
6086
6284
|
ChainedStruct * const nextInChain;
|
|
6087
6285
|
void * ioSurface;
|
|
6088
6286
|
Bool allowStorageBinding = true;
|
|
6089
6287
|
};
|
|
6090
|
-
SharedTextureMemoryIOSurfaceDescriptor::SharedTextureMemoryIOSurfaceDescriptor(SharedTextureMemoryIOSurfaceDescriptor::Init&& init)
|
|
6091
|
-
|
|
6092
|
-
ioSurface(std::move(init.ioSurface)),
|
|
6093
|
-
allowStorageBinding(std::move(init.allowStorageBinding)){}
|
|
6288
|
+
SharedTextureMemoryIOSurfaceDescriptor::SharedTextureMemoryIOSurfaceDescriptor(SharedTextureMemoryIOSurfaceDescriptor::Init&& init) :
|
|
6289
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryIOSurfaceDescriptor },
|
|
6290
|
+
ioSurface(std::move(init.ioSurface)),
|
|
6291
|
+
allowStorageBinding(std::move(init.allowStorageBinding)) {}
|
|
6094
6292
|
|
|
6095
6293
|
SharedTextureMemoryIOSurfaceDescriptor::operator const WGPUSharedTextureMemoryIOSurfaceDescriptor&() const noexcept {
|
|
6096
6294
|
return *reinterpret_cast<const WGPUSharedTextureMemoryIOSurfaceDescriptor*>(this);
|
|
@@ -6105,7 +6303,7 @@ static_assert(offsetof(SharedTextureMemoryIOSurfaceDescriptor, allowStorageBindi
|
|
|
6105
6303
|
|
|
6106
6304
|
// SharedTextureMemoryOpaqueFDDescriptor implementation
|
|
6107
6305
|
SharedTextureMemoryOpaqueFDDescriptor::SharedTextureMemoryOpaqueFDDescriptor()
|
|
6108
|
-
|
|
6306
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryOpaqueFDDescriptor } {}
|
|
6109
6307
|
struct SharedTextureMemoryOpaqueFDDescriptor::Init {
|
|
6110
6308
|
ChainedStruct * const nextInChain;
|
|
6111
6309
|
void const * vkImageCreateInfo;
|
|
@@ -6114,13 +6312,13 @@ struct SharedTextureMemoryOpaqueFDDescriptor::Init {
|
|
|
6114
6312
|
uint64_t allocationSize;
|
|
6115
6313
|
Bool dedicatedAllocation;
|
|
6116
6314
|
};
|
|
6117
|
-
SharedTextureMemoryOpaqueFDDescriptor::SharedTextureMemoryOpaqueFDDescriptor(SharedTextureMemoryOpaqueFDDescriptor::Init&& init)
|
|
6118
|
-
|
|
6119
|
-
vkImageCreateInfo(std::move(init.vkImageCreateInfo)),
|
|
6120
|
-
memoryFD(std::move(init.memoryFD)),
|
|
6121
|
-
memoryTypeIndex(std::move(init.memoryTypeIndex)),
|
|
6122
|
-
allocationSize(std::move(init.allocationSize)),
|
|
6123
|
-
dedicatedAllocation(std::move(init.dedicatedAllocation)){}
|
|
6315
|
+
SharedTextureMemoryOpaqueFDDescriptor::SharedTextureMemoryOpaqueFDDescriptor(SharedTextureMemoryOpaqueFDDescriptor::Init&& init) :
|
|
6316
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryOpaqueFDDescriptor },
|
|
6317
|
+
vkImageCreateInfo(std::move(init.vkImageCreateInfo)),
|
|
6318
|
+
memoryFD(std::move(init.memoryFD)),
|
|
6319
|
+
memoryTypeIndex(std::move(init.memoryTypeIndex)),
|
|
6320
|
+
allocationSize(std::move(init.allocationSize)),
|
|
6321
|
+
dedicatedAllocation(std::move(init.dedicatedAllocation)) {}
|
|
6124
6322
|
|
|
6125
6323
|
SharedTextureMemoryOpaqueFDDescriptor::operator const WGPUSharedTextureMemoryOpaqueFDDescriptor&() const noexcept {
|
|
6126
6324
|
return *reinterpret_cast<const WGPUSharedTextureMemoryOpaqueFDDescriptor*>(this);
|
|
@@ -6141,14 +6339,14 @@ static_assert(offsetof(SharedTextureMemoryOpaqueFDDescriptor, dedicatedAllocatio
|
|
|
6141
6339
|
|
|
6142
6340
|
// SharedTextureMemoryVkDedicatedAllocationDescriptor implementation
|
|
6143
6341
|
SharedTextureMemoryVkDedicatedAllocationDescriptor::SharedTextureMemoryVkDedicatedAllocationDescriptor()
|
|
6144
|
-
|
|
6342
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryVkDedicatedAllocationDescriptor } {}
|
|
6145
6343
|
struct SharedTextureMemoryVkDedicatedAllocationDescriptor::Init {
|
|
6146
6344
|
ChainedStruct * const nextInChain;
|
|
6147
6345
|
Bool dedicatedAllocation;
|
|
6148
6346
|
};
|
|
6149
|
-
SharedTextureMemoryVkDedicatedAllocationDescriptor::SharedTextureMemoryVkDedicatedAllocationDescriptor(SharedTextureMemoryVkDedicatedAllocationDescriptor::Init&& init)
|
|
6150
|
-
|
|
6151
|
-
dedicatedAllocation(std::move(init.dedicatedAllocation)){}
|
|
6347
|
+
SharedTextureMemoryVkDedicatedAllocationDescriptor::SharedTextureMemoryVkDedicatedAllocationDescriptor(SharedTextureMemoryVkDedicatedAllocationDescriptor::Init&& init) :
|
|
6348
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryVkDedicatedAllocationDescriptor },
|
|
6349
|
+
dedicatedAllocation(std::move(init.dedicatedAllocation)) {}
|
|
6152
6350
|
|
|
6153
6351
|
SharedTextureMemoryVkDedicatedAllocationDescriptor::operator const WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor&() const noexcept {
|
|
6154
6352
|
return *reinterpret_cast<const WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor*>(this);
|
|
@@ -6161,16 +6359,16 @@ static_assert(offsetof(SharedTextureMemoryVkDedicatedAllocationDescriptor, dedic
|
|
|
6161
6359
|
|
|
6162
6360
|
// SharedTextureMemoryVkImageLayoutBeginState implementation
|
|
6163
6361
|
SharedTextureMemoryVkImageLayoutBeginState::SharedTextureMemoryVkImageLayoutBeginState()
|
|
6164
|
-
|
|
6362
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryVkImageLayoutBeginState } {}
|
|
6165
6363
|
struct SharedTextureMemoryVkImageLayoutBeginState::Init {
|
|
6166
6364
|
ChainedStruct * const nextInChain;
|
|
6167
6365
|
int32_t oldLayout;
|
|
6168
6366
|
int32_t newLayout;
|
|
6169
6367
|
};
|
|
6170
|
-
SharedTextureMemoryVkImageLayoutBeginState::SharedTextureMemoryVkImageLayoutBeginState(SharedTextureMemoryVkImageLayoutBeginState::Init&& init)
|
|
6171
|
-
|
|
6172
|
-
oldLayout(std::move(init.oldLayout)),
|
|
6173
|
-
newLayout(std::move(init.newLayout)){}
|
|
6368
|
+
SharedTextureMemoryVkImageLayoutBeginState::SharedTextureMemoryVkImageLayoutBeginState(SharedTextureMemoryVkImageLayoutBeginState::Init&& init) :
|
|
6369
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryVkImageLayoutBeginState },
|
|
6370
|
+
oldLayout(std::move(init.oldLayout)),
|
|
6371
|
+
newLayout(std::move(init.newLayout)) {}
|
|
6174
6372
|
|
|
6175
6373
|
SharedTextureMemoryVkImageLayoutBeginState::operator const WGPUSharedTextureMemoryVkImageLayoutBeginState&() const noexcept {
|
|
6176
6374
|
return *reinterpret_cast<const WGPUSharedTextureMemoryVkImageLayoutBeginState*>(this);
|
|
@@ -6185,16 +6383,16 @@ static_assert(offsetof(SharedTextureMemoryVkImageLayoutBeginState, newLayout) ==
|
|
|
6185
6383
|
|
|
6186
6384
|
// SharedTextureMemoryVkImageLayoutEndState implementation
|
|
6187
6385
|
SharedTextureMemoryVkImageLayoutEndState::SharedTextureMemoryVkImageLayoutEndState()
|
|
6188
|
-
|
|
6386
|
+
: ChainedStructOut { nullptr, SType::SharedTextureMemoryVkImageLayoutEndState } {}
|
|
6189
6387
|
struct SharedTextureMemoryVkImageLayoutEndState::Init {
|
|
6190
6388
|
ChainedStructOut * nextInChain;
|
|
6191
6389
|
int32_t oldLayout;
|
|
6192
6390
|
int32_t newLayout;
|
|
6193
6391
|
};
|
|
6194
|
-
SharedTextureMemoryVkImageLayoutEndState::SharedTextureMemoryVkImageLayoutEndState(SharedTextureMemoryVkImageLayoutEndState::Init&& init)
|
|
6195
|
-
|
|
6196
|
-
oldLayout(std::move(init.oldLayout)),
|
|
6197
|
-
newLayout(std::move(init.newLayout)){}
|
|
6392
|
+
SharedTextureMemoryVkImageLayoutEndState::SharedTextureMemoryVkImageLayoutEndState(SharedTextureMemoryVkImageLayoutEndState::Init&& init) :
|
|
6393
|
+
ChainedStructOut { init.nextInChain, SType::SharedTextureMemoryVkImageLayoutEndState },
|
|
6394
|
+
oldLayout(std::move(init.oldLayout)),
|
|
6395
|
+
newLayout(std::move(init.newLayout)) {}
|
|
6198
6396
|
|
|
6199
6397
|
SharedTextureMemoryVkImageLayoutEndState::operator const WGPUSharedTextureMemoryVkImageLayoutEndState&() const noexcept {
|
|
6200
6398
|
return *reinterpret_cast<const WGPUSharedTextureMemoryVkImageLayoutEndState*>(this);
|
|
@@ -6209,16 +6407,16 @@ static_assert(offsetof(SharedTextureMemoryVkImageLayoutEndState, newLayout) == o
|
|
|
6209
6407
|
|
|
6210
6408
|
// SharedTextureMemoryZirconHandleDescriptor implementation
|
|
6211
6409
|
SharedTextureMemoryZirconHandleDescriptor::SharedTextureMemoryZirconHandleDescriptor()
|
|
6212
|
-
|
|
6410
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryZirconHandleDescriptor } {}
|
|
6213
6411
|
struct SharedTextureMemoryZirconHandleDescriptor::Init {
|
|
6214
6412
|
ChainedStruct * const nextInChain;
|
|
6215
6413
|
uint32_t memoryFD;
|
|
6216
6414
|
uint64_t allocationSize;
|
|
6217
6415
|
};
|
|
6218
|
-
SharedTextureMemoryZirconHandleDescriptor::SharedTextureMemoryZirconHandleDescriptor(SharedTextureMemoryZirconHandleDescriptor::Init&& init)
|
|
6219
|
-
|
|
6220
|
-
memoryFD(std::move(init.memoryFD)),
|
|
6221
|
-
allocationSize(std::move(init.allocationSize)){}
|
|
6416
|
+
SharedTextureMemoryZirconHandleDescriptor::SharedTextureMemoryZirconHandleDescriptor(SharedTextureMemoryZirconHandleDescriptor::Init&& init) :
|
|
6417
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryZirconHandleDescriptor },
|
|
6418
|
+
memoryFD(std::move(init.memoryFD)),
|
|
6419
|
+
allocationSize(std::move(init.allocationSize)) {}
|
|
6222
6420
|
|
|
6223
6421
|
SharedTextureMemoryZirconHandleDescriptor::operator const WGPUSharedTextureMemoryZirconHandleDescriptor&() const noexcept {
|
|
6224
6422
|
return *reinterpret_cast<const WGPUSharedTextureMemoryZirconHandleDescriptor*>(this);
|
|
@@ -6233,16 +6431,16 @@ static_assert(offsetof(SharedTextureMemoryZirconHandleDescriptor, allocationSize
|
|
|
6233
6431
|
|
|
6234
6432
|
// StaticSamplerBindingLayout implementation
|
|
6235
6433
|
StaticSamplerBindingLayout::StaticSamplerBindingLayout()
|
|
6236
|
-
|
|
6434
|
+
: ChainedStruct { nullptr, SType::StaticSamplerBindingLayout } {}
|
|
6237
6435
|
struct StaticSamplerBindingLayout::Init {
|
|
6238
6436
|
ChainedStruct * const nextInChain;
|
|
6239
6437
|
Sampler sampler = nullptr;
|
|
6240
6438
|
uint32_t sampledTextureBinding = kLimitU32Undefined;
|
|
6241
6439
|
};
|
|
6242
|
-
StaticSamplerBindingLayout::StaticSamplerBindingLayout(StaticSamplerBindingLayout::Init&& init)
|
|
6243
|
-
|
|
6244
|
-
sampler(std::move(init.sampler)),
|
|
6245
|
-
sampledTextureBinding(std::move(init.sampledTextureBinding)){}
|
|
6440
|
+
StaticSamplerBindingLayout::StaticSamplerBindingLayout(StaticSamplerBindingLayout::Init&& init) :
|
|
6441
|
+
ChainedStruct { init.nextInChain, SType::StaticSamplerBindingLayout },
|
|
6442
|
+
sampler(std::move(init.sampler)),
|
|
6443
|
+
sampledTextureBinding(std::move(init.sampledTextureBinding)) {}
|
|
6246
6444
|
|
|
6247
6445
|
StaticSamplerBindingLayout::operator const WGPUStaticSamplerBindingLayout&() const noexcept {
|
|
6248
6446
|
return *reinterpret_cast<const WGPUStaticSamplerBindingLayout*>(this);
|
|
@@ -6529,16 +6727,16 @@ static_assert(offsetof(SurfaceCapabilities, alphaModes) == offsetof(WGPUSurfaceC
|
|
|
6529
6727
|
|
|
6530
6728
|
// SurfaceColorManagement implementation
|
|
6531
6729
|
SurfaceColorManagement::SurfaceColorManagement()
|
|
6532
|
-
|
|
6730
|
+
: ChainedStruct { nullptr, SType::SurfaceColorManagement } {}
|
|
6533
6731
|
struct SurfaceColorManagement::Init {
|
|
6534
6732
|
ChainedStruct * const nextInChain;
|
|
6535
6733
|
PredefinedColorSpace colorSpace = {};
|
|
6536
6734
|
ToneMappingMode toneMappingMode = {};
|
|
6537
6735
|
};
|
|
6538
|
-
SurfaceColorManagement::SurfaceColorManagement(SurfaceColorManagement::Init&& init)
|
|
6539
|
-
|
|
6540
|
-
colorSpace(std::move(init.colorSpace)),
|
|
6541
|
-
toneMappingMode(std::move(init.toneMappingMode)){}
|
|
6736
|
+
SurfaceColorManagement::SurfaceColorManagement(SurfaceColorManagement::Init&& init) :
|
|
6737
|
+
ChainedStruct { init.nextInChain, SType::SurfaceColorManagement },
|
|
6738
|
+
colorSpace(std::move(init.colorSpace)),
|
|
6739
|
+
toneMappingMode(std::move(init.toneMappingMode)) {}
|
|
6542
6740
|
|
|
6543
6741
|
SurfaceColorManagement::operator const WGPUSurfaceColorManagement&() const noexcept {
|
|
6544
6742
|
return *reinterpret_cast<const WGPUSurfaceColorManagement*>(this);
|
|
@@ -6582,14 +6780,14 @@ static_assert(offsetof(SurfaceConfiguration, presentMode) == offsetof(WGPUSurfac
|
|
|
6582
6780
|
|
|
6583
6781
|
// SurfaceDescriptorFromWindowsCoreWindow implementation
|
|
6584
6782
|
SurfaceDescriptorFromWindowsCoreWindow::SurfaceDescriptorFromWindowsCoreWindow()
|
|
6585
|
-
|
|
6783
|
+
: ChainedStruct { nullptr, SType::SurfaceDescriptorFromWindowsCoreWindow } {}
|
|
6586
6784
|
struct SurfaceDescriptorFromWindowsCoreWindow::Init {
|
|
6587
6785
|
ChainedStruct * const nextInChain;
|
|
6588
6786
|
void * coreWindow = nullptr;
|
|
6589
6787
|
};
|
|
6590
|
-
SurfaceDescriptorFromWindowsCoreWindow::SurfaceDescriptorFromWindowsCoreWindow(SurfaceDescriptorFromWindowsCoreWindow::Init&& init)
|
|
6591
|
-
|
|
6592
|
-
coreWindow(std::move(init.coreWindow)){}
|
|
6788
|
+
SurfaceDescriptorFromWindowsCoreWindow::SurfaceDescriptorFromWindowsCoreWindow(SurfaceDescriptorFromWindowsCoreWindow::Init&& init) :
|
|
6789
|
+
ChainedStruct { init.nextInChain, SType::SurfaceDescriptorFromWindowsCoreWindow },
|
|
6790
|
+
coreWindow(std::move(init.coreWindow)) {}
|
|
6593
6791
|
|
|
6594
6792
|
SurfaceDescriptorFromWindowsCoreWindow::operator const WGPUSurfaceDescriptorFromWindowsCoreWindow&() const noexcept {
|
|
6595
6793
|
return *reinterpret_cast<const WGPUSurfaceDescriptorFromWindowsCoreWindow*>(this);
|
|
@@ -6602,14 +6800,14 @@ static_assert(offsetof(SurfaceDescriptorFromWindowsCoreWindow, coreWindow) == of
|
|
|
6602
6800
|
|
|
6603
6801
|
// SurfaceDescriptorFromWindowsUWPSwapChainPanel implementation
|
|
6604
6802
|
SurfaceDescriptorFromWindowsUWPSwapChainPanel::SurfaceDescriptorFromWindowsUWPSwapChainPanel()
|
|
6605
|
-
|
|
6803
|
+
: ChainedStruct { nullptr, SType::SurfaceDescriptorFromWindowsUWPSwapChainPanel } {}
|
|
6606
6804
|
struct SurfaceDescriptorFromWindowsUWPSwapChainPanel::Init {
|
|
6607
6805
|
ChainedStruct * const nextInChain;
|
|
6608
6806
|
void * swapChainPanel = nullptr;
|
|
6609
6807
|
};
|
|
6610
|
-
SurfaceDescriptorFromWindowsUWPSwapChainPanel::SurfaceDescriptorFromWindowsUWPSwapChainPanel(SurfaceDescriptorFromWindowsUWPSwapChainPanel::Init&& init)
|
|
6611
|
-
|
|
6612
|
-
swapChainPanel(std::move(init.swapChainPanel)){}
|
|
6808
|
+
SurfaceDescriptorFromWindowsUWPSwapChainPanel::SurfaceDescriptorFromWindowsUWPSwapChainPanel(SurfaceDescriptorFromWindowsUWPSwapChainPanel::Init&& init) :
|
|
6809
|
+
ChainedStruct { init.nextInChain, SType::SurfaceDescriptorFromWindowsUWPSwapChainPanel },
|
|
6810
|
+
swapChainPanel(std::move(init.swapChainPanel)) {}
|
|
6613
6811
|
|
|
6614
6812
|
SurfaceDescriptorFromWindowsUWPSwapChainPanel::operator const WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel&() const noexcept {
|
|
6615
6813
|
return *reinterpret_cast<const WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel*>(this);
|
|
@@ -6622,14 +6820,14 @@ static_assert(offsetof(SurfaceDescriptorFromWindowsUWPSwapChainPanel, swapChainP
|
|
|
6622
6820
|
|
|
6623
6821
|
// SurfaceDescriptorFromWindowsWinUISwapChainPanel implementation
|
|
6624
6822
|
SurfaceDescriptorFromWindowsWinUISwapChainPanel::SurfaceDescriptorFromWindowsWinUISwapChainPanel()
|
|
6625
|
-
|
|
6823
|
+
: ChainedStruct { nullptr, SType::SurfaceDescriptorFromWindowsWinUISwapChainPanel } {}
|
|
6626
6824
|
struct SurfaceDescriptorFromWindowsWinUISwapChainPanel::Init {
|
|
6627
6825
|
ChainedStruct * const nextInChain;
|
|
6628
6826
|
void * swapChainPanel = nullptr;
|
|
6629
6827
|
};
|
|
6630
|
-
SurfaceDescriptorFromWindowsWinUISwapChainPanel::SurfaceDescriptorFromWindowsWinUISwapChainPanel(SurfaceDescriptorFromWindowsWinUISwapChainPanel::Init&& init)
|
|
6631
|
-
|
|
6632
|
-
swapChainPanel(std::move(init.swapChainPanel)){}
|
|
6828
|
+
SurfaceDescriptorFromWindowsWinUISwapChainPanel::SurfaceDescriptorFromWindowsWinUISwapChainPanel(SurfaceDescriptorFromWindowsWinUISwapChainPanel::Init&& init) :
|
|
6829
|
+
ChainedStruct { init.nextInChain, SType::SurfaceDescriptorFromWindowsWinUISwapChainPanel },
|
|
6830
|
+
swapChainPanel(std::move(init.swapChainPanel)) {}
|
|
6633
6831
|
|
|
6634
6832
|
SurfaceDescriptorFromWindowsWinUISwapChainPanel::operator const WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel&() const noexcept {
|
|
6635
6833
|
return *reinterpret_cast<const WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel*>(this);
|
|
@@ -6642,14 +6840,14 @@ static_assert(offsetof(SurfaceDescriptorFromWindowsWinUISwapChainPanel, swapChai
|
|
|
6642
6840
|
|
|
6643
6841
|
// SurfaceSourceAndroidNativeWindow implementation
|
|
6644
6842
|
SurfaceSourceAndroidNativeWindow::SurfaceSourceAndroidNativeWindow()
|
|
6645
|
-
|
|
6843
|
+
: ChainedStruct { nullptr, SType::SurfaceSourceAndroidNativeWindow } {}
|
|
6646
6844
|
struct SurfaceSourceAndroidNativeWindow::Init {
|
|
6647
6845
|
ChainedStruct * const nextInChain;
|
|
6648
6846
|
void * window;
|
|
6649
6847
|
};
|
|
6650
|
-
SurfaceSourceAndroidNativeWindow::SurfaceSourceAndroidNativeWindow(SurfaceSourceAndroidNativeWindow::Init&& init)
|
|
6651
|
-
|
|
6652
|
-
window(std::move(init.window)){}
|
|
6848
|
+
SurfaceSourceAndroidNativeWindow::SurfaceSourceAndroidNativeWindow(SurfaceSourceAndroidNativeWindow::Init&& init) :
|
|
6849
|
+
ChainedStruct { init.nextInChain, SType::SurfaceSourceAndroidNativeWindow },
|
|
6850
|
+
window(std::move(init.window)) {}
|
|
6653
6851
|
|
|
6654
6852
|
SurfaceSourceAndroidNativeWindow::operator const WGPUSurfaceSourceAndroidNativeWindow&() const noexcept {
|
|
6655
6853
|
return *reinterpret_cast<const WGPUSurfaceSourceAndroidNativeWindow*>(this);
|
|
@@ -6662,14 +6860,14 @@ static_assert(offsetof(SurfaceSourceAndroidNativeWindow, window) == offsetof(WGP
|
|
|
6662
6860
|
|
|
6663
6861
|
// SurfaceSourceMetalLayer implementation
|
|
6664
6862
|
SurfaceSourceMetalLayer::SurfaceSourceMetalLayer()
|
|
6665
|
-
|
|
6863
|
+
: ChainedStruct { nullptr, SType::SurfaceSourceMetalLayer } {}
|
|
6666
6864
|
struct SurfaceSourceMetalLayer::Init {
|
|
6667
6865
|
ChainedStruct * const nextInChain;
|
|
6668
6866
|
void * layer = nullptr;
|
|
6669
6867
|
};
|
|
6670
|
-
SurfaceSourceMetalLayer::SurfaceSourceMetalLayer(SurfaceSourceMetalLayer::Init&& init)
|
|
6671
|
-
|
|
6672
|
-
layer(std::move(init.layer)){}
|
|
6868
|
+
SurfaceSourceMetalLayer::SurfaceSourceMetalLayer(SurfaceSourceMetalLayer::Init&& init) :
|
|
6869
|
+
ChainedStruct { init.nextInChain, SType::SurfaceSourceMetalLayer },
|
|
6870
|
+
layer(std::move(init.layer)) {}
|
|
6673
6871
|
|
|
6674
6872
|
SurfaceSourceMetalLayer::operator const WGPUSurfaceSourceMetalLayer&() const noexcept {
|
|
6675
6873
|
return *reinterpret_cast<const WGPUSurfaceSourceMetalLayer*>(this);
|
|
@@ -6682,16 +6880,16 @@ static_assert(offsetof(SurfaceSourceMetalLayer, layer) == offsetof(WGPUSurfaceSo
|
|
|
6682
6880
|
|
|
6683
6881
|
// SurfaceSourceWaylandSurface implementation
|
|
6684
6882
|
SurfaceSourceWaylandSurface::SurfaceSourceWaylandSurface()
|
|
6685
|
-
|
|
6883
|
+
: ChainedStruct { nullptr, SType::SurfaceSourceWaylandSurface } {}
|
|
6686
6884
|
struct SurfaceSourceWaylandSurface::Init {
|
|
6687
6885
|
ChainedStruct * const nextInChain;
|
|
6688
6886
|
void * display = nullptr;
|
|
6689
6887
|
void * surface = nullptr;
|
|
6690
6888
|
};
|
|
6691
|
-
SurfaceSourceWaylandSurface::SurfaceSourceWaylandSurface(SurfaceSourceWaylandSurface::Init&& init)
|
|
6692
|
-
|
|
6693
|
-
display(std::move(init.display)),
|
|
6694
|
-
surface(std::move(init.surface)){}
|
|
6889
|
+
SurfaceSourceWaylandSurface::SurfaceSourceWaylandSurface(SurfaceSourceWaylandSurface::Init&& init) :
|
|
6890
|
+
ChainedStruct { init.nextInChain, SType::SurfaceSourceWaylandSurface },
|
|
6891
|
+
display(std::move(init.display)),
|
|
6892
|
+
surface(std::move(init.surface)) {}
|
|
6695
6893
|
|
|
6696
6894
|
SurfaceSourceWaylandSurface::operator const WGPUSurfaceSourceWaylandSurface&() const noexcept {
|
|
6697
6895
|
return *reinterpret_cast<const WGPUSurfaceSourceWaylandSurface*>(this);
|
|
@@ -6706,16 +6904,16 @@ static_assert(offsetof(SurfaceSourceWaylandSurface, surface) == offsetof(WGPUSur
|
|
|
6706
6904
|
|
|
6707
6905
|
// SurfaceSourceWindowsHWND implementation
|
|
6708
6906
|
SurfaceSourceWindowsHWND::SurfaceSourceWindowsHWND()
|
|
6709
|
-
|
|
6907
|
+
: ChainedStruct { nullptr, SType::SurfaceSourceWindowsHWND } {}
|
|
6710
6908
|
struct SurfaceSourceWindowsHWND::Init {
|
|
6711
6909
|
ChainedStruct * const nextInChain;
|
|
6712
6910
|
void * hinstance = nullptr;
|
|
6713
6911
|
void * hwnd = nullptr;
|
|
6714
6912
|
};
|
|
6715
|
-
SurfaceSourceWindowsHWND::SurfaceSourceWindowsHWND(SurfaceSourceWindowsHWND::Init&& init)
|
|
6716
|
-
|
|
6717
|
-
hinstance(std::move(init.hinstance)),
|
|
6718
|
-
hwnd(std::move(init.hwnd)){}
|
|
6913
|
+
SurfaceSourceWindowsHWND::SurfaceSourceWindowsHWND(SurfaceSourceWindowsHWND::Init&& init) :
|
|
6914
|
+
ChainedStruct { init.nextInChain, SType::SurfaceSourceWindowsHWND },
|
|
6915
|
+
hinstance(std::move(init.hinstance)),
|
|
6916
|
+
hwnd(std::move(init.hwnd)) {}
|
|
6719
6917
|
|
|
6720
6918
|
SurfaceSourceWindowsHWND::operator const WGPUSurfaceSourceWindowsHWND&() const noexcept {
|
|
6721
6919
|
return *reinterpret_cast<const WGPUSurfaceSourceWindowsHWND*>(this);
|
|
@@ -6730,16 +6928,16 @@ static_assert(offsetof(SurfaceSourceWindowsHWND, hwnd) == offsetof(WGPUSurfaceSo
|
|
|
6730
6928
|
|
|
6731
6929
|
// SurfaceSourceXCBWindow implementation
|
|
6732
6930
|
SurfaceSourceXCBWindow::SurfaceSourceXCBWindow()
|
|
6733
|
-
|
|
6931
|
+
: ChainedStruct { nullptr, SType::SurfaceSourceXCBWindow } {}
|
|
6734
6932
|
struct SurfaceSourceXCBWindow::Init {
|
|
6735
6933
|
ChainedStruct * const nextInChain;
|
|
6736
6934
|
void * connection = nullptr;
|
|
6737
6935
|
uint32_t window;
|
|
6738
6936
|
};
|
|
6739
|
-
SurfaceSourceXCBWindow::SurfaceSourceXCBWindow(SurfaceSourceXCBWindow::Init&& init)
|
|
6740
|
-
|
|
6741
|
-
connection(std::move(init.connection)),
|
|
6742
|
-
window(std::move(init.window)){}
|
|
6937
|
+
SurfaceSourceXCBWindow::SurfaceSourceXCBWindow(SurfaceSourceXCBWindow::Init&& init) :
|
|
6938
|
+
ChainedStruct { init.nextInChain, SType::SurfaceSourceXCBWindow },
|
|
6939
|
+
connection(std::move(init.connection)),
|
|
6940
|
+
window(std::move(init.window)) {}
|
|
6743
6941
|
|
|
6744
6942
|
SurfaceSourceXCBWindow::operator const WGPUSurfaceSourceXCBWindow&() const noexcept {
|
|
6745
6943
|
return *reinterpret_cast<const WGPUSurfaceSourceXCBWindow*>(this);
|
|
@@ -6754,16 +6952,16 @@ static_assert(offsetof(SurfaceSourceXCBWindow, window) == offsetof(WGPUSurfaceSo
|
|
|
6754
6952
|
|
|
6755
6953
|
// SurfaceSourceXlibWindow implementation
|
|
6756
6954
|
SurfaceSourceXlibWindow::SurfaceSourceXlibWindow()
|
|
6757
|
-
|
|
6955
|
+
: ChainedStruct { nullptr, SType::SurfaceSourceXlibWindow } {}
|
|
6758
6956
|
struct SurfaceSourceXlibWindow::Init {
|
|
6759
6957
|
ChainedStruct * const nextInChain;
|
|
6760
6958
|
void * display = nullptr;
|
|
6761
6959
|
uint64_t window;
|
|
6762
6960
|
};
|
|
6763
|
-
SurfaceSourceXlibWindow::SurfaceSourceXlibWindow(SurfaceSourceXlibWindow::Init&& init)
|
|
6764
|
-
|
|
6765
|
-
display(std::move(init.display)),
|
|
6766
|
-
window(std::move(init.window)){}
|
|
6961
|
+
SurfaceSourceXlibWindow::SurfaceSourceXlibWindow(SurfaceSourceXlibWindow::Init&& init) :
|
|
6962
|
+
ChainedStruct { init.nextInChain, SType::SurfaceSourceXlibWindow },
|
|
6963
|
+
display(std::move(init.display)),
|
|
6964
|
+
window(std::move(init.window)) {}
|
|
6767
6965
|
|
|
6768
6966
|
SurfaceSourceXlibWindow::operator const WGPUSurfaceSourceXlibWindow&() const noexcept {
|
|
6769
6967
|
return *reinterpret_cast<const WGPUSurfaceSourceXlibWindow*>(this);
|
|
@@ -6793,14 +6991,14 @@ static_assert(offsetof(SurfaceTexture, status) == offsetof(WGPUSurfaceTexture, s
|
|
|
6793
6991
|
|
|
6794
6992
|
// TexelBufferBindingEntry implementation
|
|
6795
6993
|
TexelBufferBindingEntry::TexelBufferBindingEntry()
|
|
6796
|
-
|
|
6994
|
+
: ChainedStruct { nullptr, SType::TexelBufferBindingEntry } {}
|
|
6797
6995
|
struct TexelBufferBindingEntry::Init {
|
|
6798
6996
|
ChainedStruct * const nextInChain;
|
|
6799
6997
|
TexelBufferView texelBufferView = nullptr;
|
|
6800
6998
|
};
|
|
6801
|
-
TexelBufferBindingEntry::TexelBufferBindingEntry(TexelBufferBindingEntry::Init&& init)
|
|
6802
|
-
|
|
6803
|
-
texelBufferView(std::move(init.texelBufferView)){}
|
|
6999
|
+
TexelBufferBindingEntry::TexelBufferBindingEntry(TexelBufferBindingEntry::Init&& init) :
|
|
7000
|
+
ChainedStruct { init.nextInChain, SType::TexelBufferBindingEntry },
|
|
7001
|
+
texelBufferView(std::move(init.texelBufferView)) {}
|
|
6804
7002
|
|
|
6805
7003
|
TexelBufferBindingEntry::operator const WGPUTexelBufferBindingEntry&() const noexcept {
|
|
6806
7004
|
return *reinterpret_cast<const WGPUTexelBufferBindingEntry*>(this);
|
|
@@ -6813,16 +7011,16 @@ static_assert(offsetof(TexelBufferBindingEntry, texelBufferView) == offsetof(WGP
|
|
|
6813
7011
|
|
|
6814
7012
|
// TexelBufferBindingLayout implementation
|
|
6815
7013
|
TexelBufferBindingLayout::TexelBufferBindingLayout()
|
|
6816
|
-
|
|
7014
|
+
: ChainedStruct { nullptr, SType::TexelBufferBindingLayout } {}
|
|
6817
7015
|
struct TexelBufferBindingLayout::Init {
|
|
6818
7016
|
ChainedStruct * const nextInChain;
|
|
6819
7017
|
TexelBufferAccess access = TexelBufferAccess::Undefined;
|
|
6820
7018
|
TextureFormat format = TextureFormat::Undefined;
|
|
6821
7019
|
};
|
|
6822
|
-
TexelBufferBindingLayout::TexelBufferBindingLayout(TexelBufferBindingLayout::Init&& init)
|
|
6823
|
-
|
|
6824
|
-
access(std::move(init.access)),
|
|
6825
|
-
format(std::move(init.format)){}
|
|
7020
|
+
TexelBufferBindingLayout::TexelBufferBindingLayout(TexelBufferBindingLayout::Init&& init) :
|
|
7021
|
+
ChainedStruct { init.nextInChain, SType::TexelBufferBindingLayout },
|
|
7022
|
+
access(std::move(init.access)),
|
|
7023
|
+
format(std::move(init.format)) {}
|
|
6826
7024
|
|
|
6827
7025
|
TexelBufferBindingLayout::operator const WGPUTexelBufferBindingLayout&() const noexcept {
|
|
6828
7026
|
return *reinterpret_cast<const WGPUTexelBufferBindingLayout*>(this);
|
|
@@ -6888,14 +7086,14 @@ static_assert(offsetof(TextureBindingLayout, multisampled) == offsetof(WGPUTextu
|
|
|
6888
7086
|
|
|
6889
7087
|
// TextureBindingViewDimension implementation
|
|
6890
7088
|
TextureBindingViewDimension::TextureBindingViewDimension()
|
|
6891
|
-
|
|
7089
|
+
: ChainedStruct { nullptr, SType::TextureBindingViewDimension } {}
|
|
6892
7090
|
struct TextureBindingViewDimension::Init {
|
|
6893
7091
|
ChainedStruct * const nextInChain;
|
|
6894
7092
|
TextureViewDimension textureBindingViewDimension = TextureViewDimension::Undefined;
|
|
6895
7093
|
};
|
|
6896
|
-
TextureBindingViewDimension::TextureBindingViewDimension(TextureBindingViewDimension::Init&& init)
|
|
6897
|
-
|
|
6898
|
-
textureBindingViewDimension(std::move(init.textureBindingViewDimension)){}
|
|
7094
|
+
TextureBindingViewDimension::TextureBindingViewDimension(TextureBindingViewDimension::Init&& init) :
|
|
7095
|
+
ChainedStruct { init.nextInChain, SType::TextureBindingViewDimension },
|
|
7096
|
+
textureBindingViewDimension(std::move(init.textureBindingViewDimension)) {}
|
|
6899
7097
|
|
|
6900
7098
|
TextureBindingViewDimension::operator const WGPUTextureBindingViewDimension&() const noexcept {
|
|
6901
7099
|
return *reinterpret_cast<const WGPUTextureBindingViewDimension*>(this);
|
|
@@ -6942,7 +7140,7 @@ static_assert(offsetof(VertexAttribute, shaderLocation) == offsetof(WGPUVertexAt
|
|
|
6942
7140
|
|
|
6943
7141
|
// YCbCrVkDescriptor implementation
|
|
6944
7142
|
YCbCrVkDescriptor::YCbCrVkDescriptor()
|
|
6945
|
-
|
|
7143
|
+
: ChainedStruct { nullptr, SType::YCbCrVkDescriptor } {}
|
|
6946
7144
|
struct YCbCrVkDescriptor::Init {
|
|
6947
7145
|
ChainedStruct * const nextInChain;
|
|
6948
7146
|
uint32_t vkFormat = 0;
|
|
@@ -6958,20 +7156,20 @@ struct YCbCrVkDescriptor::Init {
|
|
|
6958
7156
|
Bool forceExplicitReconstruction = false;
|
|
6959
7157
|
uint64_t externalFormat = 0;
|
|
6960
7158
|
};
|
|
6961
|
-
YCbCrVkDescriptor::YCbCrVkDescriptor(YCbCrVkDescriptor::Init&& init)
|
|
6962
|
-
|
|
6963
|
-
vkFormat(std::move(init.vkFormat)),
|
|
6964
|
-
vkYCbCrModel(std::move(init.vkYCbCrModel)),
|
|
6965
|
-
vkYCbCrRange(std::move(init.vkYCbCrRange)),
|
|
6966
|
-
vkComponentSwizzleRed(std::move(init.vkComponentSwizzleRed)),
|
|
6967
|
-
vkComponentSwizzleGreen(std::move(init.vkComponentSwizzleGreen)),
|
|
6968
|
-
vkComponentSwizzleBlue(std::move(init.vkComponentSwizzleBlue)),
|
|
6969
|
-
vkComponentSwizzleAlpha(std::move(init.vkComponentSwizzleAlpha)),
|
|
6970
|
-
vkXChromaOffset(std::move(init.vkXChromaOffset)),
|
|
6971
|
-
vkYChromaOffset(std::move(init.vkYChromaOffset)),
|
|
6972
|
-
vkChromaFilter(std::move(init.vkChromaFilter)),
|
|
6973
|
-
forceExplicitReconstruction(std::move(init.forceExplicitReconstruction)),
|
|
6974
|
-
externalFormat(std::move(init.externalFormat)){}
|
|
7159
|
+
YCbCrVkDescriptor::YCbCrVkDescriptor(YCbCrVkDescriptor::Init&& init) :
|
|
7160
|
+
ChainedStruct { init.nextInChain, SType::YCbCrVkDescriptor },
|
|
7161
|
+
vkFormat(std::move(init.vkFormat)),
|
|
7162
|
+
vkYCbCrModel(std::move(init.vkYCbCrModel)),
|
|
7163
|
+
vkYCbCrRange(std::move(init.vkYCbCrRange)),
|
|
7164
|
+
vkComponentSwizzleRed(std::move(init.vkComponentSwizzleRed)),
|
|
7165
|
+
vkComponentSwizzleGreen(std::move(init.vkComponentSwizzleGreen)),
|
|
7166
|
+
vkComponentSwizzleBlue(std::move(init.vkComponentSwizzleBlue)),
|
|
7167
|
+
vkComponentSwizzleAlpha(std::move(init.vkComponentSwizzleAlpha)),
|
|
7168
|
+
vkXChromaOffset(std::move(init.vkXChromaOffset)),
|
|
7169
|
+
vkYChromaOffset(std::move(init.vkYChromaOffset)),
|
|
7170
|
+
vkChromaFilter(std::move(init.vkChromaFilter)),
|
|
7171
|
+
forceExplicitReconstruction(std::move(init.forceExplicitReconstruction)),
|
|
7172
|
+
externalFormat(std::move(init.externalFormat)) {}
|
|
6975
7173
|
|
|
6976
7174
|
YCbCrVkDescriptor::operator const WGPUYCbCrVkDescriptor&() const noexcept {
|
|
6977
7175
|
return *reinterpret_cast<const WGPUYCbCrVkDescriptor*>(this);
|
|
@@ -7006,16 +7204,16 @@ static_assert(offsetof(YCbCrVkDescriptor, externalFormat) == offsetof(WGPUYCbCrV
|
|
|
7006
7204
|
|
|
7007
7205
|
// AdapterPropertiesMemoryHeaps implementation
|
|
7008
7206
|
AdapterPropertiesMemoryHeaps::AdapterPropertiesMemoryHeaps()
|
|
7009
|
-
|
|
7207
|
+
: ChainedStructOut { nullptr, SType::AdapterPropertiesMemoryHeaps } {}
|
|
7010
7208
|
struct AdapterPropertiesMemoryHeaps::Init {
|
|
7011
7209
|
ChainedStructOut * nextInChain;
|
|
7012
7210
|
size_t const heapCount = {};
|
|
7013
7211
|
MemoryHeapInfo const * const heapInfo = nullptr;
|
|
7014
7212
|
};
|
|
7015
|
-
AdapterPropertiesMemoryHeaps::AdapterPropertiesMemoryHeaps(AdapterPropertiesMemoryHeaps::Init&& init)
|
|
7016
|
-
|
|
7017
|
-
heapCount(std::move(init.heapCount)),
|
|
7018
|
-
heapInfo(std::move(init.heapInfo)){}
|
|
7213
|
+
AdapterPropertiesMemoryHeaps::AdapterPropertiesMemoryHeaps(AdapterPropertiesMemoryHeaps::Init&& init) :
|
|
7214
|
+
ChainedStructOut { init.nextInChain, SType::AdapterPropertiesMemoryHeaps },
|
|
7215
|
+
heapCount(std::move(init.heapCount)),
|
|
7216
|
+
heapInfo(std::move(init.heapInfo)) {}
|
|
7019
7217
|
AdapterPropertiesMemoryHeaps::~AdapterPropertiesMemoryHeaps() {
|
|
7020
7218
|
FreeMembers();
|
|
7021
7219
|
}
|
|
@@ -7064,16 +7262,16 @@ static_assert(offsetof(AdapterPropertiesMemoryHeaps, heapInfo) == offsetof(WGPUA
|
|
|
7064
7262
|
|
|
7065
7263
|
// AdapterPropertiesSubgroupMatrixConfigs implementation
|
|
7066
7264
|
AdapterPropertiesSubgroupMatrixConfigs::AdapterPropertiesSubgroupMatrixConfigs()
|
|
7067
|
-
|
|
7265
|
+
: ChainedStructOut { nullptr, SType::AdapterPropertiesSubgroupMatrixConfigs } {}
|
|
7068
7266
|
struct AdapterPropertiesSubgroupMatrixConfigs::Init {
|
|
7069
7267
|
ChainedStructOut * nextInChain;
|
|
7070
7268
|
size_t const configCount = {};
|
|
7071
7269
|
SubgroupMatrixConfig const * const configs = nullptr;
|
|
7072
7270
|
};
|
|
7073
|
-
AdapterPropertiesSubgroupMatrixConfigs::AdapterPropertiesSubgroupMatrixConfigs(AdapterPropertiesSubgroupMatrixConfigs::Init&& init)
|
|
7074
|
-
|
|
7075
|
-
configCount(std::move(init.configCount)),
|
|
7076
|
-
configs(std::move(init.configs)){}
|
|
7271
|
+
AdapterPropertiesSubgroupMatrixConfigs::AdapterPropertiesSubgroupMatrixConfigs(AdapterPropertiesSubgroupMatrixConfigs::Init&& init) :
|
|
7272
|
+
ChainedStructOut { init.nextInChain, SType::AdapterPropertiesSubgroupMatrixConfigs },
|
|
7273
|
+
configCount(std::move(init.configCount)),
|
|
7274
|
+
configs(std::move(init.configs)) {}
|
|
7077
7275
|
AdapterPropertiesSubgroupMatrixConfigs::~AdapterPropertiesSubgroupMatrixConfigs() {
|
|
7078
7276
|
FreeMembers();
|
|
7079
7277
|
}
|
|
@@ -7283,16 +7481,16 @@ static_assert(offsetof(ComputeState, constants) == offsetof(WGPUComputeState, co
|
|
|
7283
7481
|
|
|
7284
7482
|
// DawnDrmFormatCapabilities implementation
|
|
7285
7483
|
DawnDrmFormatCapabilities::DawnDrmFormatCapabilities()
|
|
7286
|
-
|
|
7484
|
+
: ChainedStructOut { nullptr, SType::DawnDrmFormatCapabilities } {}
|
|
7287
7485
|
struct DawnDrmFormatCapabilities::Init {
|
|
7288
7486
|
ChainedStructOut * nextInChain;
|
|
7289
7487
|
size_t const propertiesCount = {};
|
|
7290
7488
|
DawnDrmFormatProperties const * const properties = nullptr;
|
|
7291
7489
|
};
|
|
7292
|
-
DawnDrmFormatCapabilities::DawnDrmFormatCapabilities(DawnDrmFormatCapabilities::Init&& init)
|
|
7293
|
-
|
|
7294
|
-
propertiesCount(std::move(init.propertiesCount)),
|
|
7295
|
-
properties(std::move(init.properties)){}
|
|
7490
|
+
DawnDrmFormatCapabilities::DawnDrmFormatCapabilities(DawnDrmFormatCapabilities::Init&& init) :
|
|
7491
|
+
ChainedStructOut { init.nextInChain, SType::DawnDrmFormatCapabilities },
|
|
7492
|
+
propertiesCount(std::move(init.propertiesCount)),
|
|
7493
|
+
properties(std::move(init.properties)) {}
|
|
7296
7494
|
DawnDrmFormatCapabilities::~DawnDrmFormatCapabilities() {
|
|
7297
7495
|
FreeMembers();
|
|
7298
7496
|
}
|
|
@@ -7531,18 +7729,18 @@ static_assert(offsetof(Limits, maxImmediateSize) == offsetof(WGPULimits, maxImme
|
|
|
7531
7729
|
|
|
7532
7730
|
// PipelineLayoutPixelLocalStorage implementation
|
|
7533
7731
|
PipelineLayoutPixelLocalStorage::PipelineLayoutPixelLocalStorage()
|
|
7534
|
-
|
|
7732
|
+
: ChainedStruct { nullptr, SType::PipelineLayoutPixelLocalStorage } {}
|
|
7535
7733
|
struct PipelineLayoutPixelLocalStorage::Init {
|
|
7536
7734
|
ChainedStruct * const nextInChain;
|
|
7537
7735
|
uint64_t totalPixelLocalStorageSize;
|
|
7538
7736
|
size_t storageAttachmentCount = 0;
|
|
7539
7737
|
PipelineLayoutStorageAttachment const * storageAttachments = nullptr;
|
|
7540
7738
|
};
|
|
7541
|
-
PipelineLayoutPixelLocalStorage::PipelineLayoutPixelLocalStorage(PipelineLayoutPixelLocalStorage::Init&& init)
|
|
7542
|
-
|
|
7543
|
-
totalPixelLocalStorageSize(std::move(init.totalPixelLocalStorageSize)),
|
|
7544
|
-
storageAttachmentCount(std::move(init.storageAttachmentCount)),
|
|
7545
|
-
storageAttachments(std::move(init.storageAttachments)){}
|
|
7739
|
+
PipelineLayoutPixelLocalStorage::PipelineLayoutPixelLocalStorage(PipelineLayoutPixelLocalStorage::Init&& init) :
|
|
7740
|
+
ChainedStruct { init.nextInChain, SType::PipelineLayoutPixelLocalStorage },
|
|
7741
|
+
totalPixelLocalStorageSize(std::move(init.totalPixelLocalStorageSize)),
|
|
7742
|
+
storageAttachmentCount(std::move(init.storageAttachmentCount)),
|
|
7743
|
+
storageAttachments(std::move(init.storageAttachments)) {}
|
|
7546
7744
|
|
|
7547
7745
|
PipelineLayoutPixelLocalStorage::operator const WGPUPipelineLayoutPixelLocalStorage&() const noexcept {
|
|
7548
7746
|
return *reinterpret_cast<const WGPUPipelineLayoutPixelLocalStorage*>(this);
|
|
@@ -7582,16 +7780,16 @@ static_assert(offsetof(RenderPassColorAttachment, clearValue) == offsetof(WGPURe
|
|
|
7582
7780
|
|
|
7583
7781
|
// RenderPassRenderAreaRect implementation
|
|
7584
7782
|
RenderPassRenderAreaRect::RenderPassRenderAreaRect()
|
|
7585
|
-
|
|
7783
|
+
: ChainedStruct { nullptr, SType::RenderPassRenderAreaRect } {}
|
|
7586
7784
|
struct RenderPassRenderAreaRect::Init {
|
|
7587
7785
|
ChainedStruct * const nextInChain;
|
|
7588
7786
|
Origin2D origin = {};
|
|
7589
7787
|
Extent2D size = {};
|
|
7590
7788
|
};
|
|
7591
|
-
RenderPassRenderAreaRect::RenderPassRenderAreaRect(RenderPassRenderAreaRect::Init&& init)
|
|
7592
|
-
|
|
7593
|
-
origin(std::move(init.origin)),
|
|
7594
|
-
size(std::move(init.size)){}
|
|
7789
|
+
RenderPassRenderAreaRect::RenderPassRenderAreaRect(RenderPassRenderAreaRect::Init&& init) :
|
|
7790
|
+
ChainedStruct { init.nextInChain, SType::RenderPassRenderAreaRect },
|
|
7791
|
+
origin(std::move(init.origin)),
|
|
7792
|
+
size(std::move(init.size)) {}
|
|
7595
7793
|
|
|
7596
7794
|
RenderPassRenderAreaRect::operator const WGPURenderPassRenderAreaRect&() const noexcept {
|
|
7597
7795
|
return *reinterpret_cast<const WGPURenderPassRenderAreaRect*>(this);
|
|
@@ -7733,14 +7931,14 @@ static_assert(offsetof(SharedFenceExportInfo, type) == offsetof(WGPUSharedFenceE
|
|
|
7733
7931
|
|
|
7734
7932
|
// SharedTextureMemoryAHardwareBufferProperties implementation
|
|
7735
7933
|
SharedTextureMemoryAHardwareBufferProperties::SharedTextureMemoryAHardwareBufferProperties()
|
|
7736
|
-
|
|
7934
|
+
: ChainedStructOut { nullptr, SType::SharedTextureMemoryAHardwareBufferProperties } {}
|
|
7737
7935
|
struct SharedTextureMemoryAHardwareBufferProperties::Init {
|
|
7738
7936
|
ChainedStructOut * nextInChain;
|
|
7739
7937
|
YCbCrVkDescriptor yCbCrInfo = {};
|
|
7740
7938
|
};
|
|
7741
|
-
SharedTextureMemoryAHardwareBufferProperties::SharedTextureMemoryAHardwareBufferProperties(SharedTextureMemoryAHardwareBufferProperties::Init&& init)
|
|
7742
|
-
|
|
7743
|
-
yCbCrInfo(std::move(init.yCbCrInfo)){}
|
|
7939
|
+
SharedTextureMemoryAHardwareBufferProperties::SharedTextureMemoryAHardwareBufferProperties(SharedTextureMemoryAHardwareBufferProperties::Init&& init) :
|
|
7940
|
+
ChainedStructOut { init.nextInChain, SType::SharedTextureMemoryAHardwareBufferProperties },
|
|
7941
|
+
yCbCrInfo(std::move(init.yCbCrInfo)) {}
|
|
7744
7942
|
|
|
7745
7943
|
SharedTextureMemoryAHardwareBufferProperties::operator const WGPUSharedTextureMemoryAHardwareBufferProperties&() const noexcept {
|
|
7746
7944
|
return *reinterpret_cast<const WGPUSharedTextureMemoryAHardwareBufferProperties*>(this);
|
|
@@ -7774,7 +7972,7 @@ static_assert(offsetof(SharedTextureMemoryBeginAccessDescriptor, signaledValues)
|
|
|
7774
7972
|
|
|
7775
7973
|
// SharedTextureMemoryDmaBufDescriptor implementation
|
|
7776
7974
|
SharedTextureMemoryDmaBufDescriptor::SharedTextureMemoryDmaBufDescriptor()
|
|
7777
|
-
|
|
7975
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryDmaBufDescriptor } {}
|
|
7778
7976
|
struct SharedTextureMemoryDmaBufDescriptor::Init {
|
|
7779
7977
|
ChainedStruct * const nextInChain;
|
|
7780
7978
|
Extent3D size = {};
|
|
@@ -7783,13 +7981,13 @@ struct SharedTextureMemoryDmaBufDescriptor::Init {
|
|
|
7783
7981
|
size_t planeCount;
|
|
7784
7982
|
SharedTextureMemoryDmaBufPlane const * planes = nullptr;
|
|
7785
7983
|
};
|
|
7786
|
-
SharedTextureMemoryDmaBufDescriptor::SharedTextureMemoryDmaBufDescriptor(SharedTextureMemoryDmaBufDescriptor::Init&& init)
|
|
7787
|
-
|
|
7788
|
-
size(std::move(init.size)),
|
|
7789
|
-
drmFormat(std::move(init.drmFormat)),
|
|
7790
|
-
drmModifier(std::move(init.drmModifier)),
|
|
7791
|
-
planeCount(std::move(init.planeCount)),
|
|
7792
|
-
planes(std::move(init.planes)){}
|
|
7984
|
+
SharedTextureMemoryDmaBufDescriptor::SharedTextureMemoryDmaBufDescriptor(SharedTextureMemoryDmaBufDescriptor::Init&& init) :
|
|
7985
|
+
ChainedStruct { init.nextInChain, SType::SharedTextureMemoryDmaBufDescriptor },
|
|
7986
|
+
size(std::move(init.size)),
|
|
7987
|
+
drmFormat(std::move(init.drmFormat)),
|
|
7988
|
+
drmModifier(std::move(init.drmModifier)),
|
|
7989
|
+
planeCount(std::move(init.planeCount)),
|
|
7990
|
+
planes(std::move(init.planes)) {}
|
|
7793
7991
|
|
|
7794
7992
|
SharedTextureMemoryDmaBufDescriptor::operator const WGPUSharedTextureMemoryDmaBufDescriptor&() const noexcept {
|
|
7795
7993
|
return *reinterpret_cast<const WGPUSharedTextureMemoryDmaBufDescriptor*>(this);
|
|
@@ -7810,14 +8008,14 @@ static_assert(offsetof(SharedTextureMemoryDmaBufDescriptor, planes) == offsetof(
|
|
|
7810
8008
|
|
|
7811
8009
|
// SharedTextureMemoryMetalEndAccessState implementation
|
|
7812
8010
|
SharedTextureMemoryMetalEndAccessState::SharedTextureMemoryMetalEndAccessState()
|
|
7813
|
-
|
|
8011
|
+
: ChainedStructOut { nullptr, SType::SharedTextureMemoryMetalEndAccessState } {}
|
|
7814
8012
|
struct SharedTextureMemoryMetalEndAccessState::Init {
|
|
7815
8013
|
ChainedStructOut * nextInChain;
|
|
7816
8014
|
Future commandsScheduledFuture = {};
|
|
7817
8015
|
};
|
|
7818
|
-
SharedTextureMemoryMetalEndAccessState::SharedTextureMemoryMetalEndAccessState(SharedTextureMemoryMetalEndAccessState::Init&& init)
|
|
7819
|
-
|
|
7820
|
-
commandsScheduledFuture(std::move(init.commandsScheduledFuture)){}
|
|
8016
|
+
SharedTextureMemoryMetalEndAccessState::SharedTextureMemoryMetalEndAccessState(SharedTextureMemoryMetalEndAccessState::Init&& init) :
|
|
8017
|
+
ChainedStructOut { init.nextInChain, SType::SharedTextureMemoryMetalEndAccessState },
|
|
8018
|
+
commandsScheduledFuture(std::move(init.commandsScheduledFuture)) {}
|
|
7821
8019
|
|
|
7822
8020
|
SharedTextureMemoryMetalEndAccessState::operator const WGPUSharedTextureMemoryMetalEndAccessState&() const noexcept {
|
|
7823
8021
|
return *reinterpret_cast<const WGPUSharedTextureMemoryMetalEndAccessState*>(this);
|
|
@@ -7873,14 +8071,14 @@ static_assert(offsetof(TexelCopyTextureInfo, aspect) == offsetof(WGPUTexelCopyTe
|
|
|
7873
8071
|
|
|
7874
8072
|
// TextureComponentSwizzleDescriptor implementation
|
|
7875
8073
|
TextureComponentSwizzleDescriptor::TextureComponentSwizzleDescriptor()
|
|
7876
|
-
|
|
8074
|
+
: ChainedStruct { nullptr, SType::TextureComponentSwizzleDescriptor } {}
|
|
7877
8075
|
struct TextureComponentSwizzleDescriptor::Init {
|
|
7878
8076
|
ChainedStruct * const nextInChain;
|
|
7879
8077
|
TextureComponentSwizzle swizzle = {};
|
|
7880
8078
|
};
|
|
7881
|
-
TextureComponentSwizzleDescriptor::TextureComponentSwizzleDescriptor(TextureComponentSwizzleDescriptor::Init&& init)
|
|
7882
|
-
|
|
7883
|
-
swizzle(std::move(init.swizzle)){}
|
|
8079
|
+
TextureComponentSwizzleDescriptor::TextureComponentSwizzleDescriptor(TextureComponentSwizzleDescriptor::Init&& init) :
|
|
8080
|
+
ChainedStruct { init.nextInChain, SType::TextureComponentSwizzleDescriptor },
|
|
8081
|
+
swizzle(std::move(init.swizzle)) {}
|
|
7884
8082
|
|
|
7885
8083
|
TextureComponentSwizzleDescriptor::operator const WGPUTextureComponentSwizzleDescriptor&() const noexcept {
|
|
7886
8084
|
return *reinterpret_cast<const WGPUTextureComponentSwizzleDescriptor*>(this);
|
|
@@ -8125,6 +8323,73 @@ static_assert(alignof(DawnFormatCapabilities) == alignof(WGPUDawnFormatCapabilit
|
|
|
8125
8323
|
static_assert(offsetof(DawnFormatCapabilities, nextInChain) == offsetof(WGPUDawnFormatCapabilities, nextInChain),
|
|
8126
8324
|
"offsetof mismatch for DawnFormatCapabilities::nextInChain");
|
|
8127
8325
|
|
|
8326
|
+
// DeviceDescriptor implementation
|
|
8327
|
+
DeviceDescriptor::DeviceDescriptor() = default;
|
|
8328
|
+
struct DeviceDescriptor::Init {
|
|
8329
|
+
ChainedStruct * const nextInChain;
|
|
8330
|
+
StringView label = {};
|
|
8331
|
+
size_t requiredFeatureCount = 0;
|
|
8332
|
+
FeatureName const * requiredFeatures = nullptr;
|
|
8333
|
+
Limits const * requiredLimits = nullptr;
|
|
8334
|
+
QueueDescriptor defaultQueue = {};
|
|
8335
|
+
};
|
|
8336
|
+
DeviceDescriptor::DeviceDescriptor(DeviceDescriptor::Init&& init) :
|
|
8337
|
+
detail::DeviceDescriptor {
|
|
8338
|
+
init.nextInChain,
|
|
8339
|
+
std::move(init.label),
|
|
8340
|
+
std::move(init.requiredFeatureCount),
|
|
8341
|
+
std::move(init.requiredFeatures),
|
|
8342
|
+
std::move(init.requiredLimits),
|
|
8343
|
+
std::move(init.defaultQueue),
|
|
8344
|
+
} {}
|
|
8345
|
+
template <typename F, typename T>
|
|
8346
|
+
void DeviceDescriptor::SetDeviceLostCallback(CallbackMode callbackMode, F callback, T userdata) {
|
|
8347
|
+
static_assert(offsetof(DeviceDescriptor, deviceLostCallbackInfo) == offsetof(WGPUDeviceDescriptor, deviceLostCallbackInfo),
|
|
8348
|
+
"offsetof mismatch for DeviceDescriptor::deviceLostCallbackInfo");
|
|
8349
|
+
|
|
8350
|
+
assert(deviceLostCallbackInfo.callback == nullptr);
|
|
8351
|
+
deviceLostCallbackInfo = detail::CallbackInfoHelper<WGPUDeviceLostCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
8352
|
+
deviceLostCallbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8353
|
+
}
|
|
8354
|
+
template <typename F>
|
|
8355
|
+
void DeviceDescriptor::SetDeviceLostCallback(CallbackMode callbackMode, F callback) {
|
|
8356
|
+
assert(deviceLostCallbackInfo.callback == nullptr);
|
|
8357
|
+
deviceLostCallbackInfo = detail::CallbackInfoHelper<WGPUDeviceLostCallbackInfo, F>::Create(std::move(callback));
|
|
8358
|
+
deviceLostCallbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8359
|
+
}
|
|
8360
|
+
template <typename F, typename T>
|
|
8361
|
+
void DeviceDescriptor::SetUncapturedErrorCallback(F callback, T userdata) {
|
|
8362
|
+
static_assert(offsetof(DeviceDescriptor, uncapturedErrorCallbackInfo) == offsetof(WGPUDeviceDescriptor, uncapturedErrorCallbackInfo),
|
|
8363
|
+
"offsetof mismatch for DeviceDescriptor::uncapturedErrorCallbackInfo");
|
|
8364
|
+
|
|
8365
|
+
assert(uncapturedErrorCallbackInfo.callback == nullptr);
|
|
8366
|
+
uncapturedErrorCallbackInfo = detail::CallbackInfoHelper<WGPUUncapturedErrorCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
8367
|
+
}
|
|
8368
|
+
template <typename F>
|
|
8369
|
+
void DeviceDescriptor::SetUncapturedErrorCallback(F callback) {
|
|
8370
|
+
assert(uncapturedErrorCallbackInfo.callback == nullptr);
|
|
8371
|
+
uncapturedErrorCallbackInfo = detail::CallbackInfoHelper<WGPUUncapturedErrorCallbackInfo, F>::Create(std::move(callback));
|
|
8372
|
+
}
|
|
8373
|
+
|
|
8374
|
+
DeviceDescriptor::operator const WGPUDeviceDescriptor&() const noexcept {
|
|
8375
|
+
return *reinterpret_cast<const WGPUDeviceDescriptor*>(this);
|
|
8376
|
+
}
|
|
8377
|
+
|
|
8378
|
+
static_assert(sizeof(DeviceDescriptor) == sizeof(WGPUDeviceDescriptor), "sizeof mismatch for DeviceDescriptor");
|
|
8379
|
+
static_assert(alignof(DeviceDescriptor) == alignof(WGPUDeviceDescriptor), "alignof mismatch for DeviceDescriptor");
|
|
8380
|
+
static_assert(offsetof(DeviceDescriptor, nextInChain) == offsetof(WGPUDeviceDescriptor, nextInChain),
|
|
8381
|
+
"offsetof mismatch for DeviceDescriptor::nextInChain");
|
|
8382
|
+
static_assert(offsetof(DeviceDescriptor, label) == offsetof(WGPUDeviceDescriptor, label),
|
|
8383
|
+
"offsetof mismatch for DeviceDescriptor::label");
|
|
8384
|
+
static_assert(offsetof(DeviceDescriptor, requiredFeatureCount) == offsetof(WGPUDeviceDescriptor, requiredFeatureCount),
|
|
8385
|
+
"offsetof mismatch for DeviceDescriptor::requiredFeatureCount");
|
|
8386
|
+
static_assert(offsetof(DeviceDescriptor, requiredFeatures) == offsetof(WGPUDeviceDescriptor, requiredFeatures),
|
|
8387
|
+
"offsetof mismatch for DeviceDescriptor::requiredFeatures");
|
|
8388
|
+
static_assert(offsetof(DeviceDescriptor, requiredLimits) == offsetof(WGPUDeviceDescriptor, requiredLimits),
|
|
8389
|
+
"offsetof mismatch for DeviceDescriptor::requiredLimits");
|
|
8390
|
+
static_assert(offsetof(DeviceDescriptor, defaultQueue) == offsetof(WGPUDeviceDescriptor, defaultQueue),
|
|
8391
|
+
"offsetof mismatch for DeviceDescriptor::defaultQueue");
|
|
8392
|
+
|
|
8128
8393
|
// PipelineLayoutDescriptor implementation
|
|
8129
8394
|
|
|
8130
8395
|
PipelineLayoutDescriptor::operator const WGPUPipelineLayoutDescriptor&() const noexcept {
|
|
@@ -8146,18 +8411,18 @@ static_assert(offsetof(PipelineLayoutDescriptor, immediateSize) == offsetof(WGPU
|
|
|
8146
8411
|
|
|
8147
8412
|
// RenderPassPixelLocalStorage implementation
|
|
8148
8413
|
RenderPassPixelLocalStorage::RenderPassPixelLocalStorage()
|
|
8149
|
-
|
|
8414
|
+
: ChainedStruct { nullptr, SType::RenderPassPixelLocalStorage } {}
|
|
8150
8415
|
struct RenderPassPixelLocalStorage::Init {
|
|
8151
8416
|
ChainedStruct * const nextInChain;
|
|
8152
8417
|
uint64_t totalPixelLocalStorageSize;
|
|
8153
8418
|
size_t storageAttachmentCount = 0;
|
|
8154
8419
|
RenderPassStorageAttachment const * storageAttachments = nullptr;
|
|
8155
8420
|
};
|
|
8156
|
-
RenderPassPixelLocalStorage::RenderPassPixelLocalStorage(RenderPassPixelLocalStorage::Init&& init)
|
|
8157
|
-
|
|
8158
|
-
totalPixelLocalStorageSize(std::move(init.totalPixelLocalStorageSize)),
|
|
8159
|
-
storageAttachmentCount(std::move(init.storageAttachmentCount)),
|
|
8160
|
-
storageAttachments(std::move(init.storageAttachments)){}
|
|
8421
|
+
RenderPassPixelLocalStorage::RenderPassPixelLocalStorage(RenderPassPixelLocalStorage::Init&& init) :
|
|
8422
|
+
ChainedStruct { init.nextInChain, SType::RenderPassPixelLocalStorage },
|
|
8423
|
+
totalPixelLocalStorageSize(std::move(init.totalPixelLocalStorageSize)),
|
|
8424
|
+
storageAttachmentCount(std::move(init.storageAttachmentCount)),
|
|
8425
|
+
storageAttachments(std::move(init.storageAttachments)) {}
|
|
8161
8426
|
|
|
8162
8427
|
RenderPassPixelLocalStorage::operator const WGPURenderPassPixelLocalStorage&() const noexcept {
|
|
8163
8428
|
return *reinterpret_cast<const WGPURenderPassPixelLocalStorage*>(this);
|
|
@@ -8385,128 +8650,6 @@ static_assert(offsetof(RenderPipelineDescriptor, multisample) == offsetof(WGPURe
|
|
|
8385
8650
|
static_assert(offsetof(RenderPipelineDescriptor, fragment) == offsetof(WGPURenderPipelineDescriptor, fragment),
|
|
8386
8651
|
"offsetof mismatch for RenderPipelineDescriptor::fragment");
|
|
8387
8652
|
|
|
8388
|
-
// DeviceDescriptor implementation
|
|
8389
|
-
|
|
8390
|
-
DeviceDescriptor::operator const WGPUDeviceDescriptor&() const noexcept {
|
|
8391
|
-
return *reinterpret_cast<const WGPUDeviceDescriptor*>(this);
|
|
8392
|
-
}
|
|
8393
|
-
|
|
8394
|
-
DeviceDescriptor::DeviceDescriptor() : detail::DeviceDescriptor {} {
|
|
8395
|
-
static_assert(offsetof(DeviceDescriptor, nextInChain) == offsetof(WGPUDeviceDescriptor, nextInChain),
|
|
8396
|
-
"offsetof mismatch for DeviceDescriptor::nextInChain");
|
|
8397
|
-
static_assert(offsetof(DeviceDescriptor, label) == offsetof(WGPUDeviceDescriptor, label),
|
|
8398
|
-
"offsetof mismatch for DeviceDescriptor::label");
|
|
8399
|
-
static_assert(offsetof(DeviceDescriptor, requiredFeatureCount) == offsetof(WGPUDeviceDescriptor, requiredFeatureCount),
|
|
8400
|
-
"offsetof mismatch for DeviceDescriptor::requiredFeatureCount");
|
|
8401
|
-
static_assert(offsetof(DeviceDescriptor, requiredFeatures) == offsetof(WGPUDeviceDescriptor, requiredFeatures),
|
|
8402
|
-
"offsetof mismatch for DeviceDescriptor::requiredFeatures");
|
|
8403
|
-
static_assert(offsetof(DeviceDescriptor, requiredLimits) == offsetof(WGPUDeviceDescriptor, requiredLimits),
|
|
8404
|
-
"offsetof mismatch for DeviceDescriptor::requiredLimits");
|
|
8405
|
-
static_assert(offsetof(DeviceDescriptor, defaultQueue) == offsetof(WGPUDeviceDescriptor, defaultQueue),
|
|
8406
|
-
"offsetof mismatch for DeviceDescriptor::defaultQueue");
|
|
8407
|
-
static_assert(offsetof(DeviceDescriptor, deviceLostCallbackInfo) == offsetof(WGPUDeviceDescriptor, deviceLostCallbackInfo),
|
|
8408
|
-
"offsetof mismatch for DeviceDescriptor::deviceLostCallbackInfo");
|
|
8409
|
-
static_assert(offsetof(DeviceDescriptor, uncapturedErrorCallbackInfo) == offsetof(WGPUDeviceDescriptor, uncapturedErrorCallbackInfo),
|
|
8410
|
-
"offsetof mismatch for DeviceDescriptor::uncapturedErrorCallbackInfo");
|
|
8411
|
-
}
|
|
8412
|
-
|
|
8413
|
-
struct DeviceDescriptor::Init {
|
|
8414
|
-
ChainedStruct const * nextInChain;
|
|
8415
|
-
StringView label = {};
|
|
8416
|
-
size_t requiredFeatureCount = 0;
|
|
8417
|
-
FeatureName const * requiredFeatures = nullptr;
|
|
8418
|
-
Limits const * requiredLimits = nullptr;
|
|
8419
|
-
QueueDescriptor defaultQueue = {};
|
|
8420
|
-
};
|
|
8421
|
-
|
|
8422
|
-
DeviceDescriptor::DeviceDescriptor(DeviceDescriptor::Init&& init) : detail::DeviceDescriptor {
|
|
8423
|
-
init.nextInChain,
|
|
8424
|
-
std::move(init.label),
|
|
8425
|
-
std::move(init.requiredFeatureCount),
|
|
8426
|
-
std::move(init.requiredFeatures),
|
|
8427
|
-
std::move(init.requiredLimits),
|
|
8428
|
-
std::move(init.defaultQueue)} {}
|
|
8429
|
-
|
|
8430
|
-
static_assert(sizeof(DeviceDescriptor) == sizeof(WGPUDeviceDescriptor), "sizeof mismatch for DeviceDescriptor");
|
|
8431
|
-
static_assert(alignof(DeviceDescriptor) == alignof(WGPUDeviceDescriptor), "alignof mismatch for DeviceDescriptor");
|
|
8432
|
-
|
|
8433
|
-
template <typename F, typename T, typename Cb, typename>
|
|
8434
|
-
void DeviceDescriptor::SetDeviceLostCallback(CallbackMode callbackMode, F callback, T userdata) {
|
|
8435
|
-
assert(deviceLostCallbackInfo.callback == nullptr);
|
|
8436
|
-
|
|
8437
|
-
deviceLostCallbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8438
|
-
deviceLostCallbackInfo.callback = [](WGPUDevice const * device, WGPUDeviceLostReason reason, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8439
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
8440
|
-
// We manually acquire and release the device to avoid changing any ref counts.
|
|
8441
|
-
auto apiDevice = Device::Acquire(*device);
|
|
8442
|
-
(*cb)(apiDevice, static_cast<DeviceLostReason>(reason), message, static_cast<T>(userdata_param));
|
|
8443
|
-
apiDevice.MoveToCHandle();
|
|
8444
|
-
};
|
|
8445
|
-
deviceLostCallbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8446
|
-
deviceLostCallbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8447
|
-
}
|
|
8448
|
-
|
|
8449
|
-
template <typename L, typename Cb, typename>
|
|
8450
|
-
void DeviceDescriptor::SetDeviceLostCallback(CallbackMode callbackMode, L callback) {
|
|
8451
|
-
assert(deviceLostCallbackInfo.callback == nullptr);
|
|
8452
|
-
using F = DeviceLostCallback<void>;
|
|
8453
|
-
|
|
8454
|
-
deviceLostCallbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8455
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
8456
|
-
deviceLostCallbackInfo.callback = [](WGPUDevice const * device, WGPUDeviceLostReason reason, WGPUStringView message, void* callback_param, void*) {
|
|
8457
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
8458
|
-
// We manually acquire and release the device to avoid changing any ref counts.
|
|
8459
|
-
auto apiDevice = Device::Acquire(*device);
|
|
8460
|
-
(*cb)(apiDevice, static_cast<DeviceLostReason>(reason), message);
|
|
8461
|
-
apiDevice.MoveToCHandle();
|
|
8462
|
-
};
|
|
8463
|
-
deviceLostCallbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8464
|
-
deviceLostCallbackInfo.userdata2 = nullptr;
|
|
8465
|
-
} else {
|
|
8466
|
-
auto* lambda = new L(std::move(callback));
|
|
8467
|
-
deviceLostCallbackInfo.callback = [](WGPUDevice const * device, WGPUDeviceLostReason reason, WGPUStringView message, void* callback_param, void*) {
|
|
8468
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
8469
|
-
// We manually acquire and release the device to avoid changing any ref counts.
|
|
8470
|
-
auto apiDevice = Device::Acquire(*device);
|
|
8471
|
-
(*the_lambda)(apiDevice, static_cast<DeviceLostReason>(reason), message);
|
|
8472
|
-
apiDevice.MoveToCHandle();
|
|
8473
|
-
};
|
|
8474
|
-
deviceLostCallbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8475
|
-
deviceLostCallbackInfo.userdata2 = nullptr;
|
|
8476
|
-
}
|
|
8477
|
-
}
|
|
8478
|
-
|
|
8479
|
-
template <typename F, typename T, typename Cb, typename>
|
|
8480
|
-
void DeviceDescriptor::SetUncapturedErrorCallback(F callback, T userdata) {
|
|
8481
|
-
assert(uncapturedErrorCallbackInfo.callback == nullptr);
|
|
8482
|
-
|
|
8483
|
-
uncapturedErrorCallbackInfo.callback = [](WGPUDevice const * device, WGPUErrorType type, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8484
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
8485
|
-
// We manually acquire and release the device to avoid changing any ref counts.
|
|
8486
|
-
auto apiDevice = Device::Acquire(*device);
|
|
8487
|
-
(*cb)(apiDevice, static_cast<ErrorType>(type), message, static_cast<T>(userdata_param));
|
|
8488
|
-
apiDevice.MoveToCHandle();
|
|
8489
|
-
};
|
|
8490
|
-
uncapturedErrorCallbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8491
|
-
uncapturedErrorCallbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8492
|
-
}
|
|
8493
|
-
|
|
8494
|
-
template <typename L, typename Cb, typename>
|
|
8495
|
-
void DeviceDescriptor::SetUncapturedErrorCallback(L callback) {
|
|
8496
|
-
assert(uncapturedErrorCallbackInfo.callback == nullptr);
|
|
8497
|
-
using F = UncapturedErrorCallback<void>;
|
|
8498
|
-
static_assert(std::is_convertible_v<L, F*>, "Uncaptured error callback cannot be a binding lambda");
|
|
8499
|
-
|
|
8500
|
-
uncapturedErrorCallbackInfo.callback = [](WGPUDevice const * device, WGPUErrorType type, WGPUStringView message, void* callback_param, void*) {
|
|
8501
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
8502
|
-
// We manually acquire and release the device to avoid changing any ref counts.
|
|
8503
|
-
auto apiDevice = Device::Acquire(*device);
|
|
8504
|
-
(*cb)(apiDevice, static_cast<ErrorType>(type), message);
|
|
8505
|
-
apiDevice.MoveToCHandle();
|
|
8506
|
-
};
|
|
8507
|
-
uncapturedErrorCallbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8508
|
-
uncapturedErrorCallbackInfo.userdata2 = nullptr;
|
|
8509
|
-
}
|
|
8510
8653
|
|
|
8511
8654
|
#if defined(__GNUC__) || defined(__clang__)
|
|
8512
8655
|
#pragma GCC diagnostic pop
|
|
@@ -8543,66 +8686,23 @@ Bool Adapter::HasFeature(FeatureName feature) const {
|
|
|
8543
8686
|
auto result = wgpuAdapterHasFeature(Get(), static_cast<WGPUFeatureName>(feature));
|
|
8544
8687
|
return result;
|
|
8545
8688
|
}
|
|
8546
|
-
template <typename F, typename T
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
typename>
|
|
8550
|
-
Future Adapter::RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const {
|
|
8551
|
-
WGPURequestDeviceCallbackInfo callbackInfo = {};
|
|
8689
|
+
template <typename F, typename T>
|
|
8690
|
+
Future Adapter::RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode, F callback, T userdata) const {
|
|
8691
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPURequestDeviceCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
8552
8692
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8553
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
8554
|
-
callbackInfo.callback = [](WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8555
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
8556
|
-
(*cb)(static_cast<RequestDeviceStatus>(status), Device::Acquire(device), StringView {
|
|
8557
|
-
message.data,
|
|
8558
|
-
message.length
|
|
8559
|
-
}, static_cast<T>(userdata_param));
|
|
8560
|
-
};
|
|
8561
|
-
} else {
|
|
8562
|
-
callbackInfo.callback = [](WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8563
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
8564
|
-
(*cb)(static_cast<RequestDeviceStatus>(status), Device::Acquire(device), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
8565
|
-
};
|
|
8566
|
-
}
|
|
8567
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8568
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8569
8693
|
auto result = wgpuAdapterRequestDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const *>(descriptor), callbackInfo);
|
|
8570
8694
|
return Future {
|
|
8571
8695
|
result.id
|
|
8572
8696
|
};
|
|
8573
8697
|
}
|
|
8574
|
-
template <typename
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
typename>
|
|
8578
|
-
Future Adapter::RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,L callback) const {
|
|
8579
|
-
using F = RequestDeviceCallback<void>;
|
|
8580
|
-
|
|
8581
|
-
WGPURequestDeviceCallbackInfo callbackInfo = {};
|
|
8698
|
+
template <typename F>
|
|
8699
|
+
Future Adapter::RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode, F callback) const {
|
|
8700
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPURequestDeviceCallbackInfo, F>::Create(std::move(callback));
|
|
8582
8701
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8583
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
8584
|
-
callbackInfo.callback = [](WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, void* callback_param, void*) {
|
|
8585
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
8586
|
-
(*cb)(static_cast<RequestDeviceStatus>(status), Device::Acquire(device), StringView {
|
|
8587
|
-
message.data,
|
|
8588
|
-
message.length
|
|
8589
|
-
});
|
|
8590
|
-
};
|
|
8591
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8592
|
-
callbackInfo.userdata2 = nullptr;
|
|
8593
|
-
} else {
|
|
8594
|
-
auto* lambda = new L(std::move(callback));
|
|
8595
|
-
callbackInfo.callback = [](WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, void* callback_param, void*) {
|
|
8596
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
8597
|
-
(*the_lambda)(static_cast<RequestDeviceStatus>(status), Device::Acquire(device), {detail::StringViewAdapter(message)});
|
|
8598
|
-
};
|
|
8599
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8600
|
-
callbackInfo.userdata2 = nullptr;
|
|
8601
|
-
}
|
|
8602
8702
|
auto result = wgpuAdapterRequestDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const *>(descriptor), callbackInfo);
|
|
8603
8703
|
return Future {
|
|
8604
|
-
|
|
8605
|
-
|
|
8704
|
+
result.id
|
|
8705
|
+
};
|
|
8606
8706
|
}
|
|
8607
8707
|
|
|
8608
8708
|
|
|
@@ -8688,66 +8788,23 @@ BufferUsage Buffer::GetUsage() const {
|
|
|
8688
8788
|
auto result = wgpuBufferGetUsage(Get());
|
|
8689
8789
|
return static_cast<BufferUsage>(result);
|
|
8690
8790
|
}
|
|
8691
|
-
template <typename F, typename T
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
typename>
|
|
8695
|
-
Future Buffer::MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode,F callback, T userdata) const {
|
|
8696
|
-
WGPUBufferMapCallbackInfo callbackInfo = {};
|
|
8791
|
+
template <typename F, typename T>
|
|
8792
|
+
Future Buffer::MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode, F callback, T userdata) const {
|
|
8793
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUBufferMapCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
8697
8794
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8698
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
8699
|
-
callbackInfo.callback = [](WGPUMapAsyncStatus status, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8700
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
8701
|
-
(*cb)(static_cast<MapAsyncStatus>(status), StringView {
|
|
8702
|
-
message.data,
|
|
8703
|
-
message.length
|
|
8704
|
-
}, static_cast<T>(userdata_param));
|
|
8705
|
-
};
|
|
8706
|
-
} else {
|
|
8707
|
-
callbackInfo.callback = [](WGPUMapAsyncStatus status, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8708
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
8709
|
-
(*cb)(static_cast<MapAsyncStatus>(status), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
8710
|
-
};
|
|
8711
|
-
}
|
|
8712
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8713
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8714
8795
|
auto result = wgpuBufferMapAsync(Get(), static_cast<WGPUMapMode>(mode), offset, size, callbackInfo);
|
|
8715
8796
|
return Future {
|
|
8716
8797
|
result.id
|
|
8717
8798
|
};
|
|
8718
8799
|
}
|
|
8719
|
-
template <typename
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
typename>
|
|
8723
|
-
Future Buffer::MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode,L callback) const {
|
|
8724
|
-
using F = BufferMapCallback<void>;
|
|
8725
|
-
|
|
8726
|
-
WGPUBufferMapCallbackInfo callbackInfo = {};
|
|
8800
|
+
template <typename F>
|
|
8801
|
+
Future Buffer::MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode callbackMode, F callback) const {
|
|
8802
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUBufferMapCallbackInfo, F>::Create(std::move(callback));
|
|
8727
8803
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8728
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
8729
|
-
callbackInfo.callback = [](WGPUMapAsyncStatus status, WGPUStringView message, void* callback_param, void*) {
|
|
8730
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
8731
|
-
(*cb)(static_cast<MapAsyncStatus>(status), StringView {
|
|
8732
|
-
message.data,
|
|
8733
|
-
message.length
|
|
8734
|
-
});
|
|
8735
|
-
};
|
|
8736
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8737
|
-
callbackInfo.userdata2 = nullptr;
|
|
8738
|
-
} else {
|
|
8739
|
-
auto* lambda = new L(std::move(callback));
|
|
8740
|
-
callbackInfo.callback = [](WGPUMapAsyncStatus status, WGPUStringView message, void* callback_param, void*) {
|
|
8741
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
8742
|
-
(*the_lambda)(static_cast<MapAsyncStatus>(status), {detail::StringViewAdapter(message)});
|
|
8743
|
-
};
|
|
8744
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8745
|
-
callbackInfo.userdata2 = nullptr;
|
|
8746
|
-
}
|
|
8747
8804
|
auto result = wgpuBufferMapAsync(Get(), static_cast<WGPUMapMode>(mode), offset, size, callbackInfo);
|
|
8748
8805
|
return Future {
|
|
8749
|
-
|
|
8750
|
-
|
|
8806
|
+
result.id
|
|
8807
|
+
};
|
|
8751
8808
|
}
|
|
8752
8809
|
ConvertibleStatus Buffer::ReadMappedRange(size_t offset, void * data, size_t size) const {
|
|
8753
8810
|
auto result = wgpuBufferReadMappedRange(Get(), offset, reinterpret_cast<void *>(data), size);
|
|
@@ -8912,66 +8969,23 @@ ComputePipeline Device::CreateComputePipeline(ComputePipelineDescriptor const *
|
|
|
8912
8969
|
auto result = wgpuDeviceCreateComputePipeline(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const *>(descriptor));
|
|
8913
8970
|
return ComputePipeline::Acquire(result);
|
|
8914
8971
|
}
|
|
8915
|
-
template <typename F, typename T
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
typename>
|
|
8919
|
-
Future Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const {
|
|
8920
|
-
WGPUCreateComputePipelineAsyncCallbackInfo callbackInfo = {};
|
|
8972
|
+
template <typename F, typename T>
|
|
8973
|
+
Future Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback, T userdata) const {
|
|
8974
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUCreateComputePipelineAsyncCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
8921
8975
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8922
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
8923
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8924
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
8925
|
-
(*cb)(static_cast<CreatePipelineAsyncStatus>(status), ComputePipeline::Acquire(pipeline), StringView {
|
|
8926
|
-
message.data,
|
|
8927
|
-
message.length
|
|
8928
|
-
}, static_cast<T>(userdata_param));
|
|
8929
|
-
};
|
|
8930
|
-
} else {
|
|
8931
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8932
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
8933
|
-
(*cb)(static_cast<CreatePipelineAsyncStatus>(status), ComputePipeline::Acquire(pipeline), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
8934
|
-
};
|
|
8935
|
-
}
|
|
8936
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8937
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8938
8976
|
auto result = wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const *>(descriptor), callbackInfo);
|
|
8939
8977
|
return Future {
|
|
8940
8978
|
result.id
|
|
8941
8979
|
};
|
|
8942
8980
|
}
|
|
8943
|
-
template <typename
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
typename>
|
|
8947
|
-
Future Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode,L callback) const {
|
|
8948
|
-
using F = CreateComputePipelineAsyncCallback<void>;
|
|
8949
|
-
|
|
8950
|
-
WGPUCreateComputePipelineAsyncCallbackInfo callbackInfo = {};
|
|
8981
|
+
template <typename F>
|
|
8982
|
+
Future Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback) const {
|
|
8983
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUCreateComputePipelineAsyncCallbackInfo, F>::Create(std::move(callback));
|
|
8951
8984
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8952
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
8953
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, void* callback_param, void*) {
|
|
8954
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
8955
|
-
(*cb)(static_cast<CreatePipelineAsyncStatus>(status), ComputePipeline::Acquire(pipeline), StringView {
|
|
8956
|
-
message.data,
|
|
8957
|
-
message.length
|
|
8958
|
-
});
|
|
8959
|
-
};
|
|
8960
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8961
|
-
callbackInfo.userdata2 = nullptr;
|
|
8962
|
-
} else {
|
|
8963
|
-
auto* lambda = new L(std::move(callback));
|
|
8964
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, void* callback_param, void*) {
|
|
8965
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
8966
|
-
(*the_lambda)(static_cast<CreatePipelineAsyncStatus>(status), ComputePipeline::Acquire(pipeline), {detail::StringViewAdapter(message)});
|
|
8967
|
-
};
|
|
8968
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8969
|
-
callbackInfo.userdata2 = nullptr;
|
|
8970
|
-
}
|
|
8971
8985
|
auto result = wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const *>(descriptor), callbackInfo);
|
|
8972
8986
|
return Future {
|
|
8973
|
-
|
|
8974
|
-
|
|
8987
|
+
result.id
|
|
8988
|
+
};
|
|
8975
8989
|
}
|
|
8976
8990
|
Buffer Device::CreateErrorBuffer(BufferDescriptor const * descriptor) const {
|
|
8977
8991
|
auto result = wgpuDeviceCreateErrorBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const *>(descriptor));
|
|
@@ -9009,66 +9023,23 @@ RenderPipeline Device::CreateRenderPipeline(RenderPipelineDescriptor const * des
|
|
|
9009
9023
|
auto result = wgpuDeviceCreateRenderPipeline(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const *>(descriptor));
|
|
9010
9024
|
return RenderPipeline::Acquire(result);
|
|
9011
9025
|
}
|
|
9012
|
-
template <typename F, typename T
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
typename>
|
|
9016
|
-
Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const {
|
|
9017
|
-
WGPUCreateRenderPipelineAsyncCallbackInfo callbackInfo = {};
|
|
9026
|
+
template <typename F, typename T>
|
|
9027
|
+
Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback, T userdata) const {
|
|
9028
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUCreateRenderPipelineAsyncCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
9018
9029
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9019
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
9020
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9021
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
9022
|
-
(*cb)(static_cast<CreatePipelineAsyncStatus>(status), RenderPipeline::Acquire(pipeline), StringView {
|
|
9023
|
-
message.data,
|
|
9024
|
-
message.length
|
|
9025
|
-
}, static_cast<T>(userdata_param));
|
|
9026
|
-
};
|
|
9027
|
-
} else {
|
|
9028
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9029
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
9030
|
-
(*cb)(static_cast<CreatePipelineAsyncStatus>(status), RenderPipeline::Acquire(pipeline), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
9031
|
-
};
|
|
9032
|
-
}
|
|
9033
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9034
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
9035
9030
|
auto result = wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const *>(descriptor), callbackInfo);
|
|
9036
9031
|
return Future {
|
|
9037
9032
|
result.id
|
|
9038
9033
|
};
|
|
9039
9034
|
}
|
|
9040
|
-
template <typename
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
typename>
|
|
9044
|
-
Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode,L callback) const {
|
|
9045
|
-
using F = CreateRenderPipelineAsyncCallback<void>;
|
|
9046
|
-
|
|
9047
|
-
WGPUCreateRenderPipelineAsyncCallbackInfo callbackInfo = {};
|
|
9035
|
+
template <typename F>
|
|
9036
|
+
Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode, F callback) const {
|
|
9037
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUCreateRenderPipelineAsyncCallbackInfo, F>::Create(std::move(callback));
|
|
9048
9038
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9049
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
9050
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, void* callback_param, void*) {
|
|
9051
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
9052
|
-
(*cb)(static_cast<CreatePipelineAsyncStatus>(status), RenderPipeline::Acquire(pipeline), StringView {
|
|
9053
|
-
message.data,
|
|
9054
|
-
message.length
|
|
9055
|
-
});
|
|
9056
|
-
};
|
|
9057
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9058
|
-
callbackInfo.userdata2 = nullptr;
|
|
9059
|
-
} else {
|
|
9060
|
-
auto* lambda = new L(std::move(callback));
|
|
9061
|
-
callbackInfo.callback = [](WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, void* callback_param, void*) {
|
|
9062
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
9063
|
-
(*the_lambda)(static_cast<CreatePipelineAsyncStatus>(status), RenderPipeline::Acquire(pipeline), {detail::StringViewAdapter(message)});
|
|
9064
|
-
};
|
|
9065
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
9066
|
-
callbackInfo.userdata2 = nullptr;
|
|
9067
|
-
}
|
|
9068
9039
|
auto result = wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const *>(descriptor), callbackInfo);
|
|
9069
9040
|
return Future {
|
|
9070
|
-
|
|
9071
|
-
|
|
9041
|
+
result.id
|
|
9042
|
+
};
|
|
9072
9043
|
}
|
|
9073
9044
|
ResourceTable Device::CreateResourceTable(ResourceTableDescriptor const * descriptor) const {
|
|
9074
9045
|
auto result = wgpuDeviceCreateResourceTable(Get(), reinterpret_cast<WGPUResourceTableDescriptor const *>(descriptor));
|
|
@@ -9142,66 +9113,23 @@ SharedTextureMemory Device::ImportSharedTextureMemory(SharedTextureMemoryDescrip
|
|
|
9142
9113
|
void Device::InjectError(ErrorType type, StringView message) const {
|
|
9143
9114
|
wgpuDeviceInjectError(Get(), static_cast<WGPUErrorType>(type), *reinterpret_cast<WGPUStringView const*>(&message));
|
|
9144
9115
|
}
|
|
9145
|
-
template <typename F, typename T
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
typename>
|
|
9149
|
-
Future Device::PopErrorScope(CallbackMode callbackMode,F callback, T userdata) const {
|
|
9150
|
-
WGPUPopErrorScopeCallbackInfo callbackInfo = {};
|
|
9116
|
+
template <typename F, typename T>
|
|
9117
|
+
Future Device::PopErrorScope(CallbackMode callbackMode, F callback, T userdata) const {
|
|
9118
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUPopErrorScopeCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
9151
9119
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9152
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
9153
|
-
callbackInfo.callback = [](WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9154
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
9155
|
-
(*cb)(static_cast<PopErrorScopeStatus>(status), static_cast<ErrorType>(type), StringView {
|
|
9156
|
-
message.data,
|
|
9157
|
-
message.length
|
|
9158
|
-
}, static_cast<T>(userdata_param));
|
|
9159
|
-
};
|
|
9160
|
-
} else {
|
|
9161
|
-
callbackInfo.callback = [](WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9162
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
9163
|
-
(*cb)(static_cast<PopErrorScopeStatus>(status), static_cast<ErrorType>(type), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
9164
|
-
};
|
|
9165
|
-
}
|
|
9166
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9167
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
9168
9120
|
auto result = wgpuDevicePopErrorScope(Get(), callbackInfo);
|
|
9169
9121
|
return Future {
|
|
9170
9122
|
result.id
|
|
9171
9123
|
};
|
|
9172
9124
|
}
|
|
9173
|
-
template <typename
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
typename>
|
|
9177
|
-
Future Device::PopErrorScope(CallbackMode callbackMode,L callback) const {
|
|
9178
|
-
using F = PopErrorScopeCallback<void>;
|
|
9179
|
-
|
|
9180
|
-
WGPUPopErrorScopeCallbackInfo callbackInfo = {};
|
|
9125
|
+
template <typename F>
|
|
9126
|
+
Future Device::PopErrorScope(CallbackMode callbackMode, F callback) const {
|
|
9127
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUPopErrorScopeCallbackInfo, F>::Create(std::move(callback));
|
|
9181
9128
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9182
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
9183
|
-
callbackInfo.callback = [](WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, void* callback_param, void*) {
|
|
9184
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
9185
|
-
(*cb)(static_cast<PopErrorScopeStatus>(status), static_cast<ErrorType>(type), StringView {
|
|
9186
|
-
message.data,
|
|
9187
|
-
message.length
|
|
9188
|
-
});
|
|
9189
|
-
};
|
|
9190
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9191
|
-
callbackInfo.userdata2 = nullptr;
|
|
9192
|
-
} else {
|
|
9193
|
-
auto* lambda = new L(std::move(callback));
|
|
9194
|
-
callbackInfo.callback = [](WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, void* callback_param, void*) {
|
|
9195
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
9196
|
-
(*the_lambda)(static_cast<PopErrorScopeStatus>(status), static_cast<ErrorType>(type), {detail::StringViewAdapter(message)});
|
|
9197
|
-
};
|
|
9198
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
9199
|
-
callbackInfo.userdata2 = nullptr;
|
|
9200
|
-
}
|
|
9201
9129
|
auto result = wgpuDevicePopErrorScope(Get(), callbackInfo);
|
|
9202
9130
|
return Future {
|
|
9203
|
-
|
|
9204
|
-
|
|
9131
|
+
result.id
|
|
9132
|
+
};
|
|
9205
9133
|
}
|
|
9206
9134
|
void Device::PushErrorScope(ErrorFilter filter) const {
|
|
9207
9135
|
wgpuDevicePushErrorScope(Get(), static_cast<WGPUErrorFilter>(filter));
|
|
@@ -9209,57 +9137,14 @@ void Device::PushErrorScope(ErrorFilter filter) const {
|
|
|
9209
9137
|
void Device::SetLabel(StringView label) const {
|
|
9210
9138
|
wgpuDeviceSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
9211
9139
|
}
|
|
9212
|
-
template <typename F, typename T
|
|
9213
|
-
typename Cb,
|
|
9214
|
-
typename CbChar,
|
|
9215
|
-
typename>
|
|
9140
|
+
template <typename F, typename T>
|
|
9216
9141
|
void Device::SetLoggingCallback(F callback, T userdata) const {
|
|
9217
|
-
|
|
9218
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
9219
|
-
callbackInfo.callback = [](WGPULoggingType type, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9220
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
9221
|
-
(*cb)(static_cast<LoggingType>(type), StringView {
|
|
9222
|
-
message.data,
|
|
9223
|
-
message.length
|
|
9224
|
-
}, static_cast<T>(userdata_param));
|
|
9225
|
-
};
|
|
9226
|
-
} else {
|
|
9227
|
-
callbackInfo.callback = [](WGPULoggingType type, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9228
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
9229
|
-
(*cb)(static_cast<LoggingType>(type), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
9230
|
-
};
|
|
9231
|
-
}
|
|
9232
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9233
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
9142
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPULoggingCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
9234
9143
|
return wgpuDeviceSetLoggingCallback(Get(), callbackInfo);
|
|
9235
9144
|
}
|
|
9236
|
-
template <typename
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
typename>
|
|
9240
|
-
void Device::SetLoggingCallback(L callback) const {
|
|
9241
|
-
using F = LoggingCallback<void>;
|
|
9242
|
-
|
|
9243
|
-
WGPULoggingCallbackInfo callbackInfo = {};
|
|
9244
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
9245
|
-
callbackInfo.callback = [](WGPULoggingType type, WGPUStringView message, void* callback_param, void*) {
|
|
9246
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
9247
|
-
(*cb)(static_cast<LoggingType>(type), StringView {
|
|
9248
|
-
message.data,
|
|
9249
|
-
message.length
|
|
9250
|
-
});
|
|
9251
|
-
};
|
|
9252
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9253
|
-
callbackInfo.userdata2 = nullptr;
|
|
9254
|
-
} else {
|
|
9255
|
-
auto* lambda = new L(std::move(callback));
|
|
9256
|
-
callbackInfo.callback = [](WGPULoggingType type, WGPUStringView message, void* callback_param, void*) {
|
|
9257
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
9258
|
-
(*the_lambda)(static_cast<LoggingType>(type), {detail::StringViewAdapter(message)});
|
|
9259
|
-
};
|
|
9260
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
9261
|
-
callbackInfo.userdata2 = nullptr;
|
|
9262
|
-
}
|
|
9145
|
+
template <typename F>
|
|
9146
|
+
void Device::SetLoggingCallback(F callback) const {
|
|
9147
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPULoggingCallbackInfo, F>::Create(std::move(callback));
|
|
9263
9148
|
return wgpuDeviceSetLoggingCallback(Get(), callbackInfo);
|
|
9264
9149
|
}
|
|
9265
9150
|
void Device::Tick() const {
|
|
@@ -9329,66 +9214,23 @@ Bool Instance::HasWGSLLanguageFeature(WGSLLanguageFeatureName feature) const {
|
|
|
9329
9214
|
void Instance::ProcessEvents() const {
|
|
9330
9215
|
wgpuInstanceProcessEvents(Get());
|
|
9331
9216
|
}
|
|
9332
|
-
template <typename F, typename T
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
typename>
|
|
9336
|
-
Future Instance::RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode,F callback, T userdata) const {
|
|
9337
|
-
WGPURequestAdapterCallbackInfo callbackInfo = {};
|
|
9217
|
+
template <typename F, typename T>
|
|
9218
|
+
Future Instance::RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode, F callback, T userdata) const {
|
|
9219
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPURequestAdapterCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
9338
9220
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9339
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
9340
|
-
callbackInfo.callback = [](WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9341
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
9342
|
-
(*cb)(static_cast<RequestAdapterStatus>(status), Adapter::Acquire(adapter), StringView {
|
|
9343
|
-
message.data,
|
|
9344
|
-
message.length
|
|
9345
|
-
}, static_cast<T>(userdata_param));
|
|
9346
|
-
};
|
|
9347
|
-
} else {
|
|
9348
|
-
callbackInfo.callback = [](WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9349
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
9350
|
-
(*cb)(static_cast<RequestAdapterStatus>(status), Adapter::Acquire(adapter), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
9351
|
-
};
|
|
9352
|
-
}
|
|
9353
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9354
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
9355
9221
|
auto result = wgpuInstanceRequestAdapter(Get(), reinterpret_cast<WGPURequestAdapterOptions const *>(options), callbackInfo);
|
|
9356
9222
|
return Future {
|
|
9357
9223
|
result.id
|
|
9358
9224
|
};
|
|
9359
9225
|
}
|
|
9360
|
-
template <typename
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
typename>
|
|
9364
|
-
Future Instance::RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode,L callback) const {
|
|
9365
|
-
using F = RequestAdapterCallback<void>;
|
|
9366
|
-
|
|
9367
|
-
WGPURequestAdapterCallbackInfo callbackInfo = {};
|
|
9226
|
+
template <typename F>
|
|
9227
|
+
Future Instance::RequestAdapter(RequestAdapterOptions const * options, CallbackMode callbackMode, F callback) const {
|
|
9228
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPURequestAdapterCallbackInfo, F>::Create(std::move(callback));
|
|
9368
9229
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9369
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
9370
|
-
callbackInfo.callback = [](WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, void* callback_param, void*) {
|
|
9371
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
9372
|
-
(*cb)(static_cast<RequestAdapterStatus>(status), Adapter::Acquire(adapter), StringView {
|
|
9373
|
-
message.data,
|
|
9374
|
-
message.length
|
|
9375
|
-
});
|
|
9376
|
-
};
|
|
9377
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9378
|
-
callbackInfo.userdata2 = nullptr;
|
|
9379
|
-
} else {
|
|
9380
|
-
auto* lambda = new L(std::move(callback));
|
|
9381
|
-
callbackInfo.callback = [](WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, void* callback_param, void*) {
|
|
9382
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
9383
|
-
(*the_lambda)(static_cast<RequestAdapterStatus>(status), Adapter::Acquire(adapter), {detail::StringViewAdapter(message)});
|
|
9384
|
-
};
|
|
9385
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
9386
|
-
callbackInfo.userdata2 = nullptr;
|
|
9387
|
-
}
|
|
9388
9230
|
auto result = wgpuInstanceRequestAdapter(Get(), reinterpret_cast<WGPURequestAdapterOptions const *>(options), callbackInfo);
|
|
9389
9231
|
return Future {
|
|
9390
|
-
|
|
9391
|
-
|
|
9232
|
+
result.id
|
|
9233
|
+
};
|
|
9392
9234
|
}
|
|
9393
9235
|
WaitStatus Instance::WaitAny(size_t futureCount, FutureWaitInfo * futures, uint64_t timeoutNS) const {
|
|
9394
9236
|
auto result = wgpuInstanceWaitAny(Get(), futureCount, reinterpret_cast<WGPUFutureWaitInfo *>(futures), timeoutNS);
|
|
@@ -9472,66 +9314,23 @@ void Queue::CopyExternalTextureForBrowser(ImageCopyExternalTexture const * sourc
|
|
|
9472
9314
|
void Queue::CopyTextureForBrowser(TexelCopyTextureInfo const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize, CopyTextureForBrowserOptions const * options) const {
|
|
9473
9315
|
wgpuQueueCopyTextureForBrowser(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(source), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(destination), reinterpret_cast<WGPUExtent3D const *>(copySize), reinterpret_cast<WGPUCopyTextureForBrowserOptions const *>(options));
|
|
9474
9316
|
}
|
|
9475
|
-
template <typename F, typename T
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
typename>
|
|
9479
|
-
Future Queue::OnSubmittedWorkDone(CallbackMode callbackMode,F callback, T userdata) const {
|
|
9480
|
-
WGPUQueueWorkDoneCallbackInfo callbackInfo = {};
|
|
9317
|
+
template <typename F, typename T>
|
|
9318
|
+
Future Queue::OnSubmittedWorkDone(CallbackMode callbackMode, F callback, T userdata) const {
|
|
9319
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUQueueWorkDoneCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
9481
9320
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9482
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
9483
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9484
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
9485
|
-
(*cb)(static_cast<QueueWorkDoneStatus>(status), StringView {
|
|
9486
|
-
message.data,
|
|
9487
|
-
message.length
|
|
9488
|
-
}, static_cast<T>(userdata_param));
|
|
9489
|
-
};
|
|
9490
|
-
} else {
|
|
9491
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
9492
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
9493
|
-
(*cb)(static_cast<QueueWorkDoneStatus>(status), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
9494
|
-
};
|
|
9495
|
-
}
|
|
9496
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9497
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
9498
9321
|
auto result = wgpuQueueOnSubmittedWorkDone(Get(), callbackInfo);
|
|
9499
9322
|
return Future {
|
|
9500
9323
|
result.id
|
|
9501
9324
|
};
|
|
9502
9325
|
}
|
|
9503
|
-
template <typename
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
typename>
|
|
9507
|
-
Future Queue::OnSubmittedWorkDone(CallbackMode callbackMode,L callback) const {
|
|
9508
|
-
using F = QueueWorkDoneCallback<void>;
|
|
9509
|
-
|
|
9510
|
-
WGPUQueueWorkDoneCallbackInfo callbackInfo = {};
|
|
9326
|
+
template <typename F>
|
|
9327
|
+
Future Queue::OnSubmittedWorkDone(CallbackMode callbackMode, F callback) const {
|
|
9328
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUQueueWorkDoneCallbackInfo, F>::Create(std::move(callback));
|
|
9511
9329
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9512
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
9513
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void*) {
|
|
9514
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
9515
|
-
(*cb)(static_cast<QueueWorkDoneStatus>(status), StringView {
|
|
9516
|
-
message.data,
|
|
9517
|
-
message.length
|
|
9518
|
-
});
|
|
9519
|
-
};
|
|
9520
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9521
|
-
callbackInfo.userdata2 = nullptr;
|
|
9522
|
-
} else {
|
|
9523
|
-
auto* lambda = new L(std::move(callback));
|
|
9524
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void*) {
|
|
9525
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
9526
|
-
(*the_lambda)(static_cast<QueueWorkDoneStatus>(status), {detail::StringViewAdapter(message)});
|
|
9527
|
-
};
|
|
9528
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
9529
|
-
callbackInfo.userdata2 = nullptr;
|
|
9530
|
-
}
|
|
9531
9330
|
auto result = wgpuQueueOnSubmittedWorkDone(Get(), callbackInfo);
|
|
9532
9331
|
return Future {
|
|
9533
|
-
|
|
9534
|
-
|
|
9332
|
+
result.id
|
|
9333
|
+
};
|
|
9535
9334
|
}
|
|
9536
9335
|
void Queue::SetLabel(StringView label) const {
|
|
9537
9336
|
wgpuQueueSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
@@ -9621,6 +9420,9 @@ ConvertibleStatus ResourceTable::RemoveBinding(uint32_t slot) const {
|
|
|
9621
9420
|
auto result = wgpuResourceTableRemoveBinding(Get(), slot);
|
|
9622
9421
|
return static_cast<Status>(result);
|
|
9623
9422
|
}
|
|
9423
|
+
void ResourceTable::SetLabel(StringView label) const {
|
|
9424
|
+
wgpuResourceTableSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
9425
|
+
}
|
|
9624
9426
|
ConvertibleStatus ResourceTable::Update(uint32_t slot, BindingResource const * resource) const {
|
|
9625
9427
|
auto result = wgpuResourceTableUpdate(Get(), slot, reinterpret_cast<WGPUBindingResource const *>(resource));
|
|
9626
9428
|
return static_cast<Status>(result);
|
|
@@ -9662,60 +9464,23 @@ static_assert(alignof(Sampler) == alignof(WGPUSampler), "alignof mismatch for Sa
|
|
|
9662
9464
|
|
|
9663
9465
|
// ShaderModule implementation
|
|
9664
9466
|
|
|
9665
|
-
template <typename F, typename T
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
typename>
|
|
9669
|
-
Future ShaderModule::GetCompilationInfo(CallbackMode callbackMode,F callback, T userdata) const {
|
|
9670
|
-
WGPUCompilationInfoCallbackInfo callbackInfo = {};
|
|
9467
|
+
template <typename F, typename T>
|
|
9468
|
+
Future ShaderModule::GetCompilationInfo(CallbackMode callbackMode, F callback, T userdata) const {
|
|
9469
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUCompilationInfoCallbackInfo, F>::Create(std::move(callback), userdata);
|
|
9671
9470
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9672
|
-
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
9673
|
-
callbackInfo.callback = [](WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo, void* callback_param, void* userdata_param) {
|
|
9674
|
-
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
9675
|
-
(*cb)(static_cast<CompilationInfoRequestStatus>(status), reinterpret_cast<CompilationInfo const*>(compilationInfo), static_cast<T>(userdata_param));
|
|
9676
|
-
};
|
|
9677
|
-
} else {
|
|
9678
|
-
callbackInfo.callback = [](WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo, void* callback_param, void* userdata_param) {
|
|
9679
|
-
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
9680
|
-
(*cb)(static_cast<CompilationInfoRequestStatus>(status), reinterpret_cast<CompilationInfo const*>(compilationInfo), static_cast<T>(userdata_param));
|
|
9681
|
-
};
|
|
9682
|
-
}
|
|
9683
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9684
|
-
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
9685
9471
|
auto result = wgpuShaderModuleGetCompilationInfo(Get(), callbackInfo);
|
|
9686
9472
|
return Future {
|
|
9687
9473
|
result.id
|
|
9688
9474
|
};
|
|
9689
9475
|
}
|
|
9690
|
-
template <typename
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
typename>
|
|
9694
|
-
Future ShaderModule::GetCompilationInfo(CallbackMode callbackMode,L callback) const {
|
|
9695
|
-
using F = CompilationInfoCallback<void>;
|
|
9696
|
-
|
|
9697
|
-
WGPUCompilationInfoCallbackInfo callbackInfo = {};
|
|
9476
|
+
template <typename F>
|
|
9477
|
+
Future ShaderModule::GetCompilationInfo(CallbackMode callbackMode, F callback) const {
|
|
9478
|
+
auto callbackInfo = detail::CallbackInfoHelper<WGPUCompilationInfoCallbackInfo, F>::Create(std::move(callback));
|
|
9698
9479
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
9699
|
-
if constexpr (std::is_convertible_v<L, F*>) {
|
|
9700
|
-
callbackInfo.callback = [](WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo, void* callback_param, void*) {
|
|
9701
|
-
auto cb = reinterpret_cast<F*>(callback_param);
|
|
9702
|
-
(*cb)(static_cast<CompilationInfoRequestStatus>(status), reinterpret_cast<CompilationInfo const*>(compilationInfo));
|
|
9703
|
-
};
|
|
9704
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
9705
|
-
callbackInfo.userdata2 = nullptr;
|
|
9706
|
-
} else {
|
|
9707
|
-
auto* lambda = new L(std::move(callback));
|
|
9708
|
-
callbackInfo.callback = [](WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo, void* callback_param, void*) {
|
|
9709
|
-
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
9710
|
-
(*the_lambda)(static_cast<CompilationInfoRequestStatus>(status), reinterpret_cast<CompilationInfo const*>(compilationInfo));
|
|
9711
|
-
};
|
|
9712
|
-
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
9713
|
-
callbackInfo.userdata2 = nullptr;
|
|
9714
|
-
}
|
|
9715
9480
|
auto result = wgpuShaderModuleGetCompilationInfo(Get(), callbackInfo);
|
|
9716
9481
|
return Future {
|
|
9717
|
-
|
|
9718
|
-
|
|
9482
|
+
result.id
|
|
9483
|
+
};
|
|
9719
9484
|
}
|
|
9720
9485
|
void ShaderModule::SetLabel(StringView label) const {
|
|
9721
9486
|
wgpuShaderModuleSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|