react-native-wgpu 0.2.0 → 0.2.2
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/android/CMakeLists.txt +1 -1
- package/android/build.gradle +2 -1
- package/android/src/main/java/com/webgpu/WebGPUAHBView.java +247 -45
- package/android/src/main/java/com/webgpu/WebGPUView.java +4 -4
- package/apple/ApplePlatformContext.h +1 -0
- package/apple/RNWGUIKit.h +5 -0
- package/apple/platform/ThreadUtils.cpp +1 -0
- package/cpp/WGPULogger.h +1 -0
- package/cpp/dawn/dawn_proc_table.h +31 -10
- package/cpp/dawn/native/D3D11Backend.h +8 -2
- package/cpp/dawn/native/D3DBackend.h +0 -3
- package/cpp/dawn/native/DawnNative.h +4 -0
- package/cpp/dawn/platform/DawnPlatform.h +2 -1
- package/cpp/dawn/webgpu_cpp_print.h +202 -25
- package/cpp/dawn_logging.cpp +3 -6
- package/cpp/jsi/RNFHybridObject.cpp +2 -1
- package/cpp/jsi/RNFJSIConverter.h +5 -2
- package/cpp/jsi/RNFPromise.cpp +2 -0
- package/cpp/jsi/RNFWorkletRuntimeRegistry.cpp +1 -0
- package/cpp/rnwgpu/SurfaceRegistry.h +1 -0
- package/cpp/rnwgpu/api/GPU.cpp +5 -1
- package/cpp/rnwgpu/api/GPU.h +7 -3
- package/cpp/rnwgpu/api/GPUAdapter.cpp +3 -0
- package/cpp/rnwgpu/api/GPUBuffer.cpp +1 -0
- package/cpp/rnwgpu/api/GPUCanvasContext.cpp +1 -0
- package/cpp/rnwgpu/api/GPUCanvasContext.h +1 -0
- package/cpp/rnwgpu/api/GPUCommandEncoder.cpp +2 -0
- package/cpp/rnwgpu/api/GPUComputePassEncoder.cpp +2 -0
- package/cpp/rnwgpu/api/GPUComputePipeline.cpp +1 -0
- package/cpp/rnwgpu/api/GPUDevice.cpp +3 -0
- package/cpp/rnwgpu/api/GPUDeviceLostInfo.cpp +1 -0
- package/cpp/rnwgpu/api/GPUQueue.cpp +9 -5
- package/cpp/rnwgpu/api/GPURenderBundleEncoder.cpp +3 -0
- package/cpp/rnwgpu/api/GPURenderPassEncoder.cpp +4 -0
- package/cpp/rnwgpu/api/GPUShaderModule.cpp +1 -0
- package/cpp/rnwgpu/api/descriptors/Unions.h +3 -2
- package/cpp/threading/Dispatcher.cpp +2 -1
- package/cpp/threading/ThreadPool.cpp +2 -0
- package/cpp/webgpu/webgpu.h +571 -261
- package/cpp/webgpu/webgpu_cpp.h +871 -313
- package/lib/typescript/src/__tests__/setup.d.ts +0 -1
- package/lib/typescript/src/__tests__/setup.d.ts.map +1 -1
- package/libs/android/arm64-v8a/libwebgpu_dawn.a +0 -0
- package/libs/android/arm64-v8a/libwebgpu_dawn.so +0 -0
- package/libs/android/armeabi-v7a/libwebgpu_dawn.a +0 -0
- package/libs/android/armeabi-v7a/libwebgpu_dawn.so +0 -0
- package/libs/android/x86/libwebgpu_dawn.a +0 -0
- package/libs/android/x86/libwebgpu_dawn.so +0 -0
- package/libs/android/x86_64/libwebgpu_dawn.a +0 -0
- package/libs/android/x86_64/libwebgpu_dawn.so +0 -0
- package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +10 -10
- 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/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
- package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/dawn.json +422 -206
- package/package.json +1 -1
- package/src/__tests__/Constants.spec.ts +2 -4
- package/src/__tests__/Device.spec.ts +42 -24
- package/src/__tests__/GPU.spec.ts +115 -105
- package/src/__tests__/setup.ts +0 -1
package/cpp/webgpu/webgpu_cpp.h
CHANGED
|
@@ -191,6 +191,18 @@ enum class CompilationMessageType : uint32_t {
|
|
|
191
191
|
static_assert(sizeof(CompilationMessageType) == sizeof(WGPUCompilationMessageType), "sizeof mismatch for CompilationMessageType");
|
|
192
192
|
static_assert(alignof(CompilationMessageType) == alignof(WGPUCompilationMessageType), "alignof mismatch for CompilationMessageType");
|
|
193
193
|
|
|
194
|
+
enum class ComponentSwizzle : uint32_t {
|
|
195
|
+
Undefined = WGPUComponentSwizzle_Undefined,
|
|
196
|
+
Zero = WGPUComponentSwizzle_Zero,
|
|
197
|
+
One = WGPUComponentSwizzle_One,
|
|
198
|
+
R = WGPUComponentSwizzle_R,
|
|
199
|
+
G = WGPUComponentSwizzle_G,
|
|
200
|
+
B = WGPUComponentSwizzle_B,
|
|
201
|
+
A = WGPUComponentSwizzle_A,
|
|
202
|
+
};
|
|
203
|
+
static_assert(sizeof(ComponentSwizzle) == sizeof(WGPUComponentSwizzle), "sizeof mismatch for ComponentSwizzle");
|
|
204
|
+
static_assert(alignof(ComponentSwizzle) == alignof(WGPUComponentSwizzle), "alignof mismatch for ComponentSwizzle");
|
|
205
|
+
|
|
194
206
|
enum class CompositeAlphaMode : uint32_t {
|
|
195
207
|
Auto = WGPUCompositeAlphaMode_Auto,
|
|
196
208
|
Opaque = WGPUCompositeAlphaMode_Opaque,
|
|
@@ -228,6 +240,13 @@ enum class DeviceLostReason : uint32_t {
|
|
|
228
240
|
static_assert(sizeof(DeviceLostReason) == sizeof(WGPUDeviceLostReason), "sizeof mismatch for DeviceLostReason");
|
|
229
241
|
static_assert(alignof(DeviceLostReason) == alignof(WGPUDeviceLostReason), "alignof mismatch for DeviceLostReason");
|
|
230
242
|
|
|
243
|
+
enum class DynamicBindingKind : uint32_t {
|
|
244
|
+
Undefined = WGPUDynamicBindingKind_Undefined,
|
|
245
|
+
SampledTexture = WGPUDynamicBindingKind_SampledTexture,
|
|
246
|
+
};
|
|
247
|
+
static_assert(sizeof(DynamicBindingKind) == sizeof(WGPUDynamicBindingKind), "sizeof mismatch for DynamicBindingKind");
|
|
248
|
+
static_assert(alignof(DynamicBindingKind) == alignof(WGPUDynamicBindingKind), "alignof mismatch for DynamicBindingKind");
|
|
249
|
+
|
|
231
250
|
enum class ErrorFilter : uint32_t {
|
|
232
251
|
Validation = WGPUErrorFilter_Validation,
|
|
233
252
|
OutOfMemory = WGPUErrorFilter_OutOfMemory,
|
|
@@ -264,14 +283,15 @@ static_assert(sizeof(FeatureLevel) == sizeof(WGPUFeatureLevel), "sizeof mismatch
|
|
|
264
283
|
static_assert(alignof(FeatureLevel) == alignof(WGPUFeatureLevel), "alignof mismatch for FeatureLevel");
|
|
265
284
|
|
|
266
285
|
enum class FeatureName : uint32_t {
|
|
286
|
+
CoreFeaturesAndLimits = WGPUFeatureName_CoreFeaturesAndLimits,
|
|
267
287
|
DepthClipControl = WGPUFeatureName_DepthClipControl,
|
|
268
288
|
Depth32FloatStencil8 = WGPUFeatureName_Depth32FloatStencil8,
|
|
269
|
-
TimestampQuery = WGPUFeatureName_TimestampQuery,
|
|
270
289
|
TextureCompressionBC = WGPUFeatureName_TextureCompressionBC,
|
|
271
290
|
TextureCompressionBCSliced3D = WGPUFeatureName_TextureCompressionBCSliced3D,
|
|
272
291
|
TextureCompressionETC2 = WGPUFeatureName_TextureCompressionETC2,
|
|
273
292
|
TextureCompressionASTC = WGPUFeatureName_TextureCompressionASTC,
|
|
274
293
|
TextureCompressionASTCSliced3D = WGPUFeatureName_TextureCompressionASTCSliced3D,
|
|
294
|
+
TimestampQuery = WGPUFeatureName_TimestampQuery,
|
|
275
295
|
IndirectFirstInstance = WGPUFeatureName_IndirectFirstInstance,
|
|
276
296
|
ShaderF16 = WGPUFeatureName_ShaderF16,
|
|
277
297
|
RG11B10UfloatRenderable = WGPUFeatureName_RG11B10UfloatRenderable,
|
|
@@ -281,7 +301,9 @@ enum class FeatureName : uint32_t {
|
|
|
281
301
|
ClipDistances = WGPUFeatureName_ClipDistances,
|
|
282
302
|
DualSourceBlending = WGPUFeatureName_DualSourceBlending,
|
|
283
303
|
Subgroups = WGPUFeatureName_Subgroups,
|
|
284
|
-
|
|
304
|
+
TextureFormatsTier1 = WGPUFeatureName_TextureFormatsTier1,
|
|
305
|
+
TextureFormatsTier2 = WGPUFeatureName_TextureFormatsTier2,
|
|
306
|
+
PrimitiveIndex = WGPUFeatureName_PrimitiveIndex,
|
|
285
307
|
DawnInternalUsages = WGPUFeatureName_DawnInternalUsages,
|
|
286
308
|
DawnMultiPlanarFormats = WGPUFeatureName_DawnMultiPlanarFormats,
|
|
287
309
|
DawnNative = WGPUFeatureName_DawnNative,
|
|
@@ -339,6 +361,8 @@ enum class FeatureName : uint32_t {
|
|
|
339
361
|
ChromiumExperimentalSubgroupMatrix = WGPUFeatureName_ChromiumExperimentalSubgroupMatrix,
|
|
340
362
|
SharedFenceEGLSync = WGPUFeatureName_SharedFenceEGLSync,
|
|
341
363
|
DawnDeviceAllocatorControl = WGPUFeatureName_DawnDeviceAllocatorControl,
|
|
364
|
+
TextureComponentSwizzle = WGPUFeatureName_TextureComponentSwizzle,
|
|
365
|
+
ChromiumExperimentalBindless = WGPUFeatureName_ChromiumExperimentalBindless,
|
|
342
366
|
};
|
|
343
367
|
static_assert(sizeof(FeatureName) == sizeof(WGPUFeatureName), "sizeof mismatch for FeatureName");
|
|
344
368
|
static_assert(alignof(FeatureName) == alignof(WGPUFeatureName), "alignof mismatch for FeatureName");
|
|
@@ -367,6 +391,14 @@ enum class IndexFormat : uint32_t {
|
|
|
367
391
|
static_assert(sizeof(IndexFormat) == sizeof(WGPUIndexFormat), "sizeof mismatch for IndexFormat");
|
|
368
392
|
static_assert(alignof(IndexFormat) == alignof(WGPUIndexFormat), "alignof mismatch for IndexFormat");
|
|
369
393
|
|
|
394
|
+
enum class InstanceFeatureName : uint32_t {
|
|
395
|
+
TimedWaitAny = WGPUInstanceFeatureName_TimedWaitAny,
|
|
396
|
+
ShaderSourceSPIRV = WGPUInstanceFeatureName_ShaderSourceSPIRV,
|
|
397
|
+
MultipleDevicesPerAdapter = WGPUInstanceFeatureName_MultipleDevicesPerAdapter,
|
|
398
|
+
};
|
|
399
|
+
static_assert(sizeof(InstanceFeatureName) == sizeof(WGPUInstanceFeatureName), "sizeof mismatch for InstanceFeatureName");
|
|
400
|
+
static_assert(alignof(InstanceFeatureName) == alignof(WGPUInstanceFeatureName), "alignof mismatch for InstanceFeatureName");
|
|
401
|
+
|
|
370
402
|
enum class LoadOp : uint32_t {
|
|
371
403
|
Undefined = WGPULoadOp_Undefined,
|
|
372
404
|
Load = WGPULoadOp_Load,
|
|
@@ -550,7 +582,7 @@ enum class SType : uint32_t {
|
|
|
550
582
|
SurfaceSourceXCBWindow = WGPUSType_SurfaceSourceXCBWindow,
|
|
551
583
|
SurfaceColorManagement = WGPUSType_SurfaceColorManagement,
|
|
552
584
|
RequestAdapterWebXROptions = WGPUSType_RequestAdapterWebXROptions,
|
|
553
|
-
|
|
585
|
+
CompatibilityModeLimits = WGPUSType_CompatibilityModeLimits,
|
|
554
586
|
TextureBindingViewDimensionDescriptor = WGPUSType_TextureBindingViewDimensionDescriptor,
|
|
555
587
|
EmscriptenSurfaceSourceCanvasHTMLSelector = WGPUSType_EmscriptenSurfaceSourceCanvasHTMLSelector,
|
|
556
588
|
SurfaceDescriptorFromWindowsCoreWindow = WGPUSType_SurfaceDescriptorFromWindowsCoreWindow,
|
|
@@ -622,6 +654,15 @@ enum class SType : uint32_t {
|
|
|
622
654
|
DawnHostMappedPointerLimits = WGPUSType_DawnHostMappedPointerLimits,
|
|
623
655
|
RenderPassDescriptorResolveRect = WGPUSType_RenderPassDescriptorResolveRect,
|
|
624
656
|
RequestAdapterWebGPUBackendOptions = WGPUSType_RequestAdapterWebGPUBackendOptions,
|
|
657
|
+
DawnFakeDeviceInitializeErrorForTesting = WGPUSType_DawnFakeDeviceInitializeErrorForTesting,
|
|
658
|
+
TextureComponentSwizzleDescriptor = WGPUSType_TextureComponentSwizzleDescriptor,
|
|
659
|
+
SharedTextureMemoryD3D11BeginState = WGPUSType_SharedTextureMemoryD3D11BeginState,
|
|
660
|
+
DawnConsumeAdapterDescriptor = WGPUSType_DawnConsumeAdapterDescriptor,
|
|
661
|
+
BindGroupLayoutDynamicBindingArray = WGPUSType_BindGroupLayoutDynamicBindingArray,
|
|
662
|
+
DynamicBindingArrayLimits = WGPUSType_DynamicBindingArrayLimits,
|
|
663
|
+
BindGroupDynamicBindingArray = WGPUSType_BindGroupDynamicBindingArray,
|
|
664
|
+
TexelBufferBindingEntry = WGPUSType_TexelBufferBindingEntry,
|
|
665
|
+
TexelBufferBindingLayout = WGPUSType_TexelBufferBindingLayout,
|
|
625
666
|
};
|
|
626
667
|
static_assert(sizeof(SType) == sizeof(WGPUSType), "sizeof mismatch for SType");
|
|
627
668
|
static_assert(alignof(SType) == alignof(WGPUSType), "alignof mismatch for SType");
|
|
@@ -631,6 +672,8 @@ enum class SubgroupMatrixComponentType : uint32_t {
|
|
|
631
672
|
F16 = WGPUSubgroupMatrixComponentType_F16,
|
|
632
673
|
U32 = WGPUSubgroupMatrixComponentType_U32,
|
|
633
674
|
I32 = WGPUSubgroupMatrixComponentType_I32,
|
|
675
|
+
U8 = WGPUSubgroupMatrixComponentType_U8,
|
|
676
|
+
I8 = WGPUSubgroupMatrixComponentType_I8,
|
|
634
677
|
};
|
|
635
678
|
static_assert(sizeof(SubgroupMatrixComponentType) == sizeof(WGPUSubgroupMatrixComponentType), "sizeof mismatch for SubgroupMatrixComponentType");
|
|
636
679
|
static_assert(alignof(SubgroupMatrixComponentType) == alignof(WGPUSubgroupMatrixComponentType), "alignof mismatch for SubgroupMatrixComponentType");
|
|
@@ -646,6 +689,14 @@ enum class SurfaceGetCurrentTextureStatus : uint32_t {
|
|
|
646
689
|
static_assert(sizeof(SurfaceGetCurrentTextureStatus) == sizeof(WGPUSurfaceGetCurrentTextureStatus), "sizeof mismatch for SurfaceGetCurrentTextureStatus");
|
|
647
690
|
static_assert(alignof(SurfaceGetCurrentTextureStatus) == alignof(WGPUSurfaceGetCurrentTextureStatus), "alignof mismatch for SurfaceGetCurrentTextureStatus");
|
|
648
691
|
|
|
692
|
+
enum class TexelBufferAccess : uint32_t {
|
|
693
|
+
Undefined = WGPUTexelBufferAccess_Undefined,
|
|
694
|
+
ReadOnly = WGPUTexelBufferAccess_ReadOnly,
|
|
695
|
+
ReadWrite = WGPUTexelBufferAccess_ReadWrite,
|
|
696
|
+
};
|
|
697
|
+
static_assert(sizeof(TexelBufferAccess) == sizeof(WGPUTexelBufferAccess), "sizeof mismatch for TexelBufferAccess");
|
|
698
|
+
static_assert(alignof(TexelBufferAccess) == alignof(WGPUTexelBufferAccess), "alignof mismatch for TexelBufferAccess");
|
|
699
|
+
|
|
649
700
|
enum class TextureAspect : uint32_t {
|
|
650
701
|
Undefined = WGPUTextureAspect_Undefined,
|
|
651
702
|
All = WGPUTextureAspect_All,
|
|
@@ -673,6 +724,8 @@ enum class TextureFormat : uint32_t {
|
|
|
673
724
|
R8Snorm = WGPUTextureFormat_R8Snorm,
|
|
674
725
|
R8Uint = WGPUTextureFormat_R8Uint,
|
|
675
726
|
R8Sint = WGPUTextureFormat_R8Sint,
|
|
727
|
+
R16Unorm = WGPUTextureFormat_R16Unorm,
|
|
728
|
+
R16Snorm = WGPUTextureFormat_R16Snorm,
|
|
676
729
|
R16Uint = WGPUTextureFormat_R16Uint,
|
|
677
730
|
R16Sint = WGPUTextureFormat_R16Sint,
|
|
678
731
|
R16Float = WGPUTextureFormat_R16Float,
|
|
@@ -683,6 +736,8 @@ enum class TextureFormat : uint32_t {
|
|
|
683
736
|
R32Float = WGPUTextureFormat_R32Float,
|
|
684
737
|
R32Uint = WGPUTextureFormat_R32Uint,
|
|
685
738
|
R32Sint = WGPUTextureFormat_R32Sint,
|
|
739
|
+
RG16Unorm = WGPUTextureFormat_RG16Unorm,
|
|
740
|
+
RG16Snorm = WGPUTextureFormat_RG16Snorm,
|
|
686
741
|
RG16Uint = WGPUTextureFormat_RG16Uint,
|
|
687
742
|
RG16Sint = WGPUTextureFormat_RG16Sint,
|
|
688
743
|
RG16Float = WGPUTextureFormat_RG16Float,
|
|
@@ -700,6 +755,8 @@ enum class TextureFormat : uint32_t {
|
|
|
700
755
|
RG32Float = WGPUTextureFormat_RG32Float,
|
|
701
756
|
RG32Uint = WGPUTextureFormat_RG32Uint,
|
|
702
757
|
RG32Sint = WGPUTextureFormat_RG32Sint,
|
|
758
|
+
RGBA16Unorm = WGPUTextureFormat_RGBA16Unorm,
|
|
759
|
+
RGBA16Snorm = WGPUTextureFormat_RGBA16Snorm,
|
|
703
760
|
RGBA16Uint = WGPUTextureFormat_RGBA16Uint,
|
|
704
761
|
RGBA16Sint = WGPUTextureFormat_RGBA16Sint,
|
|
705
762
|
RGBA16Float = WGPUTextureFormat_RGBA16Float,
|
|
@@ -764,12 +821,6 @@ enum class TextureFormat : uint32_t {
|
|
|
764
821
|
ASTC12x10UnormSrgb = WGPUTextureFormat_ASTC12x10UnormSrgb,
|
|
765
822
|
ASTC12x12Unorm = WGPUTextureFormat_ASTC12x12Unorm,
|
|
766
823
|
ASTC12x12UnormSrgb = WGPUTextureFormat_ASTC12x12UnormSrgb,
|
|
767
|
-
R16Unorm = WGPUTextureFormat_R16Unorm,
|
|
768
|
-
RG16Unorm = WGPUTextureFormat_RG16Unorm,
|
|
769
|
-
RGBA16Unorm = WGPUTextureFormat_RGBA16Unorm,
|
|
770
|
-
R16Snorm = WGPUTextureFormat_R16Snorm,
|
|
771
|
-
RG16Snorm = WGPUTextureFormat_RG16Snorm,
|
|
772
|
-
RGBA16Snorm = WGPUTextureFormat_RGBA16Snorm,
|
|
773
824
|
R8BG8Biplanar420Unorm = WGPUTextureFormat_R8BG8Biplanar420Unorm,
|
|
774
825
|
R10X6BG10X6Biplanar420Unorm = WGPUTextureFormat_R10X6BG10X6Biplanar420Unorm,
|
|
775
826
|
R8BG8A8Triplanar420Unorm = WGPUTextureFormat_R8BG8A8Triplanar420Unorm,
|
|
@@ -881,6 +932,8 @@ enum class WGSLLanguageFeatureName : uint32_t {
|
|
|
881
932
|
UnrestrictedPointerParameters = WGPUWGSLLanguageFeatureName_UnrestrictedPointerParameters,
|
|
882
933
|
PointerCompositeAccess = WGPUWGSLLanguageFeatureName_PointerCompositeAccess,
|
|
883
934
|
SizedBindingArray = WGPUWGSLLanguageFeatureName_SizedBindingArray,
|
|
935
|
+
TexelBuffers = WGPUWGSLLanguageFeatureName_TexelBuffers,
|
|
936
|
+
ChromiumPrint = WGPUWGSLLanguageFeatureName_ChromiumPrint,
|
|
884
937
|
ChromiumTestingUnimplemented = WGPUWGSLLanguageFeatureName_ChromiumTestingUnimplemented,
|
|
885
938
|
ChromiumTestingUnsafeExperimental = WGPUWGSLLanguageFeatureName_ChromiumTestingUnsafeExperimental,
|
|
886
939
|
ChromiumTestingExperimental = WGPUWGSLLanguageFeatureName_ChromiumTestingExperimental,
|
|
@@ -903,6 +956,7 @@ enum class BufferUsage : uint64_t {
|
|
|
903
956
|
Storage = WGPUBufferUsage_Storage,
|
|
904
957
|
Indirect = WGPUBufferUsage_Indirect,
|
|
905
958
|
QueryResolve = WGPUBufferUsage_QueryResolve,
|
|
959
|
+
TexelBuffer = WGPUBufferUsage_TexelBuffer,
|
|
906
960
|
};
|
|
907
961
|
static_assert(sizeof(BufferUsage) == sizeof(WGPUBufferUsage), "sizeof mismatch for BufferUsage");
|
|
908
962
|
static_assert(alignof(BufferUsage) == alignof(WGPUBufferUsage), "alignof mismatch for BufferUsage");
|
|
@@ -1135,11 +1189,6 @@ class ObjectBase {
|
|
|
1135
1189
|
CType mHandle = nullptr;
|
|
1136
1190
|
};
|
|
1137
1191
|
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
1192
|
class Adapter;
|
|
1144
1193
|
class BindGroup;
|
|
1145
1194
|
class BindGroupLayout;
|
|
@@ -1164,29 +1213,33 @@ class SharedBufferMemory;
|
|
|
1164
1213
|
class SharedFence;
|
|
1165
1214
|
class SharedTextureMemory;
|
|
1166
1215
|
class Surface;
|
|
1216
|
+
class TexelBufferView;
|
|
1167
1217
|
class Texture;
|
|
1168
1218
|
class TextureView;
|
|
1169
1219
|
|
|
1170
1220
|
struct StringView;
|
|
1171
1221
|
struct AdapterPropertiesD3D;
|
|
1172
|
-
struct AdapterPropertiesSubgroups;
|
|
1173
1222
|
struct AdapterPropertiesVk;
|
|
1223
|
+
struct BindGroupDynamicBindingArray;
|
|
1174
1224
|
struct BlendComponent;
|
|
1175
1225
|
struct BufferBindingLayout;
|
|
1176
1226
|
struct BufferHostMappedPointer;
|
|
1177
1227
|
struct Color;
|
|
1178
1228
|
struct ColorTargetStateExpandResolveTextureDawn;
|
|
1179
1229
|
struct CommandBufferDescriptor;
|
|
1230
|
+
struct CompatibilityModeLimits;
|
|
1180
1231
|
struct ConstantEntry;
|
|
1181
1232
|
struct CopyTextureForBrowserOptions;
|
|
1182
1233
|
struct DawnAdapterPropertiesPowerPreference;
|
|
1183
1234
|
struct DawnBufferDescriptorErrorInfoFromWireClient;
|
|
1184
1235
|
struct DawnCacheDeviceDescriptor;
|
|
1185
1236
|
struct DawnCompilationMessageUtf16;
|
|
1237
|
+
struct DawnConsumeAdapterDescriptor;
|
|
1186
1238
|
struct DawnDeviceAllocatorControl;
|
|
1187
1239
|
struct DawnDrmFormatProperties;
|
|
1188
1240
|
struct DawnEncoderInternalUsageDescriptor;
|
|
1189
1241
|
struct DawnFakeBufferOOMForTesting;
|
|
1242
|
+
struct DawnFakeDeviceInitializeErrorForTesting;
|
|
1190
1243
|
struct DawnHostMappedPointerLimits;
|
|
1191
1244
|
struct DawnInjectedInvalidSType;
|
|
1192
1245
|
struct DawnRenderPassColorAttachmentRenderToSingleSampled;
|
|
@@ -1196,13 +1249,15 @@ struct DawnTextureInternalUsageDescriptor;
|
|
|
1196
1249
|
struct DawnTogglesDescriptor;
|
|
1197
1250
|
struct DawnWGSLBlocklist;
|
|
1198
1251
|
struct DawnWireWGSLControl;
|
|
1252
|
+
struct DynamicBindingArrayLayout;
|
|
1253
|
+
struct DynamicBindingArrayLimits;
|
|
1199
1254
|
struct EmscriptenSurfaceSourceCanvasHTMLSelector;
|
|
1200
1255
|
struct Extent2D;
|
|
1201
1256
|
struct Extent3D;
|
|
1202
1257
|
struct ExternalTextureBindingEntry;
|
|
1203
1258
|
struct ExternalTextureBindingLayout;
|
|
1204
1259
|
struct Future;
|
|
1205
|
-
struct
|
|
1260
|
+
struct InstanceLimits;
|
|
1206
1261
|
struct INTERNAL_HAVE_EMDAWNWEBGPU_HEADER;
|
|
1207
1262
|
struct MemoryHeapInfo;
|
|
1208
1263
|
struct MultisampleState;
|
|
@@ -1242,6 +1297,7 @@ struct SharedFenceVkSemaphoreOpaqueFDExportInfo;
|
|
|
1242
1297
|
struct SharedFenceVkSemaphoreZirconHandleDescriptor;
|
|
1243
1298
|
struct SharedFenceVkSemaphoreZirconHandleExportInfo;
|
|
1244
1299
|
struct SharedTextureMemoryAHardwareBufferDescriptor;
|
|
1300
|
+
struct SharedTextureMemoryD3D11BeginState;
|
|
1245
1301
|
struct SharedTextureMemoryD3DSwapchainBeginState;
|
|
1246
1302
|
struct SharedTextureMemoryDmaBufPlane;
|
|
1247
1303
|
struct SharedTextureMemoryDXGISharedHandleDescriptor;
|
|
@@ -1257,6 +1313,7 @@ struct StencilFaceState;
|
|
|
1257
1313
|
struct StorageTextureBindingLayout;
|
|
1258
1314
|
struct SubgroupMatrixConfig;
|
|
1259
1315
|
struct SupportedFeatures;
|
|
1316
|
+
struct SupportedInstanceFeatures;
|
|
1260
1317
|
struct SupportedWGSLLanguageFeatures;
|
|
1261
1318
|
struct SurfaceCapabilities;
|
|
1262
1319
|
struct SurfaceColorManagement;
|
|
@@ -1271,15 +1328,20 @@ struct SurfaceSourceWindowsHWND;
|
|
|
1271
1328
|
struct SurfaceSourceXCBWindow;
|
|
1272
1329
|
struct SurfaceSourceXlibWindow;
|
|
1273
1330
|
struct SurfaceTexture;
|
|
1331
|
+
struct TexelBufferBindingEntry;
|
|
1332
|
+
struct TexelBufferBindingLayout;
|
|
1333
|
+
struct TexelBufferViewDescriptor;
|
|
1274
1334
|
struct TexelCopyBufferLayout;
|
|
1275
1335
|
struct TextureBindingLayout;
|
|
1276
1336
|
struct TextureBindingViewDimensionDescriptor;
|
|
1337
|
+
struct TextureComponentSwizzle;
|
|
1277
1338
|
struct VertexAttribute;
|
|
1278
1339
|
struct YCbCrVkDescriptor;
|
|
1279
1340
|
struct AdapterPropertiesMemoryHeaps;
|
|
1280
1341
|
struct AdapterPropertiesSubgroupMatrixConfigs;
|
|
1281
1342
|
struct AHardwareBufferProperties;
|
|
1282
1343
|
struct BindGroupEntry;
|
|
1344
|
+
struct BindGroupLayoutDynamicBindingArray;
|
|
1283
1345
|
struct BindGroupLayoutEntry;
|
|
1284
1346
|
struct BlendState;
|
|
1285
1347
|
struct BufferDescriptor;
|
|
@@ -1309,8 +1371,8 @@ struct SharedTextureMemoryEndAccessState;
|
|
|
1309
1371
|
struct SurfaceDescriptor;
|
|
1310
1372
|
struct TexelCopyBufferInfo;
|
|
1311
1373
|
struct TexelCopyTextureInfo;
|
|
1374
|
+
struct TextureComponentSwizzleDescriptor;
|
|
1312
1375
|
struct TextureDescriptor;
|
|
1313
|
-
struct TextureViewDescriptor;
|
|
1314
1376
|
struct VertexBufferLayout;
|
|
1315
1377
|
struct AdapterInfo;
|
|
1316
1378
|
struct BindGroupDescriptor;
|
|
@@ -1324,6 +1386,7 @@ struct PipelineLayoutDescriptor;
|
|
|
1324
1386
|
struct RenderPassPixelLocalStorage;
|
|
1325
1387
|
struct SharedTextureMemoryDescriptor;
|
|
1326
1388
|
struct SharedTextureMemoryProperties;
|
|
1389
|
+
struct TextureViewDescriptor;
|
|
1327
1390
|
struct VertexState;
|
|
1328
1391
|
struct FragmentState;
|
|
1329
1392
|
struct RenderPassDescriptor;
|
|
@@ -1466,23 +1529,23 @@ struct CallbackTypeBase<std::tuple<Args...>, T> {
|
|
|
1466
1529
|
|
|
1467
1530
|
|
|
1468
1531
|
template <typename... T>
|
|
1469
|
-
using BufferMapCallback = typename detail::CallbackTypeBase<std::tuple<MapAsyncStatus
|
|
1532
|
+
using BufferMapCallback = typename detail::CallbackTypeBase<std::tuple<MapAsyncStatus, StringView>, T...>::Callback;
|
|
1470
1533
|
template <typename... T>
|
|
1471
|
-
using CompilationInfoCallback = typename detail::CallbackTypeBase<std::tuple<CompilationInfoRequestStatus
|
|
1534
|
+
using CompilationInfoCallback = typename detail::CallbackTypeBase<std::tuple<CompilationInfoRequestStatus, CompilationInfo const *>, T...>::Callback;
|
|
1472
1535
|
template <typename... T>
|
|
1473
|
-
using CreateComputePipelineAsyncCallback = typename detail::CallbackTypeBase<std::tuple<CreatePipelineAsyncStatus
|
|
1536
|
+
using CreateComputePipelineAsyncCallback = typename detail::CallbackTypeBase<std::tuple<CreatePipelineAsyncStatus, ComputePipeline, StringView>, T...>::Callback;
|
|
1474
1537
|
template <typename... T>
|
|
1475
|
-
using CreateRenderPipelineAsyncCallback = typename detail::CallbackTypeBase<std::tuple<CreatePipelineAsyncStatus
|
|
1538
|
+
using CreateRenderPipelineAsyncCallback = typename detail::CallbackTypeBase<std::tuple<CreatePipelineAsyncStatus, RenderPipeline, StringView>, T...>::Callback;
|
|
1476
1539
|
template <typename... T>
|
|
1477
|
-
using LoggingCallback = typename detail::CallbackTypeBase<std::tuple<LoggingType
|
|
1540
|
+
using LoggingCallback = typename detail::CallbackTypeBase<std::tuple<LoggingType, StringView>, T...>::Callback;
|
|
1478
1541
|
template <typename... T>
|
|
1479
|
-
using PopErrorScopeCallback = typename detail::CallbackTypeBase<std::tuple<PopErrorScopeStatus
|
|
1542
|
+
using PopErrorScopeCallback = typename detail::CallbackTypeBase<std::tuple<PopErrorScopeStatus, ErrorType, StringView>, T...>::Callback;
|
|
1480
1543
|
template <typename... T>
|
|
1481
|
-
using QueueWorkDoneCallback = typename detail::CallbackTypeBase<std::tuple<QueueWorkDoneStatus >, T...>::Callback;
|
|
1544
|
+
using QueueWorkDoneCallback = typename detail::CallbackTypeBase<std::tuple<QueueWorkDoneStatus, StringView>, T...>::Callback;
|
|
1482
1545
|
template <typename... T>
|
|
1483
|
-
using RequestAdapterCallback = typename detail::CallbackTypeBase<std::tuple<RequestAdapterStatus
|
|
1546
|
+
using RequestAdapterCallback = typename detail::CallbackTypeBase<std::tuple<RequestAdapterStatus, Adapter, StringView>, T...>::Callback;
|
|
1484
1547
|
template <typename... T>
|
|
1485
|
-
using RequestDeviceCallback = typename detail::CallbackTypeBase<std::tuple<RequestDeviceStatus
|
|
1548
|
+
using RequestDeviceCallback = typename detail::CallbackTypeBase<std::tuple<RequestDeviceStatus, Device, StringView>, T...>::Callback;
|
|
1486
1549
|
template <typename... T>
|
|
1487
1550
|
using DeviceLostCallback = typename detail::CallbackTypeBase<std::tuple<const Device&, DeviceLostReason, StringView>, T...>::Callback;
|
|
1488
1551
|
template <typename... T>
|
|
@@ -1507,12 +1570,12 @@ class Adapter : public ObjectBase<Adapter, WGPUAdapter> {
|
|
|
1507
1570
|
typename Cb = RequestDeviceCallback<T>,
|
|
1508
1571
|
typename CbChar = void (RequestDeviceStatus status, Device device, const char* message, T userdata),
|
|
1509
1572
|
typename = std::enable_if_t<std::is_convertible_v<F, Cb*> || std::is_convertible_v<F, CbChar*>>>
|
|
1510
|
-
Future RequestDevice(DeviceDescriptor const *
|
|
1573
|
+
Future RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const;
|
|
1511
1574
|
template <typename L,
|
|
1512
1575
|
typename Cb = RequestDeviceCallback<>,
|
|
1513
1576
|
typename CbChar = std::function<void(RequestDeviceStatus status, Device device, const char* message)>,
|
|
1514
1577
|
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1515
|
-
Future RequestDevice(DeviceDescriptor const *
|
|
1578
|
+
Future RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,L callback) const;
|
|
1516
1579
|
|
|
1517
1580
|
|
|
1518
1581
|
private:
|
|
@@ -1526,6 +1589,7 @@ class BindGroup : public ObjectBase<BindGroup, WGPUBindGroup> {
|
|
|
1526
1589
|
using ObjectBase::ObjectBase;
|
|
1527
1590
|
using ObjectBase::operator=;
|
|
1528
1591
|
|
|
1592
|
+
inline void Destroy() const;
|
|
1529
1593
|
inline void SetLabel(StringView label) const;
|
|
1530
1594
|
|
|
1531
1595
|
|
|
@@ -1554,6 +1618,7 @@ class Buffer : public ObjectBase<Buffer, WGPUBuffer> {
|
|
|
1554
1618
|
using ObjectBase::ObjectBase;
|
|
1555
1619
|
using ObjectBase::operator=;
|
|
1556
1620
|
|
|
1621
|
+
inline TexelBufferView CreateTexelView(TexelBufferViewDescriptor const * descriptor) const;
|
|
1557
1622
|
inline void Destroy() const;
|
|
1558
1623
|
inline void const * GetConstMappedRange(size_t offset = 0, size_t size = kWholeMapSize) const;
|
|
1559
1624
|
inline void * GetMappedRange(size_t offset = 0, size_t size = kWholeMapSize) const;
|
|
@@ -1775,7 +1840,7 @@ class Instance : public ObjectBase<Instance, WGPUInstance> {
|
|
|
1775
1840
|
using ObjectBase::operator=;
|
|
1776
1841
|
|
|
1777
1842
|
inline Surface CreateSurface(SurfaceDescriptor const * descriptor) const;
|
|
1778
|
-
inline
|
|
1843
|
+
inline void GetWGSLLanguageFeatures(SupportedWGSLLanguageFeatures * features) const;
|
|
1779
1844
|
inline Bool HasWGSLLanguageFeature(WGSLLanguageFeatureName feature) const;
|
|
1780
1845
|
inline void ProcessEvents() const;
|
|
1781
1846
|
template <typename F, typename T,
|
|
@@ -1838,12 +1903,12 @@ class Queue : public ObjectBase<Queue, WGPUQueue> {
|
|
|
1838
1903
|
inline void CopyTextureForBrowser(TexelCopyTextureInfo const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize, CopyTextureForBrowserOptions const * options) const;
|
|
1839
1904
|
template <typename F, typename T,
|
|
1840
1905
|
typename Cb = QueueWorkDoneCallback<T>,
|
|
1841
|
-
typename CbChar = void (QueueWorkDoneStatus status, T userdata),
|
|
1906
|
+
typename CbChar = void (QueueWorkDoneStatus status, const char* message, T userdata),
|
|
1842
1907
|
typename = std::enable_if_t<std::is_convertible_v<F, Cb*> || std::is_convertible_v<F, CbChar*>>>
|
|
1843
1908
|
Future OnSubmittedWorkDone(CallbackMode callbackMode,F callback, T userdata) const;
|
|
1844
1909
|
template <typename L,
|
|
1845
1910
|
typename Cb = QueueWorkDoneCallback<>,
|
|
1846
|
-
typename CbChar = std::function<void(QueueWorkDoneStatus status)>,
|
|
1911
|
+
typename CbChar = std::function<void(QueueWorkDoneStatus status, const char* message)>,
|
|
1847
1912
|
typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
|
|
1848
1913
|
Future OnSubmittedWorkDone(CallbackMode callbackMode,L callback) const;
|
|
1849
1914
|
inline void SetLabel(StringView label) const;
|
|
@@ -2050,7 +2115,7 @@ class Surface : public ObjectBase<Surface, WGPUSurface> {
|
|
|
2050
2115
|
inline void Configure(SurfaceConfiguration const * config) const;
|
|
2051
2116
|
inline ConvertibleStatus GetCapabilities(Adapter const& adapter, SurfaceCapabilities * capabilities) const;
|
|
2052
2117
|
inline void GetCurrentTexture(SurfaceTexture * surfaceTexture) const;
|
|
2053
|
-
inline
|
|
2118
|
+
inline ConvertibleStatus Present() const;
|
|
2054
2119
|
inline void SetLabel(StringView label) const;
|
|
2055
2120
|
inline void Unconfigure() const;
|
|
2056
2121
|
|
|
@@ -2061,6 +2126,20 @@ class Surface : public ObjectBase<Surface, WGPUSurface> {
|
|
|
2061
2126
|
static inline void WGPURelease(WGPUSurface handle);
|
|
2062
2127
|
};
|
|
2063
2128
|
|
|
2129
|
+
class TexelBufferView : public ObjectBase<TexelBufferView, WGPUTexelBufferView> {
|
|
2130
|
+
public:
|
|
2131
|
+
using ObjectBase::ObjectBase;
|
|
2132
|
+
using ObjectBase::operator=;
|
|
2133
|
+
|
|
2134
|
+
inline void SetLabel(StringView label) const;
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
private:
|
|
2138
|
+
friend ObjectBase<TexelBufferView, WGPUTexelBufferView>;
|
|
2139
|
+
static inline void WGPUAddRef(WGPUTexelBufferView handle);
|
|
2140
|
+
static inline void WGPURelease(WGPUTexelBufferView handle);
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2064
2143
|
class Texture : public ObjectBase<Texture, WGPUTexture> {
|
|
2065
2144
|
public:
|
|
2066
2145
|
using ObjectBase::ObjectBase;
|
|
@@ -2077,7 +2156,9 @@ class Texture : public ObjectBase<Texture, WGPUTexture> {
|
|
|
2077
2156
|
inline uint32_t GetSampleCount() const;
|
|
2078
2157
|
inline TextureUsage GetUsage() const;
|
|
2079
2158
|
inline uint32_t GetWidth() const;
|
|
2159
|
+
inline void Pin(TextureUsage usage) const;
|
|
2080
2160
|
inline void SetLabel(StringView label) const;
|
|
2161
|
+
inline void Unpin() const;
|
|
2081
2162
|
|
|
2082
2163
|
|
|
2083
2164
|
private:
|
|
@@ -2120,23 +2201,10 @@ struct AdapterPropertiesD3D : ChainedStructOut {
|
|
|
2120
2201
|
inline AdapterPropertiesD3D(Init&& init);
|
|
2121
2202
|
inline operator const WGPUAdapterPropertiesD3D&() const noexcept;
|
|
2122
2203
|
|
|
2123
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2204
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2124
2205
|
alignas(kFirstMemberAlignment) uint32_t shaderModel;
|
|
2125
2206
|
};
|
|
2126
2207
|
|
|
2127
|
-
// Can be chained in AdapterInfo
|
|
2128
|
-
struct AdapterPropertiesSubgroups : ChainedStructOut {
|
|
2129
|
-
inline AdapterPropertiesSubgroups();
|
|
2130
|
-
|
|
2131
|
-
struct Init;
|
|
2132
|
-
inline AdapterPropertiesSubgroups(Init&& init);
|
|
2133
|
-
inline operator const WGPUAdapterPropertiesSubgroups&() const noexcept;
|
|
2134
|
-
|
|
2135
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t ));
|
|
2136
|
-
alignas(kFirstMemberAlignment) uint32_t subgroupMinSize = kLimitU32Undefined;
|
|
2137
|
-
uint32_t subgroupMaxSize = kLimitU32Undefined;
|
|
2138
|
-
};
|
|
2139
|
-
|
|
2140
2208
|
// Can be chained in AdapterInfo
|
|
2141
2209
|
struct AdapterPropertiesVk : ChainedStructOut {
|
|
2142
2210
|
inline AdapterPropertiesVk();
|
|
@@ -2145,10 +2213,22 @@ struct AdapterPropertiesVk : ChainedStructOut {
|
|
|
2145
2213
|
inline AdapterPropertiesVk(Init&& init);
|
|
2146
2214
|
inline operator const WGPUAdapterPropertiesVk&() const noexcept;
|
|
2147
2215
|
|
|
2148
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2216
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2149
2217
|
alignas(kFirstMemberAlignment) uint32_t driverVersion;
|
|
2150
2218
|
};
|
|
2151
2219
|
|
|
2220
|
+
// Can be chained in BindGroupDescriptor
|
|
2221
|
+
struct BindGroupDynamicBindingArray : ChainedStruct {
|
|
2222
|
+
inline BindGroupDynamicBindingArray();
|
|
2223
|
+
|
|
2224
|
+
struct Init;
|
|
2225
|
+
inline BindGroupDynamicBindingArray(Init&& init);
|
|
2226
|
+
inline operator const WGPUBindGroupDynamicBindingArray&() const noexcept;
|
|
2227
|
+
|
|
2228
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2229
|
+
alignas(kFirstMemberAlignment) uint32_t dynamicArraySize = 0;
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2152
2232
|
struct BlendComponent {
|
|
2153
2233
|
inline operator const WGPUBlendComponent&() const noexcept;
|
|
2154
2234
|
|
|
@@ -2174,7 +2254,7 @@ struct BufferHostMappedPointer : ChainedStruct {
|
|
|
2174
2254
|
inline BufferHostMappedPointer(Init&& init);
|
|
2175
2255
|
inline operator const WGPUBufferHostMappedPointer&() const noexcept;
|
|
2176
2256
|
|
|
2177
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2257
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2178
2258
|
alignas(kFirstMemberAlignment) void * pointer;
|
|
2179
2259
|
Callback disposeCallback;
|
|
2180
2260
|
void * userdata;
|
|
@@ -2197,7 +2277,7 @@ struct ColorTargetStateExpandResolveTextureDawn : ChainedStruct {
|
|
|
2197
2277
|
inline ColorTargetStateExpandResolveTextureDawn(Init&& init);
|
|
2198
2278
|
inline operator const WGPUColorTargetStateExpandResolveTextureDawn&() const noexcept;
|
|
2199
2279
|
|
|
2200
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2280
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2201
2281
|
alignas(kFirstMemberAlignment) Bool enabled = false;
|
|
2202
2282
|
};
|
|
2203
2283
|
|
|
@@ -2208,6 +2288,21 @@ struct CommandBufferDescriptor {
|
|
|
2208
2288
|
StringView label = {};
|
|
2209
2289
|
};
|
|
2210
2290
|
|
|
2291
|
+
// Can be chained in Limits
|
|
2292
|
+
struct CompatibilityModeLimits : ChainedStructOut {
|
|
2293
|
+
inline CompatibilityModeLimits();
|
|
2294
|
+
|
|
2295
|
+
struct Init;
|
|
2296
|
+
inline CompatibilityModeLimits(Init&& init);
|
|
2297
|
+
inline operator const WGPUCompatibilityModeLimits&() const noexcept;
|
|
2298
|
+
|
|
2299
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2300
|
+
alignas(kFirstMemberAlignment) uint32_t maxStorageBuffersInVertexStage = kLimitU32Undefined;
|
|
2301
|
+
uint32_t maxStorageTexturesInVertexStage = kLimitU32Undefined;
|
|
2302
|
+
uint32_t maxStorageBuffersInFragmentStage = kLimitU32Undefined;
|
|
2303
|
+
uint32_t maxStorageTexturesInFragmentStage = kLimitU32Undefined;
|
|
2304
|
+
};
|
|
2305
|
+
|
|
2211
2306
|
struct ConstantEntry {
|
|
2212
2307
|
inline operator const WGPUConstantEntry&() const noexcept;
|
|
2213
2308
|
|
|
@@ -2238,7 +2333,7 @@ struct DawnAdapterPropertiesPowerPreference : ChainedStructOut {
|
|
|
2238
2333
|
inline DawnAdapterPropertiesPowerPreference(Init&& init);
|
|
2239
2334
|
inline operator const WGPUDawnAdapterPropertiesPowerPreference&() const noexcept;
|
|
2240
2335
|
|
|
2241
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(PowerPreference
|
|
2336
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(PowerPreference));
|
|
2242
2337
|
alignas(kFirstMemberAlignment) PowerPreference powerPreference = PowerPreference::Undefined;
|
|
2243
2338
|
};
|
|
2244
2339
|
|
|
@@ -2250,7 +2345,7 @@ struct DawnBufferDescriptorErrorInfoFromWireClient : ChainedStruct {
|
|
|
2250
2345
|
inline DawnBufferDescriptorErrorInfoFromWireClient(Init&& init);
|
|
2251
2346
|
inline operator const WGPUDawnBufferDescriptorErrorInfoFromWireClient&() const noexcept;
|
|
2252
2347
|
|
|
2253
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2348
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2254
2349
|
alignas(kFirstMemberAlignment) Bool outOfMemory = false;
|
|
2255
2350
|
};
|
|
2256
2351
|
|
|
@@ -2262,7 +2357,7 @@ struct DawnCacheDeviceDescriptor : ChainedStruct {
|
|
|
2262
2357
|
inline DawnCacheDeviceDescriptor(Init&& init);
|
|
2263
2358
|
inline operator const WGPUDawnCacheDeviceDescriptor&() const noexcept;
|
|
2264
2359
|
|
|
2265
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(StringView
|
|
2360
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(StringView));
|
|
2266
2361
|
alignas(kFirstMemberAlignment) StringView isolationKey = {};
|
|
2267
2362
|
DawnLoadCacheDataFunction loadDataFunction = nullptr;
|
|
2268
2363
|
DawnStoreCacheDataFunction storeDataFunction = nullptr;
|
|
@@ -2277,12 +2372,24 @@ struct DawnCompilationMessageUtf16 : ChainedStruct {
|
|
|
2277
2372
|
inline DawnCompilationMessageUtf16(Init&& init);
|
|
2278
2373
|
inline operator const WGPUDawnCompilationMessageUtf16&() const noexcept;
|
|
2279
2374
|
|
|
2280
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t
|
|
2375
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t));
|
|
2281
2376
|
alignas(kFirstMemberAlignment) uint64_t linePos;
|
|
2282
2377
|
uint64_t offset;
|
|
2283
2378
|
uint64_t length;
|
|
2284
2379
|
};
|
|
2285
2380
|
|
|
2381
|
+
// Can be chained in DeviceDescriptor
|
|
2382
|
+
struct DawnConsumeAdapterDescriptor : ChainedStruct {
|
|
2383
|
+
inline DawnConsumeAdapterDescriptor();
|
|
2384
|
+
|
|
2385
|
+
struct Init;
|
|
2386
|
+
inline DawnConsumeAdapterDescriptor(Init&& init);
|
|
2387
|
+
inline operator const WGPUDawnConsumeAdapterDescriptor&() const noexcept;
|
|
2388
|
+
|
|
2389
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2390
|
+
alignas(kFirstMemberAlignment) Bool consumeAdapter = false;
|
|
2391
|
+
};
|
|
2392
|
+
|
|
2286
2393
|
// Can be chained in DeviceDescriptor
|
|
2287
2394
|
struct DawnDeviceAllocatorControl : ChainedStruct {
|
|
2288
2395
|
inline DawnDeviceAllocatorControl();
|
|
@@ -2291,7 +2398,7 @@ struct DawnDeviceAllocatorControl : ChainedStruct {
|
|
|
2291
2398
|
inline DawnDeviceAllocatorControl(Init&& init);
|
|
2292
2399
|
inline operator const WGPUDawnDeviceAllocatorControl&() const noexcept;
|
|
2293
2400
|
|
|
2294
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t
|
|
2401
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t));
|
|
2295
2402
|
alignas(kFirstMemberAlignment) size_t allocatorHeapBlockSize = 0;
|
|
2296
2403
|
};
|
|
2297
2404
|
|
|
@@ -2310,7 +2417,7 @@ struct DawnEncoderInternalUsageDescriptor : ChainedStruct {
|
|
|
2310
2417
|
inline DawnEncoderInternalUsageDescriptor(Init&& init);
|
|
2311
2418
|
inline operator const WGPUDawnEncoderInternalUsageDescriptor&() const noexcept;
|
|
2312
2419
|
|
|
2313
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2420
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2314
2421
|
alignas(kFirstMemberAlignment) Bool useInternalUsages = false;
|
|
2315
2422
|
};
|
|
2316
2423
|
|
|
@@ -2322,12 +2429,22 @@ struct DawnFakeBufferOOMForTesting : ChainedStruct {
|
|
|
2322
2429
|
inline DawnFakeBufferOOMForTesting(Init&& init);
|
|
2323
2430
|
inline operator const WGPUDawnFakeBufferOOMForTesting&() const noexcept;
|
|
2324
2431
|
|
|
2325
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2432
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2326
2433
|
alignas(kFirstMemberAlignment) Bool fakeOOMAtWireClientMap;
|
|
2327
2434
|
Bool fakeOOMAtNativeMap;
|
|
2328
2435
|
Bool fakeOOMAtDevice;
|
|
2329
2436
|
};
|
|
2330
2437
|
|
|
2438
|
+
// Can be chained in DeviceDescriptor
|
|
2439
|
+
struct DawnFakeDeviceInitializeErrorForTesting : ChainedStruct {
|
|
2440
|
+
inline DawnFakeDeviceInitializeErrorForTesting();
|
|
2441
|
+
|
|
2442
|
+
struct Init;
|
|
2443
|
+
inline DawnFakeDeviceInitializeErrorForTesting(Init&& init);
|
|
2444
|
+
inline operator const WGPUDawnFakeDeviceInitializeErrorForTesting&() const noexcept;
|
|
2445
|
+
|
|
2446
|
+
};
|
|
2447
|
+
|
|
2331
2448
|
// Can be chained in Limits
|
|
2332
2449
|
struct DawnHostMappedPointerLimits : ChainedStructOut {
|
|
2333
2450
|
inline DawnHostMappedPointerLimits();
|
|
@@ -2336,7 +2453,7 @@ struct DawnHostMappedPointerLimits : ChainedStructOut {
|
|
|
2336
2453
|
inline DawnHostMappedPointerLimits(Init&& init);
|
|
2337
2454
|
inline operator const WGPUDawnHostMappedPointerLimits&() const noexcept;
|
|
2338
2455
|
|
|
2339
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2456
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2340
2457
|
alignas(kFirstMemberAlignment) uint32_t hostMappedPointerAlignment = kLimitU32Undefined;
|
|
2341
2458
|
};
|
|
2342
2459
|
|
|
@@ -2347,7 +2464,7 @@ struct DawnInjectedInvalidSType : ChainedStruct {
|
|
|
2347
2464
|
inline DawnInjectedInvalidSType(Init&& init);
|
|
2348
2465
|
inline operator const WGPUDawnInjectedInvalidSType&() const noexcept;
|
|
2349
2466
|
|
|
2350
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(SType
|
|
2467
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(SType));
|
|
2351
2468
|
alignas(kFirstMemberAlignment) SType invalidSType = {};
|
|
2352
2469
|
};
|
|
2353
2470
|
|
|
@@ -2359,7 +2476,7 @@ struct DawnRenderPassColorAttachmentRenderToSingleSampled : ChainedStruct {
|
|
|
2359
2476
|
inline DawnRenderPassColorAttachmentRenderToSingleSampled(Init&& init);
|
|
2360
2477
|
inline operator const WGPUDawnRenderPassColorAttachmentRenderToSingleSampled&() const noexcept;
|
|
2361
2478
|
|
|
2362
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2479
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2363
2480
|
alignas(kFirstMemberAlignment) uint32_t implicitSampleCount = 1;
|
|
2364
2481
|
};
|
|
2365
2482
|
|
|
@@ -2371,7 +2488,7 @@ struct DawnShaderModuleSPIRVOptionsDescriptor : ChainedStruct {
|
|
|
2371
2488
|
inline DawnShaderModuleSPIRVOptionsDescriptor(Init&& init);
|
|
2372
2489
|
inline operator const WGPUDawnShaderModuleSPIRVOptionsDescriptor&() const noexcept;
|
|
2373
2490
|
|
|
2374
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2491
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2375
2492
|
alignas(kFirstMemberAlignment) Bool allowNonUniformDerivatives = false;
|
|
2376
2493
|
};
|
|
2377
2494
|
|
|
@@ -2383,7 +2500,7 @@ struct DawnTexelCopyBufferRowAlignmentLimits : ChainedStructOut {
|
|
|
2383
2500
|
inline DawnTexelCopyBufferRowAlignmentLimits(Init&& init);
|
|
2384
2501
|
inline operator const WGPUDawnTexelCopyBufferRowAlignmentLimits&() const noexcept;
|
|
2385
2502
|
|
|
2386
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2503
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2387
2504
|
alignas(kFirstMemberAlignment) uint32_t minTexelCopyBufferRowAlignment = kLimitU32Undefined;
|
|
2388
2505
|
};
|
|
2389
2506
|
|
|
@@ -2395,7 +2512,7 @@ struct DawnTextureInternalUsageDescriptor : ChainedStruct {
|
|
|
2395
2512
|
inline DawnTextureInternalUsageDescriptor(Init&& init);
|
|
2396
2513
|
inline operator const WGPUDawnTextureInternalUsageDescriptor&() const noexcept;
|
|
2397
2514
|
|
|
2398
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TextureUsage
|
|
2515
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TextureUsage));
|
|
2399
2516
|
alignas(kFirstMemberAlignment) TextureUsage internalUsage = TextureUsage::None;
|
|
2400
2517
|
};
|
|
2401
2518
|
|
|
@@ -2409,7 +2526,7 @@ struct DawnTogglesDescriptor : ChainedStruct {
|
|
|
2409
2526
|
inline DawnTogglesDescriptor(Init&& init);
|
|
2410
2527
|
inline operator const WGPUDawnTogglesDescriptor&() const noexcept;
|
|
2411
2528
|
|
|
2412
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t
|
|
2529
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t));
|
|
2413
2530
|
alignas(kFirstMemberAlignment) size_t enabledToggleCount = 0;
|
|
2414
2531
|
const char* const * enabledToggles = nullptr;
|
|
2415
2532
|
size_t disabledToggleCount = 0;
|
|
@@ -2424,7 +2541,7 @@ struct DawnWGSLBlocklist : ChainedStruct {
|
|
|
2424
2541
|
inline DawnWGSLBlocklist(Init&& init);
|
|
2425
2542
|
inline operator const WGPUDawnWGSLBlocklist&() const noexcept;
|
|
2426
2543
|
|
|
2427
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t
|
|
2544
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t));
|
|
2428
2545
|
alignas(kFirstMemberAlignment) size_t blocklistedFeatureCount = 0;
|
|
2429
2546
|
const char* const * blocklistedFeatures = nullptr;
|
|
2430
2547
|
};
|
|
@@ -2437,12 +2554,32 @@ struct DawnWireWGSLControl : ChainedStruct {
|
|
|
2437
2554
|
inline DawnWireWGSLControl(Init&& init);
|
|
2438
2555
|
inline operator const WGPUDawnWireWGSLControl&() const noexcept;
|
|
2439
2556
|
|
|
2440
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2557
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2441
2558
|
alignas(kFirstMemberAlignment) Bool enableExperimental = false;
|
|
2442
2559
|
Bool enableUnsafe = false;
|
|
2443
2560
|
Bool enableTesting = false;
|
|
2444
2561
|
};
|
|
2445
2562
|
|
|
2563
|
+
struct DynamicBindingArrayLayout {
|
|
2564
|
+
inline operator const WGPUDynamicBindingArrayLayout&() const noexcept;
|
|
2565
|
+
|
|
2566
|
+
ChainedStruct const * nextInChain = nullptr;
|
|
2567
|
+
uint32_t start = 0;
|
|
2568
|
+
DynamicBindingKind kind = DynamicBindingKind::Undefined;
|
|
2569
|
+
};
|
|
2570
|
+
|
|
2571
|
+
// Can be chained in Limits
|
|
2572
|
+
struct DynamicBindingArrayLimits : ChainedStructOut {
|
|
2573
|
+
inline DynamicBindingArrayLimits();
|
|
2574
|
+
|
|
2575
|
+
struct Init;
|
|
2576
|
+
inline DynamicBindingArrayLimits(Init&& init);
|
|
2577
|
+
inline operator const WGPUDynamicBindingArrayLimits&() const noexcept;
|
|
2578
|
+
|
|
2579
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2580
|
+
alignas(kFirstMemberAlignment) uint32_t maxDynamicBindingArraySize = kLimitU32Undefined;
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2446
2583
|
// Can be chained in SurfaceDescriptor
|
|
2447
2584
|
struct EmscriptenSurfaceSourceCanvasHTMLSelector : ChainedStruct {
|
|
2448
2585
|
inline EmscriptenSurfaceSourceCanvasHTMLSelector();
|
|
@@ -2451,7 +2588,7 @@ struct EmscriptenSurfaceSourceCanvasHTMLSelector : ChainedStruct {
|
|
|
2451
2588
|
inline EmscriptenSurfaceSourceCanvasHTMLSelector(Init&& init);
|
|
2452
2589
|
inline operator const WGPUEmscriptenSurfaceSourceCanvasHTMLSelector&() const noexcept;
|
|
2453
2590
|
|
|
2454
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(StringView
|
|
2591
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(StringView));
|
|
2455
2592
|
alignas(kFirstMemberAlignment) StringView selector = {};
|
|
2456
2593
|
};
|
|
2457
2594
|
|
|
@@ -2478,7 +2615,7 @@ struct ExternalTextureBindingEntry : ChainedStruct {
|
|
|
2478
2615
|
inline ExternalTextureBindingEntry(Init&& init);
|
|
2479
2616
|
inline operator const WGPUExternalTextureBindingEntry&() const noexcept;
|
|
2480
2617
|
|
|
2481
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(ExternalTexture
|
|
2618
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(ExternalTexture));
|
|
2482
2619
|
alignas(kFirstMemberAlignment) ExternalTexture externalTexture = nullptr;
|
|
2483
2620
|
};
|
|
2484
2621
|
|
|
@@ -2498,11 +2635,10 @@ struct Future {
|
|
|
2498
2635
|
uint64_t id;
|
|
2499
2636
|
};
|
|
2500
2637
|
|
|
2501
|
-
struct
|
|
2502
|
-
inline operator const
|
|
2638
|
+
struct InstanceLimits {
|
|
2639
|
+
inline operator const WGPUInstanceLimits&() const noexcept;
|
|
2503
2640
|
|
|
2504
2641
|
ChainedStructOut * nextInChain = nullptr;
|
|
2505
|
-
Bool timedWaitAnyEnable = false;
|
|
2506
2642
|
size_t timedWaitAnyMaxCount = 0;
|
|
2507
2643
|
};
|
|
2508
2644
|
|
|
@@ -2630,7 +2766,7 @@ struct RenderPassDescriptorExpandResolveRect : ChainedStruct {
|
|
|
2630
2766
|
inline RenderPassDescriptorExpandResolveRect(Init&& init);
|
|
2631
2767
|
inline operator const WGPURenderPassDescriptorExpandResolveRect&() const noexcept;
|
|
2632
2768
|
|
|
2633
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2769
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2634
2770
|
alignas(kFirstMemberAlignment) uint32_t x;
|
|
2635
2771
|
uint32_t y;
|
|
2636
2772
|
uint32_t width;
|
|
@@ -2645,7 +2781,7 @@ struct RenderPassDescriptorResolveRect : ChainedStruct {
|
|
|
2645
2781
|
inline RenderPassDescriptorResolveRect(Init&& init);
|
|
2646
2782
|
inline operator const WGPURenderPassDescriptorResolveRect&() const noexcept;
|
|
2647
2783
|
|
|
2648
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2784
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2649
2785
|
alignas(kFirstMemberAlignment) uint32_t colorOffsetX;
|
|
2650
2786
|
uint32_t colorOffsetY;
|
|
2651
2787
|
uint32_t resolveOffsetX;
|
|
@@ -2662,7 +2798,7 @@ struct RenderPassMaxDrawCount : ChainedStruct {
|
|
|
2662
2798
|
inline RenderPassMaxDrawCount(Init&& init);
|
|
2663
2799
|
inline operator const WGPURenderPassMaxDrawCount&() const noexcept;
|
|
2664
2800
|
|
|
2665
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t
|
|
2801
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t));
|
|
2666
2802
|
alignas(kFirstMemberAlignment) uint64_t maxDrawCount = 50000000;
|
|
2667
2803
|
};
|
|
2668
2804
|
|
|
@@ -2684,7 +2820,7 @@ struct RequestAdapterWebXROptions : ChainedStruct {
|
|
|
2684
2820
|
inline RequestAdapterWebXROptions(Init&& init);
|
|
2685
2821
|
inline operator const WGPURequestAdapterWebXROptions&() const noexcept;
|
|
2686
2822
|
|
|
2687
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2823
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2688
2824
|
alignas(kFirstMemberAlignment) Bool xrCompatible;
|
|
2689
2825
|
};
|
|
2690
2826
|
|
|
@@ -2703,7 +2839,7 @@ struct ShaderModuleCompilationOptions : ChainedStruct {
|
|
|
2703
2839
|
inline ShaderModuleCompilationOptions(Init&& init);
|
|
2704
2840
|
inline operator const WGPUShaderModuleCompilationOptions&() const noexcept;
|
|
2705
2841
|
|
|
2706
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
2842
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2707
2843
|
alignas(kFirstMemberAlignment) Bool strictMath;
|
|
2708
2844
|
};
|
|
2709
2845
|
|
|
@@ -2715,7 +2851,7 @@ struct ShaderSourceSPIRV : ChainedStruct {
|
|
|
2715
2851
|
inline ShaderSourceSPIRV(Init&& init);
|
|
2716
2852
|
inline operator const WGPUShaderSourceSPIRV&() const noexcept;
|
|
2717
2853
|
|
|
2718
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
2854
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2719
2855
|
alignas(kFirstMemberAlignment) uint32_t codeSize;
|
|
2720
2856
|
uint32_t const * code = nullptr;
|
|
2721
2857
|
};
|
|
@@ -2728,7 +2864,7 @@ struct ShaderSourceWGSL : ChainedStruct {
|
|
|
2728
2864
|
inline ShaderSourceWGSL(Init&& init);
|
|
2729
2865
|
inline operator const WGPUShaderSourceWGSL&() const noexcept;
|
|
2730
2866
|
|
|
2731
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(StringView
|
|
2867
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(StringView));
|
|
2732
2868
|
alignas(kFirstMemberAlignment) StringView code = {};
|
|
2733
2869
|
};
|
|
2734
2870
|
|
|
@@ -2785,7 +2921,7 @@ struct SharedFenceDXGISharedHandleDescriptor : ChainedStruct {
|
|
|
2785
2921
|
inline SharedFenceDXGISharedHandleDescriptor(Init&& init);
|
|
2786
2922
|
inline operator const WGPUSharedFenceDXGISharedHandleDescriptor&() const noexcept;
|
|
2787
2923
|
|
|
2788
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2924
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2789
2925
|
alignas(kFirstMemberAlignment) void * handle;
|
|
2790
2926
|
};
|
|
2791
2927
|
|
|
@@ -2797,7 +2933,7 @@ struct SharedFenceDXGISharedHandleExportInfo : ChainedStructOut {
|
|
|
2797
2933
|
inline SharedFenceDXGISharedHandleExportInfo(Init&& init);
|
|
2798
2934
|
inline operator const WGPUSharedFenceDXGISharedHandleExportInfo&() const noexcept;
|
|
2799
2935
|
|
|
2800
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2936
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2801
2937
|
alignas(kFirstMemberAlignment) void * handle;
|
|
2802
2938
|
};
|
|
2803
2939
|
|
|
@@ -2809,7 +2945,7 @@ struct SharedFenceEGLSyncDescriptor : ChainedStruct {
|
|
|
2809
2945
|
inline SharedFenceEGLSyncDescriptor(Init&& init);
|
|
2810
2946
|
inline operator const WGPUSharedFenceEGLSyncDescriptor&() const noexcept;
|
|
2811
2947
|
|
|
2812
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2948
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2813
2949
|
alignas(kFirstMemberAlignment) void * sync;
|
|
2814
2950
|
};
|
|
2815
2951
|
|
|
@@ -2821,7 +2957,7 @@ struct SharedFenceEGLSyncExportInfo : ChainedStructOut {
|
|
|
2821
2957
|
inline SharedFenceEGLSyncExportInfo(Init&& init);
|
|
2822
2958
|
inline operator const WGPUSharedFenceEGLSyncExportInfo&() const noexcept;
|
|
2823
2959
|
|
|
2824
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2960
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2825
2961
|
alignas(kFirstMemberAlignment) void * sync;
|
|
2826
2962
|
};
|
|
2827
2963
|
|
|
@@ -2833,7 +2969,7 @@ struct SharedFenceMTLSharedEventDescriptor : ChainedStruct {
|
|
|
2833
2969
|
inline SharedFenceMTLSharedEventDescriptor(Init&& init);
|
|
2834
2970
|
inline operator const WGPUSharedFenceMTLSharedEventDescriptor&() const noexcept;
|
|
2835
2971
|
|
|
2836
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2972
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2837
2973
|
alignas(kFirstMemberAlignment) void * sharedEvent;
|
|
2838
2974
|
};
|
|
2839
2975
|
|
|
@@ -2845,7 +2981,7 @@ struct SharedFenceMTLSharedEventExportInfo : ChainedStructOut {
|
|
|
2845
2981
|
inline SharedFenceMTLSharedEventExportInfo(Init&& init);
|
|
2846
2982
|
inline operator const WGPUSharedFenceMTLSharedEventExportInfo&() const noexcept;
|
|
2847
2983
|
|
|
2848
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
2984
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2849
2985
|
alignas(kFirstMemberAlignment) void * sharedEvent;
|
|
2850
2986
|
};
|
|
2851
2987
|
|
|
@@ -2857,7 +2993,7 @@ struct SharedFenceSyncFDDescriptor : ChainedStruct {
|
|
|
2857
2993
|
inline SharedFenceSyncFDDescriptor(Init&& init);
|
|
2858
2994
|
inline operator const WGPUSharedFenceSyncFDDescriptor&() const noexcept;
|
|
2859
2995
|
|
|
2860
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int
|
|
2996
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int));
|
|
2861
2997
|
alignas(kFirstMemberAlignment) int handle;
|
|
2862
2998
|
};
|
|
2863
2999
|
|
|
@@ -2869,7 +3005,7 @@ struct SharedFenceSyncFDExportInfo : ChainedStructOut {
|
|
|
2869
3005
|
inline SharedFenceSyncFDExportInfo(Init&& init);
|
|
2870
3006
|
inline operator const WGPUSharedFenceSyncFDExportInfo&() const noexcept;
|
|
2871
3007
|
|
|
2872
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int
|
|
3008
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int));
|
|
2873
3009
|
alignas(kFirstMemberAlignment) int handle;
|
|
2874
3010
|
};
|
|
2875
3011
|
|
|
@@ -2881,7 +3017,7 @@ struct SharedFenceVkSemaphoreOpaqueFDDescriptor : ChainedStruct {
|
|
|
2881
3017
|
inline SharedFenceVkSemaphoreOpaqueFDDescriptor(Init&& init);
|
|
2882
3018
|
inline operator const WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor&() const noexcept;
|
|
2883
3019
|
|
|
2884
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int
|
|
3020
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int));
|
|
2885
3021
|
alignas(kFirstMemberAlignment) int handle;
|
|
2886
3022
|
};
|
|
2887
3023
|
|
|
@@ -2893,7 +3029,7 @@ struct SharedFenceVkSemaphoreOpaqueFDExportInfo : ChainedStructOut {
|
|
|
2893
3029
|
inline SharedFenceVkSemaphoreOpaqueFDExportInfo(Init&& init);
|
|
2894
3030
|
inline operator const WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo&() const noexcept;
|
|
2895
3031
|
|
|
2896
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int
|
|
3032
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int));
|
|
2897
3033
|
alignas(kFirstMemberAlignment) int handle;
|
|
2898
3034
|
};
|
|
2899
3035
|
|
|
@@ -2905,7 +3041,7 @@ struct SharedFenceVkSemaphoreZirconHandleDescriptor : ChainedStruct {
|
|
|
2905
3041
|
inline SharedFenceVkSemaphoreZirconHandleDescriptor(Init&& init);
|
|
2906
3042
|
inline operator const WGPUSharedFenceVkSemaphoreZirconHandleDescriptor&() const noexcept;
|
|
2907
3043
|
|
|
2908
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
3044
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2909
3045
|
alignas(kFirstMemberAlignment) uint32_t handle;
|
|
2910
3046
|
};
|
|
2911
3047
|
|
|
@@ -2917,7 +3053,7 @@ struct SharedFenceVkSemaphoreZirconHandleExportInfo : ChainedStructOut {
|
|
|
2917
3053
|
inline SharedFenceVkSemaphoreZirconHandleExportInfo(Init&& init);
|
|
2918
3054
|
inline operator const WGPUSharedFenceVkSemaphoreZirconHandleExportInfo&() const noexcept;
|
|
2919
3055
|
|
|
2920
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
3056
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
2921
3057
|
alignas(kFirstMemberAlignment) uint32_t handle;
|
|
2922
3058
|
};
|
|
2923
3059
|
|
|
@@ -2929,11 +3065,23 @@ struct SharedTextureMemoryAHardwareBufferDescriptor : ChainedStruct {
|
|
|
2929
3065
|
inline SharedTextureMemoryAHardwareBufferDescriptor(Init&& init);
|
|
2930
3066
|
inline operator const WGPUSharedTextureMemoryAHardwareBufferDescriptor&() const noexcept;
|
|
2931
3067
|
|
|
2932
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3068
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2933
3069
|
alignas(kFirstMemberAlignment) void * handle;
|
|
2934
3070
|
Bool useExternalFormat;
|
|
2935
3071
|
};
|
|
2936
3072
|
|
|
3073
|
+
// Can be chained in SharedTextureMemoryBeginAccessDescriptor
|
|
3074
|
+
struct SharedTextureMemoryD3D11BeginState : ChainedStruct {
|
|
3075
|
+
inline SharedTextureMemoryD3D11BeginState();
|
|
3076
|
+
|
|
3077
|
+
struct Init;
|
|
3078
|
+
inline SharedTextureMemoryD3D11BeginState(Init&& init);
|
|
3079
|
+
inline operator const WGPUSharedTextureMemoryD3D11BeginState&() const noexcept;
|
|
3080
|
+
|
|
3081
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
3082
|
+
alignas(kFirstMemberAlignment) Bool requiresEndAccessFence = true;
|
|
3083
|
+
};
|
|
3084
|
+
|
|
2937
3085
|
// Can be chained in SharedTextureMemoryBeginAccessDescriptor
|
|
2938
3086
|
struct SharedTextureMemoryD3DSwapchainBeginState : ChainedStruct {
|
|
2939
3087
|
inline SharedTextureMemoryD3DSwapchainBeginState();
|
|
@@ -2942,7 +3090,7 @@ struct SharedTextureMemoryD3DSwapchainBeginState : ChainedStruct {
|
|
|
2942
3090
|
inline SharedTextureMemoryD3DSwapchainBeginState(Init&& init);
|
|
2943
3091
|
inline operator const WGPUSharedTextureMemoryD3DSwapchainBeginState&() const noexcept;
|
|
2944
3092
|
|
|
2945
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
3093
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
2946
3094
|
alignas(kFirstMemberAlignment) Bool isSwapchain = false;
|
|
2947
3095
|
};
|
|
2948
3096
|
|
|
@@ -2962,7 +3110,7 @@ struct SharedTextureMemoryDXGISharedHandleDescriptor : ChainedStruct {
|
|
|
2962
3110
|
inline SharedTextureMemoryDXGISharedHandleDescriptor(Init&& init);
|
|
2963
3111
|
inline operator const WGPUSharedTextureMemoryDXGISharedHandleDescriptor&() const noexcept;
|
|
2964
3112
|
|
|
2965
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3113
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2966
3114
|
alignas(kFirstMemberAlignment) void * handle;
|
|
2967
3115
|
Bool useKeyedMutex;
|
|
2968
3116
|
};
|
|
@@ -2975,7 +3123,7 @@ struct SharedTextureMemoryEGLImageDescriptor : ChainedStruct {
|
|
|
2975
3123
|
inline SharedTextureMemoryEGLImageDescriptor(Init&& init);
|
|
2976
3124
|
inline operator const WGPUSharedTextureMemoryEGLImageDescriptor&() const noexcept;
|
|
2977
3125
|
|
|
2978
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3126
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2979
3127
|
alignas(kFirstMemberAlignment) void * image;
|
|
2980
3128
|
};
|
|
2981
3129
|
|
|
@@ -2987,7 +3135,7 @@ struct SharedTextureMemoryIOSurfaceDescriptor : ChainedStruct {
|
|
|
2987
3135
|
inline SharedTextureMemoryIOSurfaceDescriptor(Init&& init);
|
|
2988
3136
|
inline operator const WGPUSharedTextureMemoryIOSurfaceDescriptor&() const noexcept;
|
|
2989
3137
|
|
|
2990
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3138
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
2991
3139
|
alignas(kFirstMemberAlignment) void * ioSurface;
|
|
2992
3140
|
Bool allowStorageBinding = true;
|
|
2993
3141
|
};
|
|
@@ -3000,7 +3148,7 @@ struct SharedTextureMemoryOpaqueFDDescriptor : ChainedStruct {
|
|
|
3000
3148
|
inline SharedTextureMemoryOpaqueFDDescriptor(Init&& init);
|
|
3001
3149
|
inline operator const WGPUSharedTextureMemoryOpaqueFDDescriptor&() const noexcept;
|
|
3002
3150
|
|
|
3003
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void const *
|
|
3151
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void const *));
|
|
3004
3152
|
alignas(kFirstMemberAlignment) void const * vkImageCreateInfo;
|
|
3005
3153
|
int memoryFD;
|
|
3006
3154
|
uint32_t memoryTypeIndex;
|
|
@@ -3016,7 +3164,7 @@ struct SharedTextureMemoryVkDedicatedAllocationDescriptor : ChainedStruct {
|
|
|
3016
3164
|
inline SharedTextureMemoryVkDedicatedAllocationDescriptor(Init&& init);
|
|
3017
3165
|
inline operator const WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor&() const noexcept;
|
|
3018
3166
|
|
|
3019
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool
|
|
3167
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
|
|
3020
3168
|
alignas(kFirstMemberAlignment) Bool dedicatedAllocation;
|
|
3021
3169
|
};
|
|
3022
3170
|
|
|
@@ -3028,7 +3176,7 @@ struct SharedTextureMemoryVkImageLayoutBeginState : ChainedStruct {
|
|
|
3028
3176
|
inline SharedTextureMemoryVkImageLayoutBeginState(Init&& init);
|
|
3029
3177
|
inline operator const WGPUSharedTextureMemoryVkImageLayoutBeginState&() const noexcept;
|
|
3030
3178
|
|
|
3031
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int32_t
|
|
3179
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int32_t));
|
|
3032
3180
|
alignas(kFirstMemberAlignment) int32_t oldLayout;
|
|
3033
3181
|
int32_t newLayout;
|
|
3034
3182
|
};
|
|
@@ -3041,7 +3189,7 @@ struct SharedTextureMemoryVkImageLayoutEndState : ChainedStructOut {
|
|
|
3041
3189
|
inline SharedTextureMemoryVkImageLayoutEndState(Init&& init);
|
|
3042
3190
|
inline operator const WGPUSharedTextureMemoryVkImageLayoutEndState&() const noexcept;
|
|
3043
3191
|
|
|
3044
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int32_t
|
|
3192
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(int32_t));
|
|
3045
3193
|
alignas(kFirstMemberAlignment) int32_t oldLayout;
|
|
3046
3194
|
int32_t newLayout;
|
|
3047
3195
|
};
|
|
@@ -3054,7 +3202,7 @@ struct SharedTextureMemoryZirconHandleDescriptor : ChainedStruct {
|
|
|
3054
3202
|
inline SharedTextureMemoryZirconHandleDescriptor(Init&& init);
|
|
3055
3203
|
inline operator const WGPUSharedTextureMemoryZirconHandleDescriptor&() const noexcept;
|
|
3056
3204
|
|
|
3057
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
3205
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
3058
3206
|
alignas(kFirstMemberAlignment) uint32_t memoryFD;
|
|
3059
3207
|
uint64_t allocationSize;
|
|
3060
3208
|
};
|
|
@@ -3067,7 +3215,7 @@ struct StaticSamplerBindingLayout : ChainedStruct {
|
|
|
3067
3215
|
inline StaticSamplerBindingLayout(Init&& init);
|
|
3068
3216
|
inline operator const WGPUStaticSamplerBindingLayout&() const noexcept;
|
|
3069
3217
|
|
|
3070
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Sampler
|
|
3218
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Sampler));
|
|
3071
3219
|
alignas(kFirstMemberAlignment) Sampler sampler = nullptr;
|
|
3072
3220
|
uint32_t sampledTextureBinding = kLimitU32Undefined;
|
|
3073
3221
|
};
|
|
@@ -3117,6 +3265,23 @@ struct SupportedFeatures {
|
|
|
3117
3265
|
static inline void Reset(SupportedFeatures& value);
|
|
3118
3266
|
};
|
|
3119
3267
|
|
|
3268
|
+
struct SupportedInstanceFeatures {
|
|
3269
|
+
inline SupportedInstanceFeatures();
|
|
3270
|
+
inline ~SupportedInstanceFeatures();
|
|
3271
|
+
SupportedInstanceFeatures(const SupportedInstanceFeatures&) = delete;
|
|
3272
|
+
SupportedInstanceFeatures& operator=(const SupportedInstanceFeatures&) = delete;
|
|
3273
|
+
inline SupportedInstanceFeatures(SupportedInstanceFeatures&&);
|
|
3274
|
+
inline SupportedInstanceFeatures& operator=(SupportedInstanceFeatures&&);
|
|
3275
|
+
inline operator const WGPUSupportedInstanceFeatures&() const noexcept;
|
|
3276
|
+
|
|
3277
|
+
size_t const featureCount = {};
|
|
3278
|
+
InstanceFeatureName const * const features = nullptr;
|
|
3279
|
+
|
|
3280
|
+
private:
|
|
3281
|
+
inline void FreeMembers();
|
|
3282
|
+
static inline void Reset(SupportedInstanceFeatures& value);
|
|
3283
|
+
};
|
|
3284
|
+
|
|
3120
3285
|
struct SupportedWGSLLanguageFeatures {
|
|
3121
3286
|
inline SupportedWGSLLanguageFeatures();
|
|
3122
3287
|
inline ~SupportedWGSLLanguageFeatures();
|
|
@@ -3165,7 +3330,7 @@ struct SurfaceColorManagement : ChainedStruct {
|
|
|
3165
3330
|
inline SurfaceColorManagement(Init&& init);
|
|
3166
3331
|
inline operator const WGPUSurfaceColorManagement&() const noexcept;
|
|
3167
3332
|
|
|
3168
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(PredefinedColorSpace
|
|
3333
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(PredefinedColorSpace));
|
|
3169
3334
|
alignas(kFirstMemberAlignment) PredefinedColorSpace colorSpace = {};
|
|
3170
3335
|
ToneMappingMode toneMappingMode = {};
|
|
3171
3336
|
};
|
|
@@ -3193,7 +3358,7 @@ struct SurfaceDescriptorFromWindowsCoreWindow : ChainedStruct {
|
|
|
3193
3358
|
inline SurfaceDescriptorFromWindowsCoreWindow(Init&& init);
|
|
3194
3359
|
inline operator const WGPUSurfaceDescriptorFromWindowsCoreWindow&() const noexcept;
|
|
3195
3360
|
|
|
3196
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3361
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3197
3362
|
alignas(kFirstMemberAlignment) void * coreWindow = nullptr;
|
|
3198
3363
|
};
|
|
3199
3364
|
|
|
@@ -3205,7 +3370,7 @@ struct SurfaceDescriptorFromWindowsUWPSwapChainPanel : ChainedStruct {
|
|
|
3205
3370
|
inline SurfaceDescriptorFromWindowsUWPSwapChainPanel(Init&& init);
|
|
3206
3371
|
inline operator const WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel&() const noexcept;
|
|
3207
3372
|
|
|
3208
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3373
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3209
3374
|
alignas(kFirstMemberAlignment) void * swapChainPanel = nullptr;
|
|
3210
3375
|
};
|
|
3211
3376
|
|
|
@@ -3217,7 +3382,7 @@ struct SurfaceDescriptorFromWindowsWinUISwapChainPanel : ChainedStruct {
|
|
|
3217
3382
|
inline SurfaceDescriptorFromWindowsWinUISwapChainPanel(Init&& init);
|
|
3218
3383
|
inline operator const WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel&() const noexcept;
|
|
3219
3384
|
|
|
3220
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3385
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3221
3386
|
alignas(kFirstMemberAlignment) void * swapChainPanel = nullptr;
|
|
3222
3387
|
};
|
|
3223
3388
|
|
|
@@ -3229,7 +3394,7 @@ struct SurfaceSourceAndroidNativeWindow : ChainedStruct {
|
|
|
3229
3394
|
inline SurfaceSourceAndroidNativeWindow(Init&& init);
|
|
3230
3395
|
inline operator const WGPUSurfaceSourceAndroidNativeWindow&() const noexcept;
|
|
3231
3396
|
|
|
3232
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3397
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3233
3398
|
alignas(kFirstMemberAlignment) void * window;
|
|
3234
3399
|
};
|
|
3235
3400
|
|
|
@@ -3241,7 +3406,7 @@ struct SurfaceSourceMetalLayer : ChainedStruct {
|
|
|
3241
3406
|
inline SurfaceSourceMetalLayer(Init&& init);
|
|
3242
3407
|
inline operator const WGPUSurfaceSourceMetalLayer&() const noexcept;
|
|
3243
3408
|
|
|
3244
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3409
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3245
3410
|
alignas(kFirstMemberAlignment) void * layer = nullptr;
|
|
3246
3411
|
};
|
|
3247
3412
|
|
|
@@ -3253,7 +3418,7 @@ struct SurfaceSourceWaylandSurface : ChainedStruct {
|
|
|
3253
3418
|
inline SurfaceSourceWaylandSurface(Init&& init);
|
|
3254
3419
|
inline operator const WGPUSurfaceSourceWaylandSurface&() const noexcept;
|
|
3255
3420
|
|
|
3256
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3421
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3257
3422
|
alignas(kFirstMemberAlignment) void * display = nullptr;
|
|
3258
3423
|
void * surface = nullptr;
|
|
3259
3424
|
};
|
|
@@ -3266,7 +3431,7 @@ struct SurfaceSourceWindowsHWND : ChainedStruct {
|
|
|
3266
3431
|
inline SurfaceSourceWindowsHWND(Init&& init);
|
|
3267
3432
|
inline operator const WGPUSurfaceSourceWindowsHWND&() const noexcept;
|
|
3268
3433
|
|
|
3269
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3434
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3270
3435
|
alignas(kFirstMemberAlignment) void * hinstance = nullptr;
|
|
3271
3436
|
void * hwnd = nullptr;
|
|
3272
3437
|
};
|
|
@@ -3279,7 +3444,7 @@ struct SurfaceSourceXCBWindow : ChainedStruct {
|
|
|
3279
3444
|
inline SurfaceSourceXCBWindow(Init&& init);
|
|
3280
3445
|
inline operator const WGPUSurfaceSourceXCBWindow&() const noexcept;
|
|
3281
3446
|
|
|
3282
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3447
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3283
3448
|
alignas(kFirstMemberAlignment) void * connection = nullptr;
|
|
3284
3449
|
uint32_t window;
|
|
3285
3450
|
};
|
|
@@ -3292,7 +3457,7 @@ struct SurfaceSourceXlibWindow : ChainedStruct {
|
|
|
3292
3457
|
inline SurfaceSourceXlibWindow(Init&& init);
|
|
3293
3458
|
inline operator const WGPUSurfaceSourceXlibWindow&() const noexcept;
|
|
3294
3459
|
|
|
3295
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *
|
|
3460
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
|
|
3296
3461
|
alignas(kFirstMemberAlignment) void * display = nullptr;
|
|
3297
3462
|
uint64_t window;
|
|
3298
3463
|
};
|
|
@@ -3305,6 +3470,41 @@ struct SurfaceTexture {
|
|
|
3305
3470
|
SurfaceGetCurrentTextureStatus status = {};
|
|
3306
3471
|
};
|
|
3307
3472
|
|
|
3473
|
+
// Can be chained in BindGroupEntry
|
|
3474
|
+
struct TexelBufferBindingEntry : ChainedStruct {
|
|
3475
|
+
inline TexelBufferBindingEntry();
|
|
3476
|
+
|
|
3477
|
+
struct Init;
|
|
3478
|
+
inline TexelBufferBindingEntry(Init&& init);
|
|
3479
|
+
inline operator const WGPUTexelBufferBindingEntry&() const noexcept;
|
|
3480
|
+
|
|
3481
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TexelBufferView));
|
|
3482
|
+
alignas(kFirstMemberAlignment) TexelBufferView texelBufferView = nullptr;
|
|
3483
|
+
};
|
|
3484
|
+
|
|
3485
|
+
// Can be chained in BindGroupLayoutEntry
|
|
3486
|
+
struct TexelBufferBindingLayout : ChainedStruct {
|
|
3487
|
+
inline TexelBufferBindingLayout();
|
|
3488
|
+
|
|
3489
|
+
struct Init;
|
|
3490
|
+
inline TexelBufferBindingLayout(Init&& init);
|
|
3491
|
+
inline operator const WGPUTexelBufferBindingLayout&() const noexcept;
|
|
3492
|
+
|
|
3493
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TexelBufferAccess));
|
|
3494
|
+
alignas(kFirstMemberAlignment) TexelBufferAccess access = TexelBufferAccess::Undefined;
|
|
3495
|
+
TextureFormat format = TextureFormat::Undefined;
|
|
3496
|
+
};
|
|
3497
|
+
|
|
3498
|
+
struct TexelBufferViewDescriptor {
|
|
3499
|
+
inline operator const WGPUTexelBufferViewDescriptor&() const noexcept;
|
|
3500
|
+
|
|
3501
|
+
ChainedStruct const * nextInChain = nullptr;
|
|
3502
|
+
StringView label = {};
|
|
3503
|
+
TextureFormat format = TextureFormat::Undefined;
|
|
3504
|
+
uint64_t offset = 0;
|
|
3505
|
+
uint64_t size = kWholeSize;
|
|
3506
|
+
};
|
|
3507
|
+
|
|
3308
3508
|
struct TexelCopyBufferLayout {
|
|
3309
3509
|
inline operator const WGPUTexelCopyBufferLayout&() const noexcept;
|
|
3310
3510
|
|
|
@@ -3330,10 +3530,19 @@ struct TextureBindingViewDimensionDescriptor : ChainedStruct {
|
|
|
3330
3530
|
inline TextureBindingViewDimensionDescriptor(Init&& init);
|
|
3331
3531
|
inline operator const WGPUTextureBindingViewDimensionDescriptor&() const noexcept;
|
|
3332
3532
|
|
|
3333
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TextureViewDimension
|
|
3533
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TextureViewDimension));
|
|
3334
3534
|
alignas(kFirstMemberAlignment) TextureViewDimension textureBindingViewDimension = TextureViewDimension::Undefined;
|
|
3335
3535
|
};
|
|
3336
3536
|
|
|
3537
|
+
struct TextureComponentSwizzle {
|
|
3538
|
+
inline operator const WGPUTextureComponentSwizzle&() const noexcept;
|
|
3539
|
+
|
|
3540
|
+
ComponentSwizzle r = ComponentSwizzle::Undefined;
|
|
3541
|
+
ComponentSwizzle g = ComponentSwizzle::Undefined;
|
|
3542
|
+
ComponentSwizzle b = ComponentSwizzle::Undefined;
|
|
3543
|
+
ComponentSwizzle a = ComponentSwizzle::Undefined;
|
|
3544
|
+
};
|
|
3545
|
+
|
|
3337
3546
|
struct VertexAttribute {
|
|
3338
3547
|
inline operator const WGPUVertexAttribute&() const noexcept;
|
|
3339
3548
|
|
|
@@ -3352,7 +3561,7 @@ struct YCbCrVkDescriptor : ChainedStruct {
|
|
|
3352
3561
|
inline YCbCrVkDescriptor(Init&& init);
|
|
3353
3562
|
inline operator const WGPUYCbCrVkDescriptor&() const noexcept;
|
|
3354
3563
|
|
|
3355
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t
|
|
3564
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
|
|
3356
3565
|
alignas(kFirstMemberAlignment) uint32_t vkFormat = 0;
|
|
3357
3566
|
uint32_t vkYCbCrModel = 0;
|
|
3358
3567
|
uint32_t vkYCbCrRange = 0;
|
|
@@ -3380,7 +3589,7 @@ struct AdapterPropertiesMemoryHeaps : ChainedStructOut {
|
|
|
3380
3589
|
inline AdapterPropertiesMemoryHeaps& operator=(AdapterPropertiesMemoryHeaps&&);
|
|
3381
3590
|
inline operator const WGPUAdapterPropertiesMemoryHeaps&() const noexcept;
|
|
3382
3591
|
|
|
3383
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t
|
|
3592
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t));
|
|
3384
3593
|
alignas(kFirstMemberAlignment) size_t const heapCount = {};
|
|
3385
3594
|
MemoryHeapInfo const * const heapInfo = nullptr;
|
|
3386
3595
|
|
|
@@ -3402,7 +3611,7 @@ struct AdapterPropertiesSubgroupMatrixConfigs : ChainedStructOut {
|
|
|
3402
3611
|
inline AdapterPropertiesSubgroupMatrixConfigs& operator=(AdapterPropertiesSubgroupMatrixConfigs&&);
|
|
3403
3612
|
inline operator const WGPUAdapterPropertiesSubgroupMatrixConfigs&() const noexcept;
|
|
3404
3613
|
|
|
3405
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t
|
|
3614
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t));
|
|
3406
3615
|
alignas(kFirstMemberAlignment) size_t const configCount = {};
|
|
3407
3616
|
SubgroupMatrixConfig const * const configs = nullptr;
|
|
3408
3617
|
|
|
@@ -3429,6 +3638,18 @@ struct BindGroupEntry {
|
|
|
3429
3638
|
TextureView textureView = nullptr;
|
|
3430
3639
|
};
|
|
3431
3640
|
|
|
3641
|
+
// Can be chained in BindGroupLayoutDescriptor
|
|
3642
|
+
struct BindGroupLayoutDynamicBindingArray : ChainedStruct {
|
|
3643
|
+
inline BindGroupLayoutDynamicBindingArray();
|
|
3644
|
+
|
|
3645
|
+
struct Init;
|
|
3646
|
+
inline BindGroupLayoutDynamicBindingArray(Init&& init);
|
|
3647
|
+
inline operator const WGPUBindGroupLayoutDynamicBindingArray&() const noexcept;
|
|
3648
|
+
|
|
3649
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(DynamicBindingArrayLayout));
|
|
3650
|
+
alignas(kFirstMemberAlignment) DynamicBindingArrayLayout dynamicArray = {};
|
|
3651
|
+
};
|
|
3652
|
+
|
|
3432
3653
|
struct BindGroupLayoutEntry {
|
|
3433
3654
|
inline operator const WGPUBindGroupLayoutEntry&() const noexcept;
|
|
3434
3655
|
|
|
@@ -3509,7 +3730,7 @@ struct DawnDrmFormatCapabilities : ChainedStructOut {
|
|
|
3509
3730
|
inline DawnDrmFormatCapabilities& operator=(DawnDrmFormatCapabilities&&);
|
|
3510
3731
|
inline operator const WGPUDawnDrmFormatCapabilities&() const noexcept;
|
|
3511
3732
|
|
|
3512
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t
|
|
3733
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(size_t));
|
|
3513
3734
|
alignas(kFirstMemberAlignment) size_t const propertiesCount = {};
|
|
3514
3735
|
DawnDrmFormatProperties const * const properties = nullptr;
|
|
3515
3736
|
|
|
@@ -3530,8 +3751,8 @@ struct DepthStencilState {
|
|
|
3530
3751
|
uint32_t stencilReadMask = 0xFFFFFFFF;
|
|
3531
3752
|
uint32_t stencilWriteMask = 0xFFFFFFFF;
|
|
3532
3753
|
int32_t depthBias = 0;
|
|
3533
|
-
float depthBiasSlopeScale = 0.
|
|
3534
|
-
float depthBiasClamp = 0.
|
|
3754
|
+
float depthBiasSlopeScale = 0.f;
|
|
3755
|
+
float depthBiasClamp = 0.f;
|
|
3535
3756
|
};
|
|
3536
3757
|
|
|
3537
3758
|
struct ExternalTextureDescriptor {
|
|
@@ -3573,7 +3794,9 @@ struct InstanceDescriptor {
|
|
|
3573
3794
|
inline operator const WGPUInstanceDescriptor&() const noexcept;
|
|
3574
3795
|
|
|
3575
3796
|
ChainedStruct const * nextInChain = nullptr;
|
|
3576
|
-
|
|
3797
|
+
size_t requiredFeatureCount = 0;
|
|
3798
|
+
InstanceFeatureName const * requiredFeatures = nullptr;
|
|
3799
|
+
InstanceLimits const * requiredLimits = nullptr;
|
|
3577
3800
|
};
|
|
3578
3801
|
|
|
3579
3802
|
struct Limits {
|
|
@@ -3612,10 +3835,6 @@ struct Limits {
|
|
|
3612
3835
|
uint32_t maxComputeWorkgroupSizeZ = kLimitU32Undefined;
|
|
3613
3836
|
uint32_t maxComputeWorkgroupsPerDimension = kLimitU32Undefined;
|
|
3614
3837
|
uint32_t maxImmediateSize = kLimitU32Undefined;
|
|
3615
|
-
uint32_t maxStorageBuffersInVertexStage = kLimitU32Undefined;
|
|
3616
|
-
uint32_t maxStorageTexturesInVertexStage = kLimitU32Undefined;
|
|
3617
|
-
uint32_t maxStorageBuffersInFragmentStage = kLimitU32Undefined;
|
|
3618
|
-
uint32_t maxStorageTexturesInFragmentStage = kLimitU32Undefined;
|
|
3619
3838
|
};
|
|
3620
3839
|
|
|
3621
3840
|
// Can be chained in PipelineLayoutDescriptor
|
|
@@ -3626,7 +3845,7 @@ struct PipelineLayoutPixelLocalStorage : ChainedStruct {
|
|
|
3626
3845
|
inline PipelineLayoutPixelLocalStorage(Init&& init);
|
|
3627
3846
|
inline operator const WGPUPipelineLayoutPixelLocalStorage&() const noexcept;
|
|
3628
3847
|
|
|
3629
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t
|
|
3848
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t));
|
|
3630
3849
|
alignas(kFirstMemberAlignment) uint64_t totalPixelLocalStorageSize;
|
|
3631
3850
|
size_t storageAttachmentCount = 0;
|
|
3632
3851
|
PipelineLayoutStorageAttachment const * storageAttachments = nullptr;
|
|
@@ -3677,8 +3896,8 @@ struct SamplerDescriptor {
|
|
|
3677
3896
|
FilterMode magFilter = FilterMode::Undefined;
|
|
3678
3897
|
FilterMode minFilter = FilterMode::Undefined;
|
|
3679
3898
|
MipmapFilterMode mipmapFilter = MipmapFilterMode::Undefined;
|
|
3680
|
-
float lodMinClamp = 0.
|
|
3681
|
-
float lodMaxClamp = 32.
|
|
3899
|
+
float lodMinClamp = 0.f;
|
|
3900
|
+
float lodMaxClamp = 32.f;
|
|
3682
3901
|
CompareFunction compare = CompareFunction::Undefined;
|
|
3683
3902
|
uint16_t maxAnisotropy = 1;
|
|
3684
3903
|
};
|
|
@@ -3712,7 +3931,7 @@ struct SharedTextureMemoryAHardwareBufferProperties : ChainedStructOut {
|
|
|
3712
3931
|
inline SharedTextureMemoryAHardwareBufferProperties(Init&& init);
|
|
3713
3932
|
inline operator const WGPUSharedTextureMemoryAHardwareBufferProperties&() const noexcept;
|
|
3714
3933
|
|
|
3715
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(YCbCrVkDescriptor
|
|
3934
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(YCbCrVkDescriptor));
|
|
3716
3935
|
alignas(kFirstMemberAlignment) YCbCrVkDescriptor yCbCrInfo = {};
|
|
3717
3936
|
};
|
|
3718
3937
|
|
|
@@ -3735,7 +3954,7 @@ struct SharedTextureMemoryDmaBufDescriptor : ChainedStruct {
|
|
|
3735
3954
|
inline SharedTextureMemoryDmaBufDescriptor(Init&& init);
|
|
3736
3955
|
inline operator const WGPUSharedTextureMemoryDmaBufDescriptor&() const noexcept;
|
|
3737
3956
|
|
|
3738
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Extent3D
|
|
3957
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Extent3D));
|
|
3739
3958
|
alignas(kFirstMemberAlignment) Extent3D size = {};
|
|
3740
3959
|
uint32_t drmFormat;
|
|
3741
3960
|
uint64_t drmModifier;
|
|
@@ -3786,6 +4005,18 @@ struct TexelCopyTextureInfo {
|
|
|
3786
4005
|
TextureAspect aspect = TextureAspect::Undefined;
|
|
3787
4006
|
};
|
|
3788
4007
|
|
|
4008
|
+
// Can be chained in TextureViewDescriptor
|
|
4009
|
+
struct TextureComponentSwizzleDescriptor : ChainedStruct {
|
|
4010
|
+
inline TextureComponentSwizzleDescriptor();
|
|
4011
|
+
|
|
4012
|
+
struct Init;
|
|
4013
|
+
inline TextureComponentSwizzleDescriptor(Init&& init);
|
|
4014
|
+
inline operator const WGPUTextureComponentSwizzleDescriptor&() const noexcept;
|
|
4015
|
+
|
|
4016
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TextureComponentSwizzle));
|
|
4017
|
+
alignas(kFirstMemberAlignment) TextureComponentSwizzle swizzle = {};
|
|
4018
|
+
};
|
|
4019
|
+
|
|
3789
4020
|
struct TextureDescriptor {
|
|
3790
4021
|
inline operator const WGPUTextureDescriptor&() const noexcept;
|
|
3791
4022
|
|
|
@@ -3801,21 +4032,6 @@ struct TextureDescriptor {
|
|
|
3801
4032
|
TextureFormat const * viewFormats = nullptr;
|
|
3802
4033
|
};
|
|
3803
4034
|
|
|
3804
|
-
struct TextureViewDescriptor {
|
|
3805
|
-
inline operator const WGPUTextureViewDescriptor&() const noexcept;
|
|
3806
|
-
|
|
3807
|
-
ChainedStruct const * nextInChain = nullptr;
|
|
3808
|
-
StringView label = {};
|
|
3809
|
-
TextureFormat format = TextureFormat::Undefined;
|
|
3810
|
-
TextureViewDimension dimension = TextureViewDimension::Undefined;
|
|
3811
|
-
uint32_t baseMipLevel = 0;
|
|
3812
|
-
uint32_t mipLevelCount = kMipLevelCountUndefined;
|
|
3813
|
-
uint32_t baseArrayLayer = 0;
|
|
3814
|
-
uint32_t arrayLayerCount = kArrayLayerCountUndefined;
|
|
3815
|
-
TextureAspect aspect = TextureAspect::Undefined;
|
|
3816
|
-
TextureUsage usage = TextureUsage::None;
|
|
3817
|
-
};
|
|
3818
|
-
|
|
3819
4035
|
struct VertexBufferLayout {
|
|
3820
4036
|
inline operator const WGPUVertexBufferLayout&() const noexcept;
|
|
3821
4037
|
|
|
@@ -3858,7 +4074,7 @@ struct BindGroupDescriptor {
|
|
|
3858
4074
|
ChainedStruct const * nextInChain = nullptr;
|
|
3859
4075
|
StringView label = {};
|
|
3860
4076
|
BindGroupLayout layout = nullptr;
|
|
3861
|
-
size_t entryCount;
|
|
4077
|
+
size_t entryCount = 0;
|
|
3862
4078
|
BindGroupEntry const * entries = nullptr;
|
|
3863
4079
|
};
|
|
3864
4080
|
|
|
@@ -3867,7 +4083,7 @@ struct BindGroupLayoutDescriptor {
|
|
|
3867
4083
|
|
|
3868
4084
|
ChainedStruct const * nextInChain = nullptr;
|
|
3869
4085
|
StringView label = {};
|
|
3870
|
-
size_t entryCount;
|
|
4086
|
+
size_t entryCount = 0;
|
|
3871
4087
|
BindGroupLayoutEntry const * entries = nullptr;
|
|
3872
4088
|
};
|
|
3873
4089
|
|
|
@@ -3921,7 +4137,7 @@ struct RenderPassPixelLocalStorage : ChainedStruct {
|
|
|
3921
4137
|
inline RenderPassPixelLocalStorage(Init&& init);
|
|
3922
4138
|
inline operator const WGPURenderPassPixelLocalStorage&() const noexcept;
|
|
3923
4139
|
|
|
3924
|
-
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t
|
|
4140
|
+
static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint64_t));
|
|
3925
4141
|
alignas(kFirstMemberAlignment) uint64_t totalPixelLocalStorageSize;
|
|
3926
4142
|
size_t storageAttachmentCount = 0;
|
|
3927
4143
|
RenderPassStorageAttachment const * storageAttachments = nullptr;
|
|
@@ -3943,6 +4159,21 @@ struct SharedTextureMemoryProperties {
|
|
|
3943
4159
|
TextureFormat format = TextureFormat::Undefined;
|
|
3944
4160
|
};
|
|
3945
4161
|
|
|
4162
|
+
struct TextureViewDescriptor {
|
|
4163
|
+
inline operator const WGPUTextureViewDescriptor&() const noexcept;
|
|
4164
|
+
|
|
4165
|
+
ChainedStruct const * nextInChain = nullptr;
|
|
4166
|
+
StringView label = {};
|
|
4167
|
+
TextureFormat format = TextureFormat::Undefined;
|
|
4168
|
+
TextureViewDimension dimension = TextureViewDimension::Undefined;
|
|
4169
|
+
uint32_t baseMipLevel = 0;
|
|
4170
|
+
uint32_t mipLevelCount = kMipLevelCountUndefined;
|
|
4171
|
+
uint32_t baseArrayLayer = 0;
|
|
4172
|
+
uint32_t arrayLayerCount = kArrayLayerCountUndefined;
|
|
4173
|
+
TextureAspect aspect = TextureAspect::Undefined;
|
|
4174
|
+
TextureUsage usage = TextureUsage::None;
|
|
4175
|
+
};
|
|
4176
|
+
|
|
3946
4177
|
struct VertexState {
|
|
3947
4178
|
inline operator const WGPUVertexState&() const noexcept;
|
|
3948
4179
|
|
|
@@ -4064,30 +4295,6 @@ static_assert(alignof(AdapterPropertiesD3D) == alignof(WGPUAdapterPropertiesD3D)
|
|
|
4064
4295
|
static_assert(offsetof(AdapterPropertiesD3D, shaderModel) == offsetof(WGPUAdapterPropertiesD3D, shaderModel),
|
|
4065
4296
|
"offsetof mismatch for AdapterPropertiesD3D::shaderModel");
|
|
4066
4297
|
|
|
4067
|
-
// AdapterPropertiesSubgroups implementation
|
|
4068
|
-
AdapterPropertiesSubgroups::AdapterPropertiesSubgroups()
|
|
4069
|
-
: ChainedStructOut { nullptr, SType::AdapterPropertiesSubgroups } {}
|
|
4070
|
-
struct AdapterPropertiesSubgroups::Init {
|
|
4071
|
-
ChainedStructOut * nextInChain;
|
|
4072
|
-
uint32_t subgroupMinSize = kLimitU32Undefined;
|
|
4073
|
-
uint32_t subgroupMaxSize = kLimitU32Undefined;
|
|
4074
|
-
};
|
|
4075
|
-
AdapterPropertiesSubgroups::AdapterPropertiesSubgroups(AdapterPropertiesSubgroups::Init&& init)
|
|
4076
|
-
: ChainedStructOut { init.nextInChain, SType::AdapterPropertiesSubgroups },
|
|
4077
|
-
subgroupMinSize(std::move(init.subgroupMinSize)),
|
|
4078
|
-
subgroupMaxSize(std::move(init.subgroupMaxSize)){}
|
|
4079
|
-
|
|
4080
|
-
AdapterPropertiesSubgroups::operator const WGPUAdapterPropertiesSubgroups&() const noexcept {
|
|
4081
|
-
return *reinterpret_cast<const WGPUAdapterPropertiesSubgroups*>(this);
|
|
4082
|
-
}
|
|
4083
|
-
|
|
4084
|
-
static_assert(sizeof(AdapterPropertiesSubgroups) == sizeof(WGPUAdapterPropertiesSubgroups), "sizeof mismatch for AdapterPropertiesSubgroups");
|
|
4085
|
-
static_assert(alignof(AdapterPropertiesSubgroups) == alignof(WGPUAdapterPropertiesSubgroups), "alignof mismatch for AdapterPropertiesSubgroups");
|
|
4086
|
-
static_assert(offsetof(AdapterPropertiesSubgroups, subgroupMinSize) == offsetof(WGPUAdapterPropertiesSubgroups, subgroupMinSize),
|
|
4087
|
-
"offsetof mismatch for AdapterPropertiesSubgroups::subgroupMinSize");
|
|
4088
|
-
static_assert(offsetof(AdapterPropertiesSubgroups, subgroupMaxSize) == offsetof(WGPUAdapterPropertiesSubgroups, subgroupMaxSize),
|
|
4089
|
-
"offsetof mismatch for AdapterPropertiesSubgroups::subgroupMaxSize");
|
|
4090
|
-
|
|
4091
4298
|
// AdapterPropertiesVk implementation
|
|
4092
4299
|
AdapterPropertiesVk::AdapterPropertiesVk()
|
|
4093
4300
|
: ChainedStructOut { nullptr, SType::AdapterPropertiesVk } {}
|
|
@@ -4108,6 +4315,26 @@ static_assert(alignof(AdapterPropertiesVk) == alignof(WGPUAdapterPropertiesVk),
|
|
|
4108
4315
|
static_assert(offsetof(AdapterPropertiesVk, driverVersion) == offsetof(WGPUAdapterPropertiesVk, driverVersion),
|
|
4109
4316
|
"offsetof mismatch for AdapterPropertiesVk::driverVersion");
|
|
4110
4317
|
|
|
4318
|
+
// BindGroupDynamicBindingArray implementation
|
|
4319
|
+
BindGroupDynamicBindingArray::BindGroupDynamicBindingArray()
|
|
4320
|
+
: ChainedStruct { nullptr, SType::BindGroupDynamicBindingArray } {}
|
|
4321
|
+
struct BindGroupDynamicBindingArray::Init {
|
|
4322
|
+
ChainedStruct * const nextInChain;
|
|
4323
|
+
uint32_t dynamicArraySize = 0;
|
|
4324
|
+
};
|
|
4325
|
+
BindGroupDynamicBindingArray::BindGroupDynamicBindingArray(BindGroupDynamicBindingArray::Init&& init)
|
|
4326
|
+
: ChainedStruct { init.nextInChain, SType::BindGroupDynamicBindingArray },
|
|
4327
|
+
dynamicArraySize(std::move(init.dynamicArraySize)){}
|
|
4328
|
+
|
|
4329
|
+
BindGroupDynamicBindingArray::operator const WGPUBindGroupDynamicBindingArray&() const noexcept {
|
|
4330
|
+
return *reinterpret_cast<const WGPUBindGroupDynamicBindingArray*>(this);
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
static_assert(sizeof(BindGroupDynamicBindingArray) == sizeof(WGPUBindGroupDynamicBindingArray), "sizeof mismatch for BindGroupDynamicBindingArray");
|
|
4334
|
+
static_assert(alignof(BindGroupDynamicBindingArray) == alignof(WGPUBindGroupDynamicBindingArray), "alignof mismatch for BindGroupDynamicBindingArray");
|
|
4335
|
+
static_assert(offsetof(BindGroupDynamicBindingArray, dynamicArraySize) == offsetof(WGPUBindGroupDynamicBindingArray, dynamicArraySize),
|
|
4336
|
+
"offsetof mismatch for BindGroupDynamicBindingArray::dynamicArraySize");
|
|
4337
|
+
|
|
4111
4338
|
// BlendComponent implementation
|
|
4112
4339
|
|
|
4113
4340
|
BlendComponent::operator const WGPUBlendComponent&() const noexcept {
|
|
@@ -4218,6 +4445,38 @@ static_assert(offsetof(CommandBufferDescriptor, nextInChain) == offsetof(WGPUCom
|
|
|
4218
4445
|
static_assert(offsetof(CommandBufferDescriptor, label) == offsetof(WGPUCommandBufferDescriptor, label),
|
|
4219
4446
|
"offsetof mismatch for CommandBufferDescriptor::label");
|
|
4220
4447
|
|
|
4448
|
+
// CompatibilityModeLimits implementation
|
|
4449
|
+
CompatibilityModeLimits::CompatibilityModeLimits()
|
|
4450
|
+
: ChainedStructOut { nullptr, SType::CompatibilityModeLimits } {}
|
|
4451
|
+
struct CompatibilityModeLimits::Init {
|
|
4452
|
+
ChainedStructOut * nextInChain;
|
|
4453
|
+
uint32_t maxStorageBuffersInVertexStage = kLimitU32Undefined;
|
|
4454
|
+
uint32_t maxStorageTexturesInVertexStage = kLimitU32Undefined;
|
|
4455
|
+
uint32_t maxStorageBuffersInFragmentStage = kLimitU32Undefined;
|
|
4456
|
+
uint32_t maxStorageTexturesInFragmentStage = kLimitU32Undefined;
|
|
4457
|
+
};
|
|
4458
|
+
CompatibilityModeLimits::CompatibilityModeLimits(CompatibilityModeLimits::Init&& init)
|
|
4459
|
+
: ChainedStructOut { init.nextInChain, SType::CompatibilityModeLimits },
|
|
4460
|
+
maxStorageBuffersInVertexStage(std::move(init.maxStorageBuffersInVertexStage)),
|
|
4461
|
+
maxStorageTexturesInVertexStage(std::move(init.maxStorageTexturesInVertexStage)),
|
|
4462
|
+
maxStorageBuffersInFragmentStage(std::move(init.maxStorageBuffersInFragmentStage)),
|
|
4463
|
+
maxStorageTexturesInFragmentStage(std::move(init.maxStorageTexturesInFragmentStage)){}
|
|
4464
|
+
|
|
4465
|
+
CompatibilityModeLimits::operator const WGPUCompatibilityModeLimits&() const noexcept {
|
|
4466
|
+
return *reinterpret_cast<const WGPUCompatibilityModeLimits*>(this);
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
static_assert(sizeof(CompatibilityModeLimits) == sizeof(WGPUCompatibilityModeLimits), "sizeof mismatch for CompatibilityModeLimits");
|
|
4470
|
+
static_assert(alignof(CompatibilityModeLimits) == alignof(WGPUCompatibilityModeLimits), "alignof mismatch for CompatibilityModeLimits");
|
|
4471
|
+
static_assert(offsetof(CompatibilityModeLimits, maxStorageBuffersInVertexStage) == offsetof(WGPUCompatibilityModeLimits, maxStorageBuffersInVertexStage),
|
|
4472
|
+
"offsetof mismatch for CompatibilityModeLimits::maxStorageBuffersInVertexStage");
|
|
4473
|
+
static_assert(offsetof(CompatibilityModeLimits, maxStorageTexturesInVertexStage) == offsetof(WGPUCompatibilityModeLimits, maxStorageTexturesInVertexStage),
|
|
4474
|
+
"offsetof mismatch for CompatibilityModeLimits::maxStorageTexturesInVertexStage");
|
|
4475
|
+
static_assert(offsetof(CompatibilityModeLimits, maxStorageBuffersInFragmentStage) == offsetof(WGPUCompatibilityModeLimits, maxStorageBuffersInFragmentStage),
|
|
4476
|
+
"offsetof mismatch for CompatibilityModeLimits::maxStorageBuffersInFragmentStage");
|
|
4477
|
+
static_assert(offsetof(CompatibilityModeLimits, maxStorageTexturesInFragmentStage) == offsetof(WGPUCompatibilityModeLimits, maxStorageTexturesInFragmentStage),
|
|
4478
|
+
"offsetof mismatch for CompatibilityModeLimits::maxStorageTexturesInFragmentStage");
|
|
4479
|
+
|
|
4221
4480
|
// ConstantEntry implementation
|
|
4222
4481
|
|
|
4223
4482
|
ConstantEntry::operator const WGPUConstantEntry&() const noexcept {
|
|
@@ -4360,6 +4619,26 @@ static_assert(offsetof(DawnCompilationMessageUtf16, offset) == offsetof(WGPUDawn
|
|
|
4360
4619
|
static_assert(offsetof(DawnCompilationMessageUtf16, length) == offsetof(WGPUDawnCompilationMessageUtf16, length),
|
|
4361
4620
|
"offsetof mismatch for DawnCompilationMessageUtf16::length");
|
|
4362
4621
|
|
|
4622
|
+
// DawnConsumeAdapterDescriptor implementation
|
|
4623
|
+
DawnConsumeAdapterDescriptor::DawnConsumeAdapterDescriptor()
|
|
4624
|
+
: ChainedStruct { nullptr, SType::DawnConsumeAdapterDescriptor } {}
|
|
4625
|
+
struct DawnConsumeAdapterDescriptor::Init {
|
|
4626
|
+
ChainedStruct * const nextInChain;
|
|
4627
|
+
Bool consumeAdapter = false;
|
|
4628
|
+
};
|
|
4629
|
+
DawnConsumeAdapterDescriptor::DawnConsumeAdapterDescriptor(DawnConsumeAdapterDescriptor::Init&& init)
|
|
4630
|
+
: ChainedStruct { init.nextInChain, SType::DawnConsumeAdapterDescriptor },
|
|
4631
|
+
consumeAdapter(std::move(init.consumeAdapter)){}
|
|
4632
|
+
|
|
4633
|
+
DawnConsumeAdapterDescriptor::operator const WGPUDawnConsumeAdapterDescriptor&() const noexcept {
|
|
4634
|
+
return *reinterpret_cast<const WGPUDawnConsumeAdapterDescriptor*>(this);
|
|
4635
|
+
}
|
|
4636
|
+
|
|
4637
|
+
static_assert(sizeof(DawnConsumeAdapterDescriptor) == sizeof(WGPUDawnConsumeAdapterDescriptor), "sizeof mismatch for DawnConsumeAdapterDescriptor");
|
|
4638
|
+
static_assert(alignof(DawnConsumeAdapterDescriptor) == alignof(WGPUDawnConsumeAdapterDescriptor), "alignof mismatch for DawnConsumeAdapterDescriptor");
|
|
4639
|
+
static_assert(offsetof(DawnConsumeAdapterDescriptor, consumeAdapter) == offsetof(WGPUDawnConsumeAdapterDescriptor, consumeAdapter),
|
|
4640
|
+
"offsetof mismatch for DawnConsumeAdapterDescriptor::consumeAdapter");
|
|
4641
|
+
|
|
4363
4642
|
// DawnDeviceAllocatorControl implementation
|
|
4364
4643
|
DawnDeviceAllocatorControl::DawnDeviceAllocatorControl()
|
|
4365
4644
|
: ChainedStruct { nullptr, SType::DawnDeviceAllocatorControl } {}
|
|
@@ -4441,6 +4720,22 @@ static_assert(offsetof(DawnFakeBufferOOMForTesting, fakeOOMAtNativeMap) == offse
|
|
|
4441
4720
|
static_assert(offsetof(DawnFakeBufferOOMForTesting, fakeOOMAtDevice) == offsetof(WGPUDawnFakeBufferOOMForTesting, fakeOOMAtDevice),
|
|
4442
4721
|
"offsetof mismatch for DawnFakeBufferOOMForTesting::fakeOOMAtDevice");
|
|
4443
4722
|
|
|
4723
|
+
// DawnFakeDeviceInitializeErrorForTesting implementation
|
|
4724
|
+
DawnFakeDeviceInitializeErrorForTesting::DawnFakeDeviceInitializeErrorForTesting()
|
|
4725
|
+
: ChainedStruct { nullptr, SType::DawnFakeDeviceInitializeErrorForTesting } {}
|
|
4726
|
+
struct DawnFakeDeviceInitializeErrorForTesting::Init {
|
|
4727
|
+
ChainedStruct * const nextInChain;
|
|
4728
|
+
};
|
|
4729
|
+
DawnFakeDeviceInitializeErrorForTesting::DawnFakeDeviceInitializeErrorForTesting(DawnFakeDeviceInitializeErrorForTesting::Init&& init)
|
|
4730
|
+
: ChainedStruct { init.nextInChain, SType::DawnFakeDeviceInitializeErrorForTesting }{}
|
|
4731
|
+
|
|
4732
|
+
DawnFakeDeviceInitializeErrorForTesting::operator const WGPUDawnFakeDeviceInitializeErrorForTesting&() const noexcept {
|
|
4733
|
+
return *reinterpret_cast<const WGPUDawnFakeDeviceInitializeErrorForTesting*>(this);
|
|
4734
|
+
}
|
|
4735
|
+
|
|
4736
|
+
static_assert(sizeof(DawnFakeDeviceInitializeErrorForTesting) == sizeof(WGPUDawnFakeDeviceInitializeErrorForTesting), "sizeof mismatch for DawnFakeDeviceInitializeErrorForTesting");
|
|
4737
|
+
static_assert(alignof(DawnFakeDeviceInitializeErrorForTesting) == alignof(WGPUDawnFakeDeviceInitializeErrorForTesting), "alignof mismatch for DawnFakeDeviceInitializeErrorForTesting");
|
|
4738
|
+
|
|
4444
4739
|
// DawnHostMappedPointerLimits implementation
|
|
4445
4740
|
DawnHostMappedPointerLimits::DawnHostMappedPointerLimits()
|
|
4446
4741
|
: ChainedStructOut { nullptr, SType::DawnHostMappedPointerLimits } {}
|
|
@@ -4645,6 +4940,41 @@ static_assert(offsetof(DawnWireWGSLControl, enableUnsafe) == offsetof(WGPUDawnWi
|
|
|
4645
4940
|
static_assert(offsetof(DawnWireWGSLControl, enableTesting) == offsetof(WGPUDawnWireWGSLControl, enableTesting),
|
|
4646
4941
|
"offsetof mismatch for DawnWireWGSLControl::enableTesting");
|
|
4647
4942
|
|
|
4943
|
+
// DynamicBindingArrayLayout implementation
|
|
4944
|
+
|
|
4945
|
+
DynamicBindingArrayLayout::operator const WGPUDynamicBindingArrayLayout&() const noexcept {
|
|
4946
|
+
return *reinterpret_cast<const WGPUDynamicBindingArrayLayout*>(this);
|
|
4947
|
+
}
|
|
4948
|
+
|
|
4949
|
+
static_assert(sizeof(DynamicBindingArrayLayout) == sizeof(WGPUDynamicBindingArrayLayout), "sizeof mismatch for DynamicBindingArrayLayout");
|
|
4950
|
+
static_assert(alignof(DynamicBindingArrayLayout) == alignof(WGPUDynamicBindingArrayLayout), "alignof mismatch for DynamicBindingArrayLayout");
|
|
4951
|
+
static_assert(offsetof(DynamicBindingArrayLayout, nextInChain) == offsetof(WGPUDynamicBindingArrayLayout, nextInChain),
|
|
4952
|
+
"offsetof mismatch for DynamicBindingArrayLayout::nextInChain");
|
|
4953
|
+
static_assert(offsetof(DynamicBindingArrayLayout, start) == offsetof(WGPUDynamicBindingArrayLayout, start),
|
|
4954
|
+
"offsetof mismatch for DynamicBindingArrayLayout::start");
|
|
4955
|
+
static_assert(offsetof(DynamicBindingArrayLayout, kind) == offsetof(WGPUDynamicBindingArrayLayout, kind),
|
|
4956
|
+
"offsetof mismatch for DynamicBindingArrayLayout::kind");
|
|
4957
|
+
|
|
4958
|
+
// DynamicBindingArrayLimits implementation
|
|
4959
|
+
DynamicBindingArrayLimits::DynamicBindingArrayLimits()
|
|
4960
|
+
: ChainedStructOut { nullptr, SType::DynamicBindingArrayLimits } {}
|
|
4961
|
+
struct DynamicBindingArrayLimits::Init {
|
|
4962
|
+
ChainedStructOut * nextInChain;
|
|
4963
|
+
uint32_t maxDynamicBindingArraySize = kLimitU32Undefined;
|
|
4964
|
+
};
|
|
4965
|
+
DynamicBindingArrayLimits::DynamicBindingArrayLimits(DynamicBindingArrayLimits::Init&& init)
|
|
4966
|
+
: ChainedStructOut { init.nextInChain, SType::DynamicBindingArrayLimits },
|
|
4967
|
+
maxDynamicBindingArraySize(std::move(init.maxDynamicBindingArraySize)){}
|
|
4968
|
+
|
|
4969
|
+
DynamicBindingArrayLimits::operator const WGPUDynamicBindingArrayLimits&() const noexcept {
|
|
4970
|
+
return *reinterpret_cast<const WGPUDynamicBindingArrayLimits*>(this);
|
|
4971
|
+
}
|
|
4972
|
+
|
|
4973
|
+
static_assert(sizeof(DynamicBindingArrayLimits) == sizeof(WGPUDynamicBindingArrayLimits), "sizeof mismatch for DynamicBindingArrayLimits");
|
|
4974
|
+
static_assert(alignof(DynamicBindingArrayLimits) == alignof(WGPUDynamicBindingArrayLimits), "alignof mismatch for DynamicBindingArrayLimits");
|
|
4975
|
+
static_assert(offsetof(DynamicBindingArrayLimits, maxDynamicBindingArraySize) == offsetof(WGPUDynamicBindingArrayLimits, maxDynamicBindingArraySize),
|
|
4976
|
+
"offsetof mismatch for DynamicBindingArrayLimits::maxDynamicBindingArraySize");
|
|
4977
|
+
|
|
4648
4978
|
// EmscriptenSurfaceSourceCanvasHTMLSelector implementation
|
|
4649
4979
|
EmscriptenSurfaceSourceCanvasHTMLSelector::EmscriptenSurfaceSourceCanvasHTMLSelector()
|
|
4650
4980
|
: ChainedStruct { nullptr, SType::EmscriptenSurfaceSourceCanvasHTMLSelector } {}
|
|
@@ -4740,20 +5070,18 @@ static_assert(alignof(Future) == alignof(WGPUFuture), "alignof mismatch for Futu
|
|
|
4740
5070
|
static_assert(offsetof(Future, id) == offsetof(WGPUFuture, id),
|
|
4741
5071
|
"offsetof mismatch for Future::id");
|
|
4742
5072
|
|
|
4743
|
-
//
|
|
5073
|
+
// InstanceLimits implementation
|
|
4744
5074
|
|
|
4745
|
-
|
|
4746
|
-
return *reinterpret_cast<const
|
|
5075
|
+
InstanceLimits::operator const WGPUInstanceLimits&() const noexcept {
|
|
5076
|
+
return *reinterpret_cast<const WGPUInstanceLimits*>(this);
|
|
4747
5077
|
}
|
|
4748
5078
|
|
|
4749
|
-
static_assert(sizeof(
|
|
4750
|
-
static_assert(alignof(
|
|
4751
|
-
static_assert(offsetof(
|
|
4752
|
-
"offsetof mismatch for
|
|
4753
|
-
static_assert(offsetof(
|
|
4754
|
-
"offsetof mismatch for
|
|
4755
|
-
static_assert(offsetof(InstanceCapabilities, timedWaitAnyMaxCount) == offsetof(WGPUInstanceCapabilities, timedWaitAnyMaxCount),
|
|
4756
|
-
"offsetof mismatch for InstanceCapabilities::timedWaitAnyMaxCount");
|
|
5079
|
+
static_assert(sizeof(InstanceLimits) == sizeof(WGPUInstanceLimits), "sizeof mismatch for InstanceLimits");
|
|
5080
|
+
static_assert(alignof(InstanceLimits) == alignof(WGPUInstanceLimits), "alignof mismatch for InstanceLimits");
|
|
5081
|
+
static_assert(offsetof(InstanceLimits, nextInChain) == offsetof(WGPUInstanceLimits, nextInChain),
|
|
5082
|
+
"offsetof mismatch for InstanceLimits::nextInChain");
|
|
5083
|
+
static_assert(offsetof(InstanceLimits, timedWaitAnyMaxCount) == offsetof(WGPUInstanceLimits, timedWaitAnyMaxCount),
|
|
5084
|
+
"offsetof mismatch for InstanceLimits::timedWaitAnyMaxCount");
|
|
4757
5085
|
|
|
4758
5086
|
// INTERNAL_HAVE_EMDAWNWEBGPU_HEADER implementation
|
|
4759
5087
|
|
|
@@ -5550,6 +5878,26 @@ static_assert(offsetof(SharedTextureMemoryAHardwareBufferDescriptor, handle) ==
|
|
|
5550
5878
|
static_assert(offsetof(SharedTextureMemoryAHardwareBufferDescriptor, useExternalFormat) == offsetof(WGPUSharedTextureMemoryAHardwareBufferDescriptor, useExternalFormat),
|
|
5551
5879
|
"offsetof mismatch for SharedTextureMemoryAHardwareBufferDescriptor::useExternalFormat");
|
|
5552
5880
|
|
|
5881
|
+
// SharedTextureMemoryD3D11BeginState implementation
|
|
5882
|
+
SharedTextureMemoryD3D11BeginState::SharedTextureMemoryD3D11BeginState()
|
|
5883
|
+
: ChainedStruct { nullptr, SType::SharedTextureMemoryD3D11BeginState } {}
|
|
5884
|
+
struct SharedTextureMemoryD3D11BeginState::Init {
|
|
5885
|
+
ChainedStruct * const nextInChain;
|
|
5886
|
+
Bool requiresEndAccessFence = true;
|
|
5887
|
+
};
|
|
5888
|
+
SharedTextureMemoryD3D11BeginState::SharedTextureMemoryD3D11BeginState(SharedTextureMemoryD3D11BeginState::Init&& init)
|
|
5889
|
+
: ChainedStruct { init.nextInChain, SType::SharedTextureMemoryD3D11BeginState },
|
|
5890
|
+
requiresEndAccessFence(std::move(init.requiresEndAccessFence)){}
|
|
5891
|
+
|
|
5892
|
+
SharedTextureMemoryD3D11BeginState::operator const WGPUSharedTextureMemoryD3D11BeginState&() const noexcept {
|
|
5893
|
+
return *reinterpret_cast<const WGPUSharedTextureMemoryD3D11BeginState*>(this);
|
|
5894
|
+
}
|
|
5895
|
+
|
|
5896
|
+
static_assert(sizeof(SharedTextureMemoryD3D11BeginState) == sizeof(WGPUSharedTextureMemoryD3D11BeginState), "sizeof mismatch for SharedTextureMemoryD3D11BeginState");
|
|
5897
|
+
static_assert(alignof(SharedTextureMemoryD3D11BeginState) == alignof(WGPUSharedTextureMemoryD3D11BeginState), "alignof mismatch for SharedTextureMemoryD3D11BeginState");
|
|
5898
|
+
static_assert(offsetof(SharedTextureMemoryD3D11BeginState, requiresEndAccessFence) == offsetof(WGPUSharedTextureMemoryD3D11BeginState, requiresEndAccessFence),
|
|
5899
|
+
"offsetof mismatch for SharedTextureMemoryD3D11BeginState::requiresEndAccessFence");
|
|
5900
|
+
|
|
5553
5901
|
// SharedTextureMemoryD3DSwapchainBeginState implementation
|
|
5554
5902
|
SharedTextureMemoryD3DSwapchainBeginState::SharedTextureMemoryD3DSwapchainBeginState()
|
|
5555
5903
|
: ChainedStruct { nullptr, SType::SharedTextureMemoryD3DSwapchainBeginState } {}
|
|
@@ -5906,6 +6254,54 @@ static_assert(offsetof(SupportedFeatures, featureCount) == offsetof(WGPUSupporte
|
|
|
5906
6254
|
static_assert(offsetof(SupportedFeatures, features) == offsetof(WGPUSupportedFeatures, features),
|
|
5907
6255
|
"offsetof mismatch for SupportedFeatures::features");
|
|
5908
6256
|
|
|
6257
|
+
// SupportedInstanceFeatures implementation
|
|
6258
|
+
SupportedInstanceFeatures::SupportedInstanceFeatures() = default;
|
|
6259
|
+
SupportedInstanceFeatures::~SupportedInstanceFeatures() {
|
|
6260
|
+
FreeMembers();
|
|
6261
|
+
}
|
|
6262
|
+
|
|
6263
|
+
SupportedInstanceFeatures::SupportedInstanceFeatures(SupportedInstanceFeatures&& rhs)
|
|
6264
|
+
: featureCount(rhs.featureCount),
|
|
6265
|
+
features(rhs.features){
|
|
6266
|
+
Reset(rhs);
|
|
6267
|
+
}
|
|
6268
|
+
|
|
6269
|
+
SupportedInstanceFeatures& SupportedInstanceFeatures::operator=(SupportedInstanceFeatures&& rhs) {
|
|
6270
|
+
if (&rhs == this) {
|
|
6271
|
+
return *this;
|
|
6272
|
+
}
|
|
6273
|
+
FreeMembers();
|
|
6274
|
+
detail::AsNonConstReference(this->featureCount) = std::move(rhs.featureCount);
|
|
6275
|
+
detail::AsNonConstReference(this->features) = std::move(rhs.features);
|
|
6276
|
+
Reset(rhs);
|
|
6277
|
+
return *this;
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
void SupportedInstanceFeatures::FreeMembers() {
|
|
6281
|
+
bool needsFreeing = false; if (this->features != nullptr) { needsFreeing = true; }if (needsFreeing) {
|
|
6282
|
+
wgpuSupportedInstanceFeaturesFreeMembers(
|
|
6283
|
+
*reinterpret_cast<WGPUSupportedInstanceFeatures*>(this));
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6286
|
+
|
|
6287
|
+
// static
|
|
6288
|
+
void SupportedInstanceFeatures::Reset(SupportedInstanceFeatures& value) {
|
|
6289
|
+
SupportedInstanceFeatures defaultValue{};
|
|
6290
|
+
detail::AsNonConstReference(value.featureCount) = defaultValue.featureCount;
|
|
6291
|
+
detail::AsNonConstReference(value.features) = defaultValue.features;
|
|
6292
|
+
}
|
|
6293
|
+
|
|
6294
|
+
SupportedInstanceFeatures::operator const WGPUSupportedInstanceFeatures&() const noexcept {
|
|
6295
|
+
return *reinterpret_cast<const WGPUSupportedInstanceFeatures*>(this);
|
|
6296
|
+
}
|
|
6297
|
+
|
|
6298
|
+
static_assert(sizeof(SupportedInstanceFeatures) == sizeof(WGPUSupportedInstanceFeatures), "sizeof mismatch for SupportedInstanceFeatures");
|
|
6299
|
+
static_assert(alignof(SupportedInstanceFeatures) == alignof(WGPUSupportedInstanceFeatures), "alignof mismatch for SupportedInstanceFeatures");
|
|
6300
|
+
static_assert(offsetof(SupportedInstanceFeatures, featureCount) == offsetof(WGPUSupportedInstanceFeatures, featureCount),
|
|
6301
|
+
"offsetof mismatch for SupportedInstanceFeatures::featureCount");
|
|
6302
|
+
static_assert(offsetof(SupportedInstanceFeatures, features) == offsetof(WGPUSupportedInstanceFeatures, features),
|
|
6303
|
+
"offsetof mismatch for SupportedInstanceFeatures::features");
|
|
6304
|
+
|
|
5909
6305
|
// SupportedWGSLLanguageFeatures implementation
|
|
5910
6306
|
SupportedWGSLLanguageFeatures::SupportedWGSLLanguageFeatures() = default;
|
|
5911
6307
|
SupportedWGSLLanguageFeatures::~SupportedWGSLLanguageFeatures() {
|
|
@@ -6293,6 +6689,69 @@ static_assert(offsetof(SurfaceTexture, texture) == offsetof(WGPUSurfaceTexture,
|
|
|
6293
6689
|
static_assert(offsetof(SurfaceTexture, status) == offsetof(WGPUSurfaceTexture, status),
|
|
6294
6690
|
"offsetof mismatch for SurfaceTexture::status");
|
|
6295
6691
|
|
|
6692
|
+
// TexelBufferBindingEntry implementation
|
|
6693
|
+
TexelBufferBindingEntry::TexelBufferBindingEntry()
|
|
6694
|
+
: ChainedStruct { nullptr, SType::TexelBufferBindingEntry } {}
|
|
6695
|
+
struct TexelBufferBindingEntry::Init {
|
|
6696
|
+
ChainedStruct * const nextInChain;
|
|
6697
|
+
TexelBufferView texelBufferView = nullptr;
|
|
6698
|
+
};
|
|
6699
|
+
TexelBufferBindingEntry::TexelBufferBindingEntry(TexelBufferBindingEntry::Init&& init)
|
|
6700
|
+
: ChainedStruct { init.nextInChain, SType::TexelBufferBindingEntry },
|
|
6701
|
+
texelBufferView(std::move(init.texelBufferView)){}
|
|
6702
|
+
|
|
6703
|
+
TexelBufferBindingEntry::operator const WGPUTexelBufferBindingEntry&() const noexcept {
|
|
6704
|
+
return *reinterpret_cast<const WGPUTexelBufferBindingEntry*>(this);
|
|
6705
|
+
}
|
|
6706
|
+
|
|
6707
|
+
static_assert(sizeof(TexelBufferBindingEntry) == sizeof(WGPUTexelBufferBindingEntry), "sizeof mismatch for TexelBufferBindingEntry");
|
|
6708
|
+
static_assert(alignof(TexelBufferBindingEntry) == alignof(WGPUTexelBufferBindingEntry), "alignof mismatch for TexelBufferBindingEntry");
|
|
6709
|
+
static_assert(offsetof(TexelBufferBindingEntry, texelBufferView) == offsetof(WGPUTexelBufferBindingEntry, texelBufferView),
|
|
6710
|
+
"offsetof mismatch for TexelBufferBindingEntry::texelBufferView");
|
|
6711
|
+
|
|
6712
|
+
// TexelBufferBindingLayout implementation
|
|
6713
|
+
TexelBufferBindingLayout::TexelBufferBindingLayout()
|
|
6714
|
+
: ChainedStruct { nullptr, SType::TexelBufferBindingLayout } {}
|
|
6715
|
+
struct TexelBufferBindingLayout::Init {
|
|
6716
|
+
ChainedStruct * const nextInChain;
|
|
6717
|
+
TexelBufferAccess access = TexelBufferAccess::Undefined;
|
|
6718
|
+
TextureFormat format = TextureFormat::Undefined;
|
|
6719
|
+
};
|
|
6720
|
+
TexelBufferBindingLayout::TexelBufferBindingLayout(TexelBufferBindingLayout::Init&& init)
|
|
6721
|
+
: ChainedStruct { init.nextInChain, SType::TexelBufferBindingLayout },
|
|
6722
|
+
access(std::move(init.access)),
|
|
6723
|
+
format(std::move(init.format)){}
|
|
6724
|
+
|
|
6725
|
+
TexelBufferBindingLayout::operator const WGPUTexelBufferBindingLayout&() const noexcept {
|
|
6726
|
+
return *reinterpret_cast<const WGPUTexelBufferBindingLayout*>(this);
|
|
6727
|
+
}
|
|
6728
|
+
|
|
6729
|
+
static_assert(sizeof(TexelBufferBindingLayout) == sizeof(WGPUTexelBufferBindingLayout), "sizeof mismatch for TexelBufferBindingLayout");
|
|
6730
|
+
static_assert(alignof(TexelBufferBindingLayout) == alignof(WGPUTexelBufferBindingLayout), "alignof mismatch for TexelBufferBindingLayout");
|
|
6731
|
+
static_assert(offsetof(TexelBufferBindingLayout, access) == offsetof(WGPUTexelBufferBindingLayout, access),
|
|
6732
|
+
"offsetof mismatch for TexelBufferBindingLayout::access");
|
|
6733
|
+
static_assert(offsetof(TexelBufferBindingLayout, format) == offsetof(WGPUTexelBufferBindingLayout, format),
|
|
6734
|
+
"offsetof mismatch for TexelBufferBindingLayout::format");
|
|
6735
|
+
|
|
6736
|
+
// TexelBufferViewDescriptor implementation
|
|
6737
|
+
|
|
6738
|
+
TexelBufferViewDescriptor::operator const WGPUTexelBufferViewDescriptor&() const noexcept {
|
|
6739
|
+
return *reinterpret_cast<const WGPUTexelBufferViewDescriptor*>(this);
|
|
6740
|
+
}
|
|
6741
|
+
|
|
6742
|
+
static_assert(sizeof(TexelBufferViewDescriptor) == sizeof(WGPUTexelBufferViewDescriptor), "sizeof mismatch for TexelBufferViewDescriptor");
|
|
6743
|
+
static_assert(alignof(TexelBufferViewDescriptor) == alignof(WGPUTexelBufferViewDescriptor), "alignof mismatch for TexelBufferViewDescriptor");
|
|
6744
|
+
static_assert(offsetof(TexelBufferViewDescriptor, nextInChain) == offsetof(WGPUTexelBufferViewDescriptor, nextInChain),
|
|
6745
|
+
"offsetof mismatch for TexelBufferViewDescriptor::nextInChain");
|
|
6746
|
+
static_assert(offsetof(TexelBufferViewDescriptor, label) == offsetof(WGPUTexelBufferViewDescriptor, label),
|
|
6747
|
+
"offsetof mismatch for TexelBufferViewDescriptor::label");
|
|
6748
|
+
static_assert(offsetof(TexelBufferViewDescriptor, format) == offsetof(WGPUTexelBufferViewDescriptor, format),
|
|
6749
|
+
"offsetof mismatch for TexelBufferViewDescriptor::format");
|
|
6750
|
+
static_assert(offsetof(TexelBufferViewDescriptor, offset) == offsetof(WGPUTexelBufferViewDescriptor, offset),
|
|
6751
|
+
"offsetof mismatch for TexelBufferViewDescriptor::offset");
|
|
6752
|
+
static_assert(offsetof(TexelBufferViewDescriptor, size) == offsetof(WGPUTexelBufferViewDescriptor, size),
|
|
6753
|
+
"offsetof mismatch for TexelBufferViewDescriptor::size");
|
|
6754
|
+
|
|
6296
6755
|
// TexelCopyBufferLayout implementation
|
|
6297
6756
|
|
|
6298
6757
|
TexelCopyBufferLayout::operator const WGPUTexelCopyBufferLayout&() const noexcept {
|
|
@@ -6345,6 +6804,23 @@ static_assert(alignof(TextureBindingViewDimensionDescriptor) == alignof(WGPUText
|
|
|
6345
6804
|
static_assert(offsetof(TextureBindingViewDimensionDescriptor, textureBindingViewDimension) == offsetof(WGPUTextureBindingViewDimensionDescriptor, textureBindingViewDimension),
|
|
6346
6805
|
"offsetof mismatch for TextureBindingViewDimensionDescriptor::textureBindingViewDimension");
|
|
6347
6806
|
|
|
6807
|
+
// TextureComponentSwizzle implementation
|
|
6808
|
+
|
|
6809
|
+
TextureComponentSwizzle::operator const WGPUTextureComponentSwizzle&() const noexcept {
|
|
6810
|
+
return *reinterpret_cast<const WGPUTextureComponentSwizzle*>(this);
|
|
6811
|
+
}
|
|
6812
|
+
|
|
6813
|
+
static_assert(sizeof(TextureComponentSwizzle) == sizeof(WGPUTextureComponentSwizzle), "sizeof mismatch for TextureComponentSwizzle");
|
|
6814
|
+
static_assert(alignof(TextureComponentSwizzle) == alignof(WGPUTextureComponentSwizzle), "alignof mismatch for TextureComponentSwizzle");
|
|
6815
|
+
static_assert(offsetof(TextureComponentSwizzle, r) == offsetof(WGPUTextureComponentSwizzle, r),
|
|
6816
|
+
"offsetof mismatch for TextureComponentSwizzle::r");
|
|
6817
|
+
static_assert(offsetof(TextureComponentSwizzle, g) == offsetof(WGPUTextureComponentSwizzle, g),
|
|
6818
|
+
"offsetof mismatch for TextureComponentSwizzle::g");
|
|
6819
|
+
static_assert(offsetof(TextureComponentSwizzle, b) == offsetof(WGPUTextureComponentSwizzle, b),
|
|
6820
|
+
"offsetof mismatch for TextureComponentSwizzle::b");
|
|
6821
|
+
static_assert(offsetof(TextureComponentSwizzle, a) == offsetof(WGPUTextureComponentSwizzle, a),
|
|
6822
|
+
"offsetof mismatch for TextureComponentSwizzle::a");
|
|
6823
|
+
|
|
6348
6824
|
// VertexAttribute implementation
|
|
6349
6825
|
|
|
6350
6826
|
VertexAttribute::operator const WGPUVertexAttribute&() const noexcept {
|
|
@@ -6576,6 +7052,26 @@ static_assert(offsetof(BindGroupEntry, sampler) == offsetof(WGPUBindGroupEntry,
|
|
|
6576
7052
|
static_assert(offsetof(BindGroupEntry, textureView) == offsetof(WGPUBindGroupEntry, textureView),
|
|
6577
7053
|
"offsetof mismatch for BindGroupEntry::textureView");
|
|
6578
7054
|
|
|
7055
|
+
// BindGroupLayoutDynamicBindingArray implementation
|
|
7056
|
+
BindGroupLayoutDynamicBindingArray::BindGroupLayoutDynamicBindingArray()
|
|
7057
|
+
: ChainedStruct { nullptr, SType::BindGroupLayoutDynamicBindingArray } {}
|
|
7058
|
+
struct BindGroupLayoutDynamicBindingArray::Init {
|
|
7059
|
+
ChainedStruct * const nextInChain;
|
|
7060
|
+
DynamicBindingArrayLayout dynamicArray = {};
|
|
7061
|
+
};
|
|
7062
|
+
BindGroupLayoutDynamicBindingArray::BindGroupLayoutDynamicBindingArray(BindGroupLayoutDynamicBindingArray::Init&& init)
|
|
7063
|
+
: ChainedStruct { init.nextInChain, SType::BindGroupLayoutDynamicBindingArray },
|
|
7064
|
+
dynamicArray(std::move(init.dynamicArray)){}
|
|
7065
|
+
|
|
7066
|
+
BindGroupLayoutDynamicBindingArray::operator const WGPUBindGroupLayoutDynamicBindingArray&() const noexcept {
|
|
7067
|
+
return *reinterpret_cast<const WGPUBindGroupLayoutDynamicBindingArray*>(this);
|
|
7068
|
+
}
|
|
7069
|
+
|
|
7070
|
+
static_assert(sizeof(BindGroupLayoutDynamicBindingArray) == sizeof(WGPUBindGroupLayoutDynamicBindingArray), "sizeof mismatch for BindGroupLayoutDynamicBindingArray");
|
|
7071
|
+
static_assert(alignof(BindGroupLayoutDynamicBindingArray) == alignof(WGPUBindGroupLayoutDynamicBindingArray), "alignof mismatch for BindGroupLayoutDynamicBindingArray");
|
|
7072
|
+
static_assert(offsetof(BindGroupLayoutDynamicBindingArray, dynamicArray) == offsetof(WGPUBindGroupLayoutDynamicBindingArray, dynamicArray),
|
|
7073
|
+
"offsetof mismatch for BindGroupLayoutDynamicBindingArray::dynamicArray");
|
|
7074
|
+
|
|
6579
7075
|
// BindGroupLayoutEntry implementation
|
|
6580
7076
|
|
|
6581
7077
|
BindGroupLayoutEntry::operator const WGPUBindGroupLayoutEntry&() const noexcept {
|
|
@@ -6869,8 +7365,12 @@ static_assert(sizeof(InstanceDescriptor) == sizeof(WGPUInstanceDescriptor), "siz
|
|
|
6869
7365
|
static_assert(alignof(InstanceDescriptor) == alignof(WGPUInstanceDescriptor), "alignof mismatch for InstanceDescriptor");
|
|
6870
7366
|
static_assert(offsetof(InstanceDescriptor, nextInChain) == offsetof(WGPUInstanceDescriptor, nextInChain),
|
|
6871
7367
|
"offsetof mismatch for InstanceDescriptor::nextInChain");
|
|
6872
|
-
static_assert(offsetof(InstanceDescriptor,
|
|
6873
|
-
"offsetof mismatch for InstanceDescriptor::
|
|
7368
|
+
static_assert(offsetof(InstanceDescriptor, requiredFeatureCount) == offsetof(WGPUInstanceDescriptor, requiredFeatureCount),
|
|
7369
|
+
"offsetof mismatch for InstanceDescriptor::requiredFeatureCount");
|
|
7370
|
+
static_assert(offsetof(InstanceDescriptor, requiredFeatures) == offsetof(WGPUInstanceDescriptor, requiredFeatures),
|
|
7371
|
+
"offsetof mismatch for InstanceDescriptor::requiredFeatures");
|
|
7372
|
+
static_assert(offsetof(InstanceDescriptor, requiredLimits) == offsetof(WGPUInstanceDescriptor, requiredLimits),
|
|
7373
|
+
"offsetof mismatch for InstanceDescriptor::requiredLimits");
|
|
6874
7374
|
|
|
6875
7375
|
// Limits implementation
|
|
6876
7376
|
|
|
@@ -6946,14 +7446,6 @@ static_assert(offsetof(Limits, maxComputeWorkgroupsPerDimension) == offsetof(WGP
|
|
|
6946
7446
|
"offsetof mismatch for Limits::maxComputeWorkgroupsPerDimension");
|
|
6947
7447
|
static_assert(offsetof(Limits, maxImmediateSize) == offsetof(WGPULimits, maxImmediateSize),
|
|
6948
7448
|
"offsetof mismatch for Limits::maxImmediateSize");
|
|
6949
|
-
static_assert(offsetof(Limits, maxStorageBuffersInVertexStage) == offsetof(WGPULimits, maxStorageBuffersInVertexStage),
|
|
6950
|
-
"offsetof mismatch for Limits::maxStorageBuffersInVertexStage");
|
|
6951
|
-
static_assert(offsetof(Limits, maxStorageTexturesInVertexStage) == offsetof(WGPULimits, maxStorageTexturesInVertexStage),
|
|
6952
|
-
"offsetof mismatch for Limits::maxStorageTexturesInVertexStage");
|
|
6953
|
-
static_assert(offsetof(Limits, maxStorageBuffersInFragmentStage) == offsetof(WGPULimits, maxStorageBuffersInFragmentStage),
|
|
6954
|
-
"offsetof mismatch for Limits::maxStorageBuffersInFragmentStage");
|
|
6955
|
-
static_assert(offsetof(Limits, maxStorageTexturesInFragmentStage) == offsetof(WGPULimits, maxStorageTexturesInFragmentStage),
|
|
6956
|
-
"offsetof mismatch for Limits::maxStorageTexturesInFragmentStage");
|
|
6957
7449
|
|
|
6958
7450
|
// PipelineLayoutPixelLocalStorage implementation
|
|
6959
7451
|
PipelineLayoutPixelLocalStorage::PipelineLayoutPixelLocalStorage()
|
|
@@ -7300,6 +7792,26 @@ static_assert(offsetof(TexelCopyTextureInfo, origin) == offsetof(WGPUTexelCopyTe
|
|
|
7300
7792
|
static_assert(offsetof(TexelCopyTextureInfo, aspect) == offsetof(WGPUTexelCopyTextureInfo, aspect),
|
|
7301
7793
|
"offsetof mismatch for TexelCopyTextureInfo::aspect");
|
|
7302
7794
|
|
|
7795
|
+
// TextureComponentSwizzleDescriptor implementation
|
|
7796
|
+
TextureComponentSwizzleDescriptor::TextureComponentSwizzleDescriptor()
|
|
7797
|
+
: ChainedStruct { nullptr, SType::TextureComponentSwizzleDescriptor } {}
|
|
7798
|
+
struct TextureComponentSwizzleDescriptor::Init {
|
|
7799
|
+
ChainedStruct * const nextInChain;
|
|
7800
|
+
TextureComponentSwizzle swizzle = {};
|
|
7801
|
+
};
|
|
7802
|
+
TextureComponentSwizzleDescriptor::TextureComponentSwizzleDescriptor(TextureComponentSwizzleDescriptor::Init&& init)
|
|
7803
|
+
: ChainedStruct { init.nextInChain, SType::TextureComponentSwizzleDescriptor },
|
|
7804
|
+
swizzle(std::move(init.swizzle)){}
|
|
7805
|
+
|
|
7806
|
+
TextureComponentSwizzleDescriptor::operator const WGPUTextureComponentSwizzleDescriptor&() const noexcept {
|
|
7807
|
+
return *reinterpret_cast<const WGPUTextureComponentSwizzleDescriptor*>(this);
|
|
7808
|
+
}
|
|
7809
|
+
|
|
7810
|
+
static_assert(sizeof(TextureComponentSwizzleDescriptor) == sizeof(WGPUTextureComponentSwizzleDescriptor), "sizeof mismatch for TextureComponentSwizzleDescriptor");
|
|
7811
|
+
static_assert(alignof(TextureComponentSwizzleDescriptor) == alignof(WGPUTextureComponentSwizzleDescriptor), "alignof mismatch for TextureComponentSwizzleDescriptor");
|
|
7812
|
+
static_assert(offsetof(TextureComponentSwizzleDescriptor, swizzle) == offsetof(WGPUTextureComponentSwizzleDescriptor, swizzle),
|
|
7813
|
+
"offsetof mismatch for TextureComponentSwizzleDescriptor::swizzle");
|
|
7814
|
+
|
|
7303
7815
|
// TextureDescriptor implementation
|
|
7304
7816
|
|
|
7305
7817
|
TextureDescriptor::operator const WGPUTextureDescriptor&() const noexcept {
|
|
@@ -7329,35 +7841,6 @@ static_assert(offsetof(TextureDescriptor, viewFormatCount) == offsetof(WGPUTextu
|
|
|
7329
7841
|
static_assert(offsetof(TextureDescriptor, viewFormats) == offsetof(WGPUTextureDescriptor, viewFormats),
|
|
7330
7842
|
"offsetof mismatch for TextureDescriptor::viewFormats");
|
|
7331
7843
|
|
|
7332
|
-
// TextureViewDescriptor implementation
|
|
7333
|
-
|
|
7334
|
-
TextureViewDescriptor::operator const WGPUTextureViewDescriptor&() const noexcept {
|
|
7335
|
-
return *reinterpret_cast<const WGPUTextureViewDescriptor*>(this);
|
|
7336
|
-
}
|
|
7337
|
-
|
|
7338
|
-
static_assert(sizeof(TextureViewDescriptor) == sizeof(WGPUTextureViewDescriptor), "sizeof mismatch for TextureViewDescriptor");
|
|
7339
|
-
static_assert(alignof(TextureViewDescriptor) == alignof(WGPUTextureViewDescriptor), "alignof mismatch for TextureViewDescriptor");
|
|
7340
|
-
static_assert(offsetof(TextureViewDescriptor, nextInChain) == offsetof(WGPUTextureViewDescriptor, nextInChain),
|
|
7341
|
-
"offsetof mismatch for TextureViewDescriptor::nextInChain");
|
|
7342
|
-
static_assert(offsetof(TextureViewDescriptor, label) == offsetof(WGPUTextureViewDescriptor, label),
|
|
7343
|
-
"offsetof mismatch for TextureViewDescriptor::label");
|
|
7344
|
-
static_assert(offsetof(TextureViewDescriptor, format) == offsetof(WGPUTextureViewDescriptor, format),
|
|
7345
|
-
"offsetof mismatch for TextureViewDescriptor::format");
|
|
7346
|
-
static_assert(offsetof(TextureViewDescriptor, dimension) == offsetof(WGPUTextureViewDescriptor, dimension),
|
|
7347
|
-
"offsetof mismatch for TextureViewDescriptor::dimension");
|
|
7348
|
-
static_assert(offsetof(TextureViewDescriptor, baseMipLevel) == offsetof(WGPUTextureViewDescriptor, baseMipLevel),
|
|
7349
|
-
"offsetof mismatch for TextureViewDescriptor::baseMipLevel");
|
|
7350
|
-
static_assert(offsetof(TextureViewDescriptor, mipLevelCount) == offsetof(WGPUTextureViewDescriptor, mipLevelCount),
|
|
7351
|
-
"offsetof mismatch for TextureViewDescriptor::mipLevelCount");
|
|
7352
|
-
static_assert(offsetof(TextureViewDescriptor, baseArrayLayer) == offsetof(WGPUTextureViewDescriptor, baseArrayLayer),
|
|
7353
|
-
"offsetof mismatch for TextureViewDescriptor::baseArrayLayer");
|
|
7354
|
-
static_assert(offsetof(TextureViewDescriptor, arrayLayerCount) == offsetof(WGPUTextureViewDescriptor, arrayLayerCount),
|
|
7355
|
-
"offsetof mismatch for TextureViewDescriptor::arrayLayerCount");
|
|
7356
|
-
static_assert(offsetof(TextureViewDescriptor, aspect) == offsetof(WGPUTextureViewDescriptor, aspect),
|
|
7357
|
-
"offsetof mismatch for TextureViewDescriptor::aspect");
|
|
7358
|
-
static_assert(offsetof(TextureViewDescriptor, usage) == offsetof(WGPUTextureViewDescriptor, usage),
|
|
7359
|
-
"offsetof mismatch for TextureViewDescriptor::usage");
|
|
7360
|
-
|
|
7361
7844
|
// VertexBufferLayout implementation
|
|
7362
7845
|
|
|
7363
7846
|
VertexBufferLayout::operator const WGPUVertexBufferLayout&() const noexcept {
|
|
@@ -7640,6 +8123,35 @@ static_assert(offsetof(SharedTextureMemoryProperties, size) == offsetof(WGPUShar
|
|
|
7640
8123
|
static_assert(offsetof(SharedTextureMemoryProperties, format) == offsetof(WGPUSharedTextureMemoryProperties, format),
|
|
7641
8124
|
"offsetof mismatch for SharedTextureMemoryProperties::format");
|
|
7642
8125
|
|
|
8126
|
+
// TextureViewDescriptor implementation
|
|
8127
|
+
|
|
8128
|
+
TextureViewDescriptor::operator const WGPUTextureViewDescriptor&() const noexcept {
|
|
8129
|
+
return *reinterpret_cast<const WGPUTextureViewDescriptor*>(this);
|
|
8130
|
+
}
|
|
8131
|
+
|
|
8132
|
+
static_assert(sizeof(TextureViewDescriptor) == sizeof(WGPUTextureViewDescriptor), "sizeof mismatch for TextureViewDescriptor");
|
|
8133
|
+
static_assert(alignof(TextureViewDescriptor) == alignof(WGPUTextureViewDescriptor), "alignof mismatch for TextureViewDescriptor");
|
|
8134
|
+
static_assert(offsetof(TextureViewDescriptor, nextInChain) == offsetof(WGPUTextureViewDescriptor, nextInChain),
|
|
8135
|
+
"offsetof mismatch for TextureViewDescriptor::nextInChain");
|
|
8136
|
+
static_assert(offsetof(TextureViewDescriptor, label) == offsetof(WGPUTextureViewDescriptor, label),
|
|
8137
|
+
"offsetof mismatch for TextureViewDescriptor::label");
|
|
8138
|
+
static_assert(offsetof(TextureViewDescriptor, format) == offsetof(WGPUTextureViewDescriptor, format),
|
|
8139
|
+
"offsetof mismatch for TextureViewDescriptor::format");
|
|
8140
|
+
static_assert(offsetof(TextureViewDescriptor, dimension) == offsetof(WGPUTextureViewDescriptor, dimension),
|
|
8141
|
+
"offsetof mismatch for TextureViewDescriptor::dimension");
|
|
8142
|
+
static_assert(offsetof(TextureViewDescriptor, baseMipLevel) == offsetof(WGPUTextureViewDescriptor, baseMipLevel),
|
|
8143
|
+
"offsetof mismatch for TextureViewDescriptor::baseMipLevel");
|
|
8144
|
+
static_assert(offsetof(TextureViewDescriptor, mipLevelCount) == offsetof(WGPUTextureViewDescriptor, mipLevelCount),
|
|
8145
|
+
"offsetof mismatch for TextureViewDescriptor::mipLevelCount");
|
|
8146
|
+
static_assert(offsetof(TextureViewDescriptor, baseArrayLayer) == offsetof(WGPUTextureViewDescriptor, baseArrayLayer),
|
|
8147
|
+
"offsetof mismatch for TextureViewDescriptor::baseArrayLayer");
|
|
8148
|
+
static_assert(offsetof(TextureViewDescriptor, arrayLayerCount) == offsetof(WGPUTextureViewDescriptor, arrayLayerCount),
|
|
8149
|
+
"offsetof mismatch for TextureViewDescriptor::arrayLayerCount");
|
|
8150
|
+
static_assert(offsetof(TextureViewDescriptor, aspect) == offsetof(WGPUTextureViewDescriptor, aspect),
|
|
8151
|
+
"offsetof mismatch for TextureViewDescriptor::aspect");
|
|
8152
|
+
static_assert(offsetof(TextureViewDescriptor, usage) == offsetof(WGPUTextureViewDescriptor, usage),
|
|
8153
|
+
"offsetof mismatch for TextureViewDescriptor::usage");
|
|
8154
|
+
|
|
7643
8155
|
// VertexState implementation
|
|
7644
8156
|
|
|
7645
8157
|
VertexState::operator const WGPUVertexState&() const noexcept {
|
|
@@ -7864,20 +8376,20 @@ void DeviceDescriptor::SetUncapturedErrorCallback(L callback) {
|
|
|
7864
8376
|
// Adapter implementation
|
|
7865
8377
|
|
|
7866
8378
|
Device Adapter::CreateDevice(DeviceDescriptor const * descriptor) const {
|
|
7867
|
-
auto result = wgpuAdapterCreateDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const
|
|
8379
|
+
auto result = wgpuAdapterCreateDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const *>(descriptor));
|
|
7868
8380
|
return Device::Acquire(result);
|
|
7869
8381
|
}
|
|
7870
8382
|
void Adapter::GetFeatures(SupportedFeatures * features) const {
|
|
7871
8383
|
*features = SupportedFeatures();
|
|
7872
|
-
wgpuAdapterGetFeatures(Get(), reinterpret_cast<WGPUSupportedFeatures
|
|
8384
|
+
wgpuAdapterGetFeatures(Get(), reinterpret_cast<WGPUSupportedFeatures *>(features));
|
|
7873
8385
|
}
|
|
7874
8386
|
ConvertibleStatus Adapter::GetFormatCapabilities(TextureFormat format, DawnFormatCapabilities * capabilities) const {
|
|
7875
|
-
auto result = wgpuAdapterGetFormatCapabilities(Get(), static_cast<WGPUTextureFormat>(format), reinterpret_cast<WGPUDawnFormatCapabilities
|
|
8387
|
+
auto result = wgpuAdapterGetFormatCapabilities(Get(), static_cast<WGPUTextureFormat>(format), reinterpret_cast<WGPUDawnFormatCapabilities *>(capabilities));
|
|
7876
8388
|
return static_cast<Status>(result);
|
|
7877
8389
|
}
|
|
7878
8390
|
ConvertibleStatus Adapter::GetInfo(AdapterInfo * info) const {
|
|
7879
8391
|
*info = AdapterInfo();
|
|
7880
|
-
auto result = wgpuAdapterGetInfo(Get(), reinterpret_cast<WGPUAdapterInfo
|
|
8392
|
+
auto result = wgpuAdapterGetInfo(Get(), reinterpret_cast<WGPUAdapterInfo *>(info));
|
|
7881
8393
|
return static_cast<Status>(result);
|
|
7882
8394
|
}
|
|
7883
8395
|
Instance Adapter::GetInstance() const {
|
|
@@ -7885,7 +8397,7 @@ Instance Adapter::GetInstance() const {
|
|
|
7885
8397
|
return Instance::Acquire(result);
|
|
7886
8398
|
}
|
|
7887
8399
|
ConvertibleStatus Adapter::GetLimits(Limits * limits) const {
|
|
7888
|
-
auto result = wgpuAdapterGetLimits(Get(), reinterpret_cast<WGPULimits
|
|
8400
|
+
auto result = wgpuAdapterGetLimits(Get(), reinterpret_cast<WGPULimits *>(limits));
|
|
7889
8401
|
return static_cast<Status>(result);
|
|
7890
8402
|
}
|
|
7891
8403
|
Bool Adapter::HasFeature(FeatureName feature) const {
|
|
@@ -7896,7 +8408,7 @@ template <typename F, typename T,
|
|
|
7896
8408
|
typename Cb,
|
|
7897
8409
|
typename CbChar,
|
|
7898
8410
|
typename>
|
|
7899
|
-
Future Adapter::RequestDevice(DeviceDescriptor const *
|
|
8411
|
+
Future Adapter::RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,F callback, T userdata) const {
|
|
7900
8412
|
WGPURequestDeviceCallbackInfo callbackInfo = {};
|
|
7901
8413
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
7902
8414
|
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
@@ -7915,7 +8427,7 @@ Future Adapter::RequestDevice(DeviceDescriptor const * options, CallbackMode cal
|
|
|
7915
8427
|
}
|
|
7916
8428
|
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
7917
8429
|
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
7918
|
-
auto result = wgpuAdapterRequestDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const
|
|
8430
|
+
auto result = wgpuAdapterRequestDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const *>(descriptor), callbackInfo);
|
|
7919
8431
|
return Future {
|
|
7920
8432
|
result.id
|
|
7921
8433
|
};
|
|
@@ -7924,7 +8436,7 @@ template <typename L,
|
|
|
7924
8436
|
typename Cb,
|
|
7925
8437
|
typename CbChar,
|
|
7926
8438
|
typename>
|
|
7927
|
-
Future Adapter::RequestDevice(DeviceDescriptor const *
|
|
8439
|
+
Future Adapter::RequestDevice(DeviceDescriptor const * descriptor, CallbackMode callbackMode,L callback) const {
|
|
7928
8440
|
using F = RequestDeviceCallback<void>;
|
|
7929
8441
|
|
|
7930
8442
|
WGPURequestDeviceCallbackInfo callbackInfo = {};
|
|
@@ -7948,7 +8460,7 @@ Future Adapter::RequestDevice(DeviceDescriptor const * options, CallbackMode cal
|
|
|
7948
8460
|
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
7949
8461
|
callbackInfo.userdata2 = nullptr;
|
|
7950
8462
|
}
|
|
7951
|
-
auto result = wgpuAdapterRequestDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const
|
|
8463
|
+
auto result = wgpuAdapterRequestDevice(Get(), reinterpret_cast<WGPUDeviceDescriptor const *>(descriptor), callbackInfo);
|
|
7952
8464
|
return Future {
|
|
7953
8465
|
result.id
|
|
7954
8466
|
};
|
|
@@ -7970,6 +8482,9 @@ static_assert(alignof(Adapter) == alignof(WGPUAdapter), "alignof mismatch for Ad
|
|
|
7970
8482
|
|
|
7971
8483
|
// BindGroup implementation
|
|
7972
8484
|
|
|
8485
|
+
void BindGroup::Destroy() const {
|
|
8486
|
+
wgpuBindGroupDestroy(Get());
|
|
8487
|
+
}
|
|
7973
8488
|
void BindGroup::SetLabel(StringView label) const {
|
|
7974
8489
|
wgpuBindGroupSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
7975
8490
|
}
|
|
@@ -8010,6 +8525,10 @@ static_assert(alignof(BindGroupLayout) == alignof(WGPUBindGroupLayout), "alignof
|
|
|
8010
8525
|
|
|
8011
8526
|
// Buffer implementation
|
|
8012
8527
|
|
|
8528
|
+
TexelBufferView Buffer::CreateTexelView(TexelBufferViewDescriptor const * descriptor) const {
|
|
8529
|
+
auto result = wgpuBufferCreateTexelView(Get(), reinterpret_cast<WGPUTexelBufferViewDescriptor const *>(descriptor));
|
|
8530
|
+
return TexelBufferView::Acquire(result);
|
|
8531
|
+
}
|
|
8013
8532
|
void Buffer::Destroy() const {
|
|
8014
8533
|
wgpuBufferDestroy(Get());
|
|
8015
8534
|
}
|
|
@@ -8095,7 +8614,7 @@ Future Buffer::MapAsync(MapMode mode, size_t offset, size_t size, CallbackMode c
|
|
|
8095
8614
|
};
|
|
8096
8615
|
}
|
|
8097
8616
|
ConvertibleStatus Buffer::ReadMappedRange(size_t offset, void * data, size_t size) const {
|
|
8098
|
-
auto result = wgpuBufferReadMappedRange(Get(), offset, reinterpret_cast<void
|
|
8617
|
+
auto result = wgpuBufferReadMappedRange(Get(), offset, reinterpret_cast<void *>(data), size);
|
|
8099
8618
|
return static_cast<Status>(result);
|
|
8100
8619
|
}
|
|
8101
8620
|
void Buffer::SetLabel(StringView label) const {
|
|
@@ -8105,7 +8624,7 @@ void Buffer::Unmap() const {
|
|
|
8105
8624
|
wgpuBufferUnmap(Get());
|
|
8106
8625
|
}
|
|
8107
8626
|
ConvertibleStatus Buffer::WriteMappedRange(size_t offset, void const * data, size_t size) const {
|
|
8108
|
-
auto result = wgpuBufferWriteMappedRange(Get(), offset, reinterpret_cast<void const
|
|
8627
|
+
auto result = wgpuBufferWriteMappedRange(Get(), offset, reinterpret_cast<void const *>(data), size);
|
|
8109
8628
|
return static_cast<Status>(result);
|
|
8110
8629
|
}
|
|
8111
8630
|
|
|
@@ -8146,11 +8665,11 @@ static_assert(alignof(CommandBuffer) == alignof(WGPUCommandBuffer), "alignof mis
|
|
|
8146
8665
|
// CommandEncoder implementation
|
|
8147
8666
|
|
|
8148
8667
|
ComputePassEncoder CommandEncoder::BeginComputePass(ComputePassDescriptor const * descriptor) const {
|
|
8149
|
-
auto result = wgpuCommandEncoderBeginComputePass(Get(), reinterpret_cast<WGPUComputePassDescriptor const
|
|
8668
|
+
auto result = wgpuCommandEncoderBeginComputePass(Get(), reinterpret_cast<WGPUComputePassDescriptor const *>(descriptor));
|
|
8150
8669
|
return ComputePassEncoder::Acquire(result);
|
|
8151
8670
|
}
|
|
8152
8671
|
RenderPassEncoder CommandEncoder::BeginRenderPass(RenderPassDescriptor const * descriptor) const {
|
|
8153
|
-
auto result = wgpuCommandEncoderBeginRenderPass(Get(), reinterpret_cast<WGPURenderPassDescriptor const
|
|
8672
|
+
auto result = wgpuCommandEncoderBeginRenderPass(Get(), reinterpret_cast<WGPURenderPassDescriptor const *>(descriptor));
|
|
8154
8673
|
return RenderPassEncoder::Acquire(result);
|
|
8155
8674
|
}
|
|
8156
8675
|
void CommandEncoder::ClearBuffer(Buffer const& buffer, uint64_t offset, uint64_t size) const {
|
|
@@ -8160,16 +8679,16 @@ void CommandEncoder::CopyBufferToBuffer(Buffer const& source, uint64_t sourceOff
|
|
|
8160
8679
|
wgpuCommandEncoderCopyBufferToBuffer(Get(), source.Get(), sourceOffset, destination.Get(), destinationOffset, size);
|
|
8161
8680
|
}
|
|
8162
8681
|
void CommandEncoder::CopyBufferToTexture(TexelCopyBufferInfo const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize) const {
|
|
8163
|
-
wgpuCommandEncoderCopyBufferToTexture(Get(), reinterpret_cast<WGPUTexelCopyBufferInfo const
|
|
8682
|
+
wgpuCommandEncoderCopyBufferToTexture(Get(), reinterpret_cast<WGPUTexelCopyBufferInfo const *>(source), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(destination), reinterpret_cast<WGPUExtent3D const *>(copySize));
|
|
8164
8683
|
}
|
|
8165
8684
|
void CommandEncoder::CopyTextureToBuffer(TexelCopyTextureInfo const * source, TexelCopyBufferInfo const * destination, Extent3D const * copySize) const {
|
|
8166
|
-
wgpuCommandEncoderCopyTextureToBuffer(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const
|
|
8685
|
+
wgpuCommandEncoderCopyTextureToBuffer(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(source), reinterpret_cast<WGPUTexelCopyBufferInfo const *>(destination), reinterpret_cast<WGPUExtent3D const *>(copySize));
|
|
8167
8686
|
}
|
|
8168
8687
|
void CommandEncoder::CopyTextureToTexture(TexelCopyTextureInfo const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize) const {
|
|
8169
|
-
wgpuCommandEncoderCopyTextureToTexture(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const
|
|
8688
|
+
wgpuCommandEncoderCopyTextureToTexture(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(source), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(destination), reinterpret_cast<WGPUExtent3D const *>(copySize));
|
|
8170
8689
|
}
|
|
8171
8690
|
CommandBuffer CommandEncoder::Finish(CommandBufferDescriptor const * descriptor) const {
|
|
8172
|
-
auto result = wgpuCommandEncoderFinish(Get(), reinterpret_cast<WGPUCommandBufferDescriptor const
|
|
8691
|
+
auto result = wgpuCommandEncoderFinish(Get(), reinterpret_cast<WGPUCommandBufferDescriptor const *>(descriptor));
|
|
8173
8692
|
return CommandBuffer::Acquire(result);
|
|
8174
8693
|
}
|
|
8175
8694
|
void CommandEncoder::InjectValidationError(StringView message) const {
|
|
@@ -8191,7 +8710,7 @@ void CommandEncoder::SetLabel(StringView label) const {
|
|
|
8191
8710
|
wgpuCommandEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
8192
8711
|
}
|
|
8193
8712
|
void CommandEncoder::WriteBuffer(Buffer const& buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size) const {
|
|
8194
|
-
wgpuCommandEncoderWriteBuffer(Get(), buffer.Get(), bufferOffset, reinterpret_cast<uint8_t const
|
|
8713
|
+
wgpuCommandEncoderWriteBuffer(Get(), buffer.Get(), bufferOffset, reinterpret_cast<uint8_t const *>(data), size);
|
|
8195
8714
|
}
|
|
8196
8715
|
void CommandEncoder::WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const {
|
|
8197
8716
|
wgpuCommandEncoderWriteTimestamp(Get(), querySet.Get(), queryIndex);
|
|
@@ -8232,10 +8751,10 @@ void ComputePassEncoder::PushDebugGroup(StringView groupLabel) const {
|
|
|
8232
8751
|
wgpuComputePassEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
|
|
8233
8752
|
}
|
|
8234
8753
|
void ComputePassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
|
|
8235
|
-
wgpuComputePassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const
|
|
8754
|
+
wgpuComputePassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
|
|
8236
8755
|
}
|
|
8237
8756
|
void ComputePassEncoder::SetImmediateData(uint32_t offset, void const * data, size_t size) const {
|
|
8238
|
-
wgpuComputePassEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const
|
|
8757
|
+
wgpuComputePassEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const *>(data), size);
|
|
8239
8758
|
}
|
|
8240
8759
|
void ComputePassEncoder::SetLabel(StringView label) const {
|
|
8241
8760
|
wgpuComputePassEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
@@ -8288,23 +8807,23 @@ static_assert(alignof(ComputePipeline) == alignof(WGPUComputePipeline), "alignof
|
|
|
8288
8807
|
// Device implementation
|
|
8289
8808
|
|
|
8290
8809
|
BindGroup Device::CreateBindGroup(BindGroupDescriptor const * descriptor) const {
|
|
8291
|
-
auto result = wgpuDeviceCreateBindGroup(Get(), reinterpret_cast<WGPUBindGroupDescriptor const
|
|
8810
|
+
auto result = wgpuDeviceCreateBindGroup(Get(), reinterpret_cast<WGPUBindGroupDescriptor const *>(descriptor));
|
|
8292
8811
|
return BindGroup::Acquire(result);
|
|
8293
8812
|
}
|
|
8294
8813
|
BindGroupLayout Device::CreateBindGroupLayout(BindGroupLayoutDescriptor const * descriptor) const {
|
|
8295
|
-
auto result = wgpuDeviceCreateBindGroupLayout(Get(), reinterpret_cast<WGPUBindGroupLayoutDescriptor const
|
|
8814
|
+
auto result = wgpuDeviceCreateBindGroupLayout(Get(), reinterpret_cast<WGPUBindGroupLayoutDescriptor const *>(descriptor));
|
|
8296
8815
|
return BindGroupLayout::Acquire(result);
|
|
8297
8816
|
}
|
|
8298
8817
|
Buffer Device::CreateBuffer(BufferDescriptor const * descriptor) const {
|
|
8299
|
-
auto result = wgpuDeviceCreateBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const
|
|
8818
|
+
auto result = wgpuDeviceCreateBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const *>(descriptor));
|
|
8300
8819
|
return Buffer::Acquire(result);
|
|
8301
8820
|
}
|
|
8302
8821
|
CommandEncoder Device::CreateCommandEncoder(CommandEncoderDescriptor const * descriptor) const {
|
|
8303
|
-
auto result = wgpuDeviceCreateCommandEncoder(Get(), reinterpret_cast<WGPUCommandEncoderDescriptor const
|
|
8822
|
+
auto result = wgpuDeviceCreateCommandEncoder(Get(), reinterpret_cast<WGPUCommandEncoderDescriptor const *>(descriptor));
|
|
8304
8823
|
return CommandEncoder::Acquire(result);
|
|
8305
8824
|
}
|
|
8306
8825
|
ComputePipeline Device::CreateComputePipeline(ComputePipelineDescriptor const * descriptor) const {
|
|
8307
|
-
auto result = wgpuDeviceCreateComputePipeline(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const
|
|
8826
|
+
auto result = wgpuDeviceCreateComputePipeline(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const *>(descriptor));
|
|
8308
8827
|
return ComputePipeline::Acquire(result);
|
|
8309
8828
|
}
|
|
8310
8829
|
template <typename F, typename T,
|
|
@@ -8330,7 +8849,7 @@ Future Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * desc
|
|
|
8330
8849
|
}
|
|
8331
8850
|
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8332
8851
|
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8333
|
-
auto result = wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const
|
|
8852
|
+
auto result = wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const *>(descriptor), callbackInfo);
|
|
8334
8853
|
return Future {
|
|
8335
8854
|
result.id
|
|
8336
8855
|
};
|
|
@@ -8363,13 +8882,13 @@ Future Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * desc
|
|
|
8363
8882
|
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8364
8883
|
callbackInfo.userdata2 = nullptr;
|
|
8365
8884
|
}
|
|
8366
|
-
auto result = wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const
|
|
8885
|
+
auto result = wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const *>(descriptor), callbackInfo);
|
|
8367
8886
|
return Future {
|
|
8368
8887
|
result.id
|
|
8369
8888
|
};
|
|
8370
8889
|
}
|
|
8371
8890
|
Buffer Device::CreateErrorBuffer(BufferDescriptor const * descriptor) const {
|
|
8372
|
-
auto result = wgpuDeviceCreateErrorBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const
|
|
8891
|
+
auto result = wgpuDeviceCreateErrorBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const *>(descriptor));
|
|
8373
8892
|
return Buffer::Acquire(result);
|
|
8374
8893
|
}
|
|
8375
8894
|
ExternalTexture Device::CreateErrorExternalTexture() const {
|
|
@@ -8377,31 +8896,31 @@ ExternalTexture Device::CreateErrorExternalTexture() const {
|
|
|
8377
8896
|
return ExternalTexture::Acquire(result);
|
|
8378
8897
|
}
|
|
8379
8898
|
ShaderModule Device::CreateErrorShaderModule(ShaderModuleDescriptor const * descriptor, StringView errorMessage) const {
|
|
8380
|
-
auto result = wgpuDeviceCreateErrorShaderModule(Get(), reinterpret_cast<WGPUShaderModuleDescriptor const
|
|
8899
|
+
auto result = wgpuDeviceCreateErrorShaderModule(Get(), reinterpret_cast<WGPUShaderModuleDescriptor const *>(descriptor), *reinterpret_cast<WGPUStringView const*>(&errorMessage));
|
|
8381
8900
|
return ShaderModule::Acquire(result);
|
|
8382
8901
|
}
|
|
8383
8902
|
Texture Device::CreateErrorTexture(TextureDescriptor const * descriptor) const {
|
|
8384
|
-
auto result = wgpuDeviceCreateErrorTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const
|
|
8903
|
+
auto result = wgpuDeviceCreateErrorTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const *>(descriptor));
|
|
8385
8904
|
return Texture::Acquire(result);
|
|
8386
8905
|
}
|
|
8387
8906
|
ExternalTexture Device::CreateExternalTexture(ExternalTextureDescriptor const * externalTextureDescriptor) const {
|
|
8388
|
-
auto result = wgpuDeviceCreateExternalTexture(Get(), reinterpret_cast<WGPUExternalTextureDescriptor const
|
|
8907
|
+
auto result = wgpuDeviceCreateExternalTexture(Get(), reinterpret_cast<WGPUExternalTextureDescriptor const *>(externalTextureDescriptor));
|
|
8389
8908
|
return ExternalTexture::Acquire(result);
|
|
8390
8909
|
}
|
|
8391
8910
|
PipelineLayout Device::CreatePipelineLayout(PipelineLayoutDescriptor const * descriptor) const {
|
|
8392
|
-
auto result = wgpuDeviceCreatePipelineLayout(Get(), reinterpret_cast<WGPUPipelineLayoutDescriptor const
|
|
8911
|
+
auto result = wgpuDeviceCreatePipelineLayout(Get(), reinterpret_cast<WGPUPipelineLayoutDescriptor const *>(descriptor));
|
|
8393
8912
|
return PipelineLayout::Acquire(result);
|
|
8394
8913
|
}
|
|
8395
8914
|
QuerySet Device::CreateQuerySet(QuerySetDescriptor const * descriptor) const {
|
|
8396
|
-
auto result = wgpuDeviceCreateQuerySet(Get(), reinterpret_cast<WGPUQuerySetDescriptor const
|
|
8915
|
+
auto result = wgpuDeviceCreateQuerySet(Get(), reinterpret_cast<WGPUQuerySetDescriptor const *>(descriptor));
|
|
8397
8916
|
return QuerySet::Acquire(result);
|
|
8398
8917
|
}
|
|
8399
8918
|
RenderBundleEncoder Device::CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const {
|
|
8400
|
-
auto result = wgpuDeviceCreateRenderBundleEncoder(Get(), reinterpret_cast<WGPURenderBundleEncoderDescriptor const
|
|
8919
|
+
auto result = wgpuDeviceCreateRenderBundleEncoder(Get(), reinterpret_cast<WGPURenderBundleEncoderDescriptor const *>(descriptor));
|
|
8401
8920
|
return RenderBundleEncoder::Acquire(result);
|
|
8402
8921
|
}
|
|
8403
8922
|
RenderPipeline Device::CreateRenderPipeline(RenderPipelineDescriptor const * descriptor) const {
|
|
8404
|
-
auto result = wgpuDeviceCreateRenderPipeline(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const
|
|
8923
|
+
auto result = wgpuDeviceCreateRenderPipeline(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const *>(descriptor));
|
|
8405
8924
|
return RenderPipeline::Acquire(result);
|
|
8406
8925
|
}
|
|
8407
8926
|
template <typename F, typename T,
|
|
@@ -8427,7 +8946,7 @@ Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descri
|
|
|
8427
8946
|
}
|
|
8428
8947
|
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8429
8948
|
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8430
|
-
auto result = wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const
|
|
8949
|
+
auto result = wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const *>(descriptor), callbackInfo);
|
|
8431
8950
|
return Future {
|
|
8432
8951
|
result.id
|
|
8433
8952
|
};
|
|
@@ -8460,21 +8979,21 @@ Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descri
|
|
|
8460
8979
|
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8461
8980
|
callbackInfo.userdata2 = nullptr;
|
|
8462
8981
|
}
|
|
8463
|
-
auto result = wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const
|
|
8982
|
+
auto result = wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const *>(descriptor), callbackInfo);
|
|
8464
8983
|
return Future {
|
|
8465
8984
|
result.id
|
|
8466
8985
|
};
|
|
8467
8986
|
}
|
|
8468
8987
|
Sampler Device::CreateSampler(SamplerDescriptor const * descriptor) const {
|
|
8469
|
-
auto result = wgpuDeviceCreateSampler(Get(), reinterpret_cast<WGPUSamplerDescriptor const
|
|
8988
|
+
auto result = wgpuDeviceCreateSampler(Get(), reinterpret_cast<WGPUSamplerDescriptor const *>(descriptor));
|
|
8470
8989
|
return Sampler::Acquire(result);
|
|
8471
8990
|
}
|
|
8472
8991
|
ShaderModule Device::CreateShaderModule(ShaderModuleDescriptor const * descriptor) const {
|
|
8473
|
-
auto result = wgpuDeviceCreateShaderModule(Get(), reinterpret_cast<WGPUShaderModuleDescriptor const
|
|
8992
|
+
auto result = wgpuDeviceCreateShaderModule(Get(), reinterpret_cast<WGPUShaderModuleDescriptor const *>(descriptor));
|
|
8474
8993
|
return ShaderModule::Acquire(result);
|
|
8475
8994
|
}
|
|
8476
8995
|
Texture Device::CreateTexture(TextureDescriptor const * descriptor) const {
|
|
8477
|
-
auto result = wgpuDeviceCreateTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const
|
|
8996
|
+
auto result = wgpuDeviceCreateTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const *>(descriptor));
|
|
8478
8997
|
return Texture::Acquire(result);
|
|
8479
8998
|
}
|
|
8480
8999
|
void Device::Destroy() const {
|
|
@@ -8489,19 +9008,19 @@ Adapter Device::GetAdapter() const {
|
|
|
8489
9008
|
}
|
|
8490
9009
|
ConvertibleStatus Device::GetAdapterInfo(AdapterInfo * adapterInfo) const {
|
|
8491
9010
|
*adapterInfo = AdapterInfo();
|
|
8492
|
-
auto result = wgpuDeviceGetAdapterInfo(Get(), reinterpret_cast<WGPUAdapterInfo
|
|
9011
|
+
auto result = wgpuDeviceGetAdapterInfo(Get(), reinterpret_cast<WGPUAdapterInfo *>(adapterInfo));
|
|
8493
9012
|
return static_cast<Status>(result);
|
|
8494
9013
|
}
|
|
8495
9014
|
ConvertibleStatus Device::GetAHardwareBufferProperties(void * handle, AHardwareBufferProperties * properties) const {
|
|
8496
|
-
auto result = wgpuDeviceGetAHardwareBufferProperties(Get(), handle, reinterpret_cast<WGPUAHardwareBufferProperties
|
|
9015
|
+
auto result = wgpuDeviceGetAHardwareBufferProperties(Get(), handle, reinterpret_cast<WGPUAHardwareBufferProperties *>(properties));
|
|
8497
9016
|
return static_cast<Status>(result);
|
|
8498
9017
|
}
|
|
8499
9018
|
void Device::GetFeatures(SupportedFeatures * features) const {
|
|
8500
9019
|
*features = SupportedFeatures();
|
|
8501
|
-
wgpuDeviceGetFeatures(Get(), reinterpret_cast<WGPUSupportedFeatures
|
|
9020
|
+
wgpuDeviceGetFeatures(Get(), reinterpret_cast<WGPUSupportedFeatures *>(features));
|
|
8502
9021
|
}
|
|
8503
9022
|
ConvertibleStatus Device::GetLimits(Limits * limits) const {
|
|
8504
|
-
auto result = wgpuDeviceGetLimits(Get(), reinterpret_cast<WGPULimits
|
|
9023
|
+
auto result = wgpuDeviceGetLimits(Get(), reinterpret_cast<WGPULimits *>(limits));
|
|
8505
9024
|
return static_cast<Status>(result);
|
|
8506
9025
|
}
|
|
8507
9026
|
Future Device::GetLostFuture() const {
|
|
@@ -8519,15 +9038,15 @@ Bool Device::HasFeature(FeatureName feature) const {
|
|
|
8519
9038
|
return result;
|
|
8520
9039
|
}
|
|
8521
9040
|
SharedBufferMemory Device::ImportSharedBufferMemory(SharedBufferMemoryDescriptor const * descriptor) const {
|
|
8522
|
-
auto result = wgpuDeviceImportSharedBufferMemory(Get(), reinterpret_cast<WGPUSharedBufferMemoryDescriptor const
|
|
9041
|
+
auto result = wgpuDeviceImportSharedBufferMemory(Get(), reinterpret_cast<WGPUSharedBufferMemoryDescriptor const *>(descriptor));
|
|
8523
9042
|
return SharedBufferMemory::Acquire(result);
|
|
8524
9043
|
}
|
|
8525
9044
|
SharedFence Device::ImportSharedFence(SharedFenceDescriptor const * descriptor) const {
|
|
8526
|
-
auto result = wgpuDeviceImportSharedFence(Get(), reinterpret_cast<WGPUSharedFenceDescriptor const
|
|
9045
|
+
auto result = wgpuDeviceImportSharedFence(Get(), reinterpret_cast<WGPUSharedFenceDescriptor const *>(descriptor));
|
|
8527
9046
|
return SharedFence::Acquire(result);
|
|
8528
9047
|
}
|
|
8529
9048
|
SharedTextureMemory Device::ImportSharedTextureMemory(SharedTextureMemoryDescriptor const * descriptor) const {
|
|
8530
|
-
auto result = wgpuDeviceImportSharedTextureMemory(Get(), reinterpret_cast<WGPUSharedTextureMemoryDescriptor const
|
|
9049
|
+
auto result = wgpuDeviceImportSharedTextureMemory(Get(), reinterpret_cast<WGPUSharedTextureMemoryDescriptor const *>(descriptor));
|
|
8531
9050
|
return SharedTextureMemory::Acquire(result);
|
|
8532
9051
|
}
|
|
8533
9052
|
void Device::InjectError(ErrorType type, StringView message) const {
|
|
@@ -8657,7 +9176,7 @@ void Device::Tick() const {
|
|
|
8657
9176
|
wgpuDeviceTick(Get());
|
|
8658
9177
|
}
|
|
8659
9178
|
void Device::ValidateTextureDescriptor(TextureDescriptor const * descriptor) const {
|
|
8660
|
-
wgpuDeviceValidateTextureDescriptor(Get(), reinterpret_cast<WGPUTextureDescriptor const
|
|
9179
|
+
wgpuDeviceValidateTextureDescriptor(Get(), reinterpret_cast<WGPUTextureDescriptor const *>(descriptor));
|
|
8661
9180
|
}
|
|
8662
9181
|
|
|
8663
9182
|
|
|
@@ -8706,13 +9225,12 @@ static_assert(alignof(ExternalTexture) == alignof(WGPUExternalTexture), "alignof
|
|
|
8706
9225
|
// Instance implementation
|
|
8707
9226
|
|
|
8708
9227
|
Surface Instance::CreateSurface(SurfaceDescriptor const * descriptor) const {
|
|
8709
|
-
auto result = wgpuInstanceCreateSurface(Get(), reinterpret_cast<WGPUSurfaceDescriptor const
|
|
9228
|
+
auto result = wgpuInstanceCreateSurface(Get(), reinterpret_cast<WGPUSurfaceDescriptor const *>(descriptor));
|
|
8710
9229
|
return Surface::Acquire(result);
|
|
8711
9230
|
}
|
|
8712
|
-
|
|
9231
|
+
void Instance::GetWGSLLanguageFeatures(SupportedWGSLLanguageFeatures * features) const {
|
|
8713
9232
|
*features = SupportedWGSLLanguageFeatures();
|
|
8714
|
-
|
|
8715
|
-
return static_cast<Status>(result);
|
|
9233
|
+
wgpuInstanceGetWGSLLanguageFeatures(Get(), reinterpret_cast<WGPUSupportedWGSLLanguageFeatures *>(features));
|
|
8716
9234
|
}
|
|
8717
9235
|
Bool Instance::HasWGSLLanguageFeature(WGSLLanguageFeatureName feature) const {
|
|
8718
9236
|
auto result = wgpuInstanceHasWGSLLanguageFeature(Get(), static_cast<WGPUWGSLLanguageFeatureName>(feature));
|
|
@@ -8744,7 +9262,7 @@ Future Instance::RequestAdapter(RequestAdapterOptions const * options, CallbackM
|
|
|
8744
9262
|
}
|
|
8745
9263
|
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8746
9264
|
callbackInfo.userdata2 = reinterpret_cast<void*>(userdata);
|
|
8747
|
-
auto result = wgpuInstanceRequestAdapter(Get(), reinterpret_cast<WGPURequestAdapterOptions const
|
|
9265
|
+
auto result = wgpuInstanceRequestAdapter(Get(), reinterpret_cast<WGPURequestAdapterOptions const *>(options), callbackInfo);
|
|
8748
9266
|
return Future {
|
|
8749
9267
|
result.id
|
|
8750
9268
|
};
|
|
@@ -8777,13 +9295,13 @@ Future Instance::RequestAdapter(RequestAdapterOptions const * options, CallbackM
|
|
|
8777
9295
|
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8778
9296
|
callbackInfo.userdata2 = nullptr;
|
|
8779
9297
|
}
|
|
8780
|
-
auto result = wgpuInstanceRequestAdapter(Get(), reinterpret_cast<WGPURequestAdapterOptions const
|
|
9298
|
+
auto result = wgpuInstanceRequestAdapter(Get(), reinterpret_cast<WGPURequestAdapterOptions const *>(options), callbackInfo);
|
|
8781
9299
|
return Future {
|
|
8782
9300
|
result.id
|
|
8783
9301
|
};
|
|
8784
9302
|
}
|
|
8785
9303
|
WaitStatus Instance::WaitAny(size_t futureCount, FutureWaitInfo * futures, uint64_t timeoutNS) const {
|
|
8786
|
-
auto result = wgpuInstanceWaitAny(Get(), futureCount, reinterpret_cast<WGPUFutureWaitInfo
|
|
9304
|
+
auto result = wgpuInstanceWaitAny(Get(), futureCount, reinterpret_cast<WGPUFutureWaitInfo *>(futures), timeoutNS);
|
|
8787
9305
|
return static_cast<WaitStatus>(result);
|
|
8788
9306
|
}
|
|
8789
9307
|
|
|
@@ -8859,10 +9377,10 @@ static_assert(alignof(QuerySet) == alignof(WGPUQuerySet), "alignof mismatch for
|
|
|
8859
9377
|
// Queue implementation
|
|
8860
9378
|
|
|
8861
9379
|
void Queue::CopyExternalTextureForBrowser(ImageCopyExternalTexture const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize, CopyTextureForBrowserOptions const * options) const {
|
|
8862
|
-
wgpuQueueCopyExternalTextureForBrowser(Get(), reinterpret_cast<WGPUImageCopyExternalTexture const
|
|
9380
|
+
wgpuQueueCopyExternalTextureForBrowser(Get(), reinterpret_cast<WGPUImageCopyExternalTexture const *>(source), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(destination), reinterpret_cast<WGPUExtent3D const *>(copySize), reinterpret_cast<WGPUCopyTextureForBrowserOptions const *>(options));
|
|
8863
9381
|
}
|
|
8864
9382
|
void Queue::CopyTextureForBrowser(TexelCopyTextureInfo const * source, TexelCopyTextureInfo const * destination, Extent3D const * copySize, CopyTextureForBrowserOptions const * options) const {
|
|
8865
|
-
wgpuQueueCopyTextureForBrowser(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const
|
|
9383
|
+
wgpuQueueCopyTextureForBrowser(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(source), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(destination), reinterpret_cast<WGPUExtent3D const *>(copySize), reinterpret_cast<WGPUCopyTextureForBrowserOptions const *>(options));
|
|
8866
9384
|
}
|
|
8867
9385
|
template <typename F, typename T,
|
|
8868
9386
|
typename Cb,
|
|
@@ -8872,14 +9390,17 @@ Future Queue::OnSubmittedWorkDone(CallbackMode callbackMode,F callback, T userda
|
|
|
8872
9390
|
WGPUQueueWorkDoneCallbackInfo callbackInfo = {};
|
|
8873
9391
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8874
9392
|
if constexpr (std::is_convertible_v<F, Cb*>) {
|
|
8875
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, void* callback_param, void* userdata_param) {
|
|
9393
|
+
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8876
9394
|
auto cb = reinterpret_cast<Cb*>(callback_param);
|
|
8877
|
-
(*cb)(static_cast<QueueWorkDoneStatus>(status),
|
|
9395
|
+
(*cb)(static_cast<QueueWorkDoneStatus>(status), StringView {
|
|
9396
|
+
message.data,
|
|
9397
|
+
message.length
|
|
9398
|
+
}, static_cast<T>(userdata_param));
|
|
8878
9399
|
};
|
|
8879
9400
|
} else {
|
|
8880
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, void* callback_param, void* userdata_param) {
|
|
9401
|
+
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void* userdata_param) {
|
|
8881
9402
|
auto cb = reinterpret_cast<CbChar*>(callback_param);
|
|
8882
|
-
(*cb)(static_cast<QueueWorkDoneStatus>(status), static_cast<T>(userdata_param));
|
|
9403
|
+
(*cb)(static_cast<QueueWorkDoneStatus>(status), {detail::StringViewAdapter(message)}, static_cast<T>(userdata_param));
|
|
8883
9404
|
};
|
|
8884
9405
|
}
|
|
8885
9406
|
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
@@ -8899,17 +9420,20 @@ Future Queue::OnSubmittedWorkDone(CallbackMode callbackMode,L callback) const {
|
|
|
8899
9420
|
WGPUQueueWorkDoneCallbackInfo callbackInfo = {};
|
|
8900
9421
|
callbackInfo.mode = static_cast<WGPUCallbackMode>(callbackMode);
|
|
8901
9422
|
if constexpr (std::is_convertible_v<L, F*>) {
|
|
8902
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, void* callback_param, void*) {
|
|
9423
|
+
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void*) {
|
|
8903
9424
|
auto cb = reinterpret_cast<F*>(callback_param);
|
|
8904
|
-
(*cb)(static_cast<QueueWorkDoneStatus>(status)
|
|
9425
|
+
(*cb)(static_cast<QueueWorkDoneStatus>(status), StringView {
|
|
9426
|
+
message.data,
|
|
9427
|
+
message.length
|
|
9428
|
+
});
|
|
8905
9429
|
};
|
|
8906
9430
|
callbackInfo.userdata1 = reinterpret_cast<void*>(+callback);
|
|
8907
9431
|
callbackInfo.userdata2 = nullptr;
|
|
8908
9432
|
} else {
|
|
8909
9433
|
auto* lambda = new L(std::move(callback));
|
|
8910
|
-
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, void* callback_param, void*) {
|
|
9434
|
+
callbackInfo.callback = [](WGPUQueueWorkDoneStatus status, WGPUStringView message, void* callback_param, void*) {
|
|
8911
9435
|
std::unique_ptr<L> the_lambda(reinterpret_cast<L*>(callback_param));
|
|
8912
|
-
(*the_lambda)(static_cast<QueueWorkDoneStatus>(status));
|
|
9436
|
+
(*the_lambda)(static_cast<QueueWorkDoneStatus>(status), {detail::StringViewAdapter(message)});
|
|
8913
9437
|
};
|
|
8914
9438
|
callbackInfo.userdata1 = reinterpret_cast<void*>(lambda);
|
|
8915
9439
|
callbackInfo.userdata2 = nullptr;
|
|
@@ -8923,13 +9447,13 @@ void Queue::SetLabel(StringView label) const {
|
|
|
8923
9447
|
wgpuQueueSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
8924
9448
|
}
|
|
8925
9449
|
void Queue::Submit(size_t commandCount, CommandBuffer const * commands) const {
|
|
8926
|
-
wgpuQueueSubmit(Get(), commandCount, reinterpret_cast<WGPUCommandBuffer const
|
|
9450
|
+
wgpuQueueSubmit(Get(), commandCount, reinterpret_cast<WGPUCommandBuffer const *>(commands));
|
|
8927
9451
|
}
|
|
8928
9452
|
void Queue::WriteBuffer(Buffer const& buffer, uint64_t bufferOffset, void const * data, size_t size) const {
|
|
8929
|
-
wgpuQueueWriteBuffer(Get(), buffer.Get(), bufferOffset, reinterpret_cast<void const
|
|
9453
|
+
wgpuQueueWriteBuffer(Get(), buffer.Get(), bufferOffset, reinterpret_cast<void const *>(data), size);
|
|
8930
9454
|
}
|
|
8931
9455
|
void Queue::WriteTexture(TexelCopyTextureInfo const * destination, void const * data, size_t dataSize, TexelCopyBufferLayout const * dataLayout, Extent3D const * writeSize) const {
|
|
8932
|
-
wgpuQueueWriteTexture(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const
|
|
9456
|
+
wgpuQueueWriteTexture(Get(), reinterpret_cast<WGPUTexelCopyTextureInfo const *>(destination), reinterpret_cast<void const *>(data), dataSize, reinterpret_cast<WGPUTexelCopyBufferLayout const *>(dataLayout), reinterpret_cast<WGPUExtent3D const *>(writeSize));
|
|
8933
9457
|
}
|
|
8934
9458
|
|
|
8935
9459
|
|
|
@@ -8981,7 +9505,7 @@ void RenderBundleEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t in
|
|
|
8981
9505
|
wgpuRenderBundleEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset);
|
|
8982
9506
|
}
|
|
8983
9507
|
RenderBundle RenderBundleEncoder::Finish(RenderBundleDescriptor const * descriptor) const {
|
|
8984
|
-
auto result = wgpuRenderBundleEncoderFinish(Get(), reinterpret_cast<WGPURenderBundleDescriptor const
|
|
9508
|
+
auto result = wgpuRenderBundleEncoderFinish(Get(), reinterpret_cast<WGPURenderBundleDescriptor const *>(descriptor));
|
|
8985
9509
|
return RenderBundle::Acquire(result);
|
|
8986
9510
|
}
|
|
8987
9511
|
void RenderBundleEncoder::InsertDebugMarker(StringView markerLabel) const {
|
|
@@ -8994,10 +9518,10 @@ void RenderBundleEncoder::PushDebugGroup(StringView groupLabel) const {
|
|
|
8994
9518
|
wgpuRenderBundleEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
|
|
8995
9519
|
}
|
|
8996
9520
|
void RenderBundleEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
|
|
8997
|
-
wgpuRenderBundleEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const
|
|
9521
|
+
wgpuRenderBundleEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
|
|
8998
9522
|
}
|
|
8999
9523
|
void RenderBundleEncoder::SetImmediateData(uint32_t offset, void const * data, size_t size) const {
|
|
9000
|
-
wgpuRenderBundleEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const
|
|
9524
|
+
wgpuRenderBundleEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const *>(data), size);
|
|
9001
9525
|
}
|
|
9002
9526
|
void RenderBundleEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
|
|
9003
9527
|
wgpuRenderBundleEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
|
|
@@ -9050,7 +9574,7 @@ void RenderPassEncoder::EndOcclusionQuery() const {
|
|
|
9050
9574
|
wgpuRenderPassEncoderEndOcclusionQuery(Get());
|
|
9051
9575
|
}
|
|
9052
9576
|
void RenderPassEncoder::ExecuteBundles(size_t bundleCount, RenderBundle const * bundles) const {
|
|
9053
|
-
wgpuRenderPassEncoderExecuteBundles(Get(), bundleCount, reinterpret_cast<WGPURenderBundle const
|
|
9577
|
+
wgpuRenderPassEncoderExecuteBundles(Get(), bundleCount, reinterpret_cast<WGPURenderBundle const *>(bundles));
|
|
9054
9578
|
}
|
|
9055
9579
|
void RenderPassEncoder::InsertDebugMarker(StringView markerLabel) const {
|
|
9056
9580
|
wgpuRenderPassEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
|
|
@@ -9071,13 +9595,13 @@ void RenderPassEncoder::PushDebugGroup(StringView groupLabel) const {
|
|
|
9071
9595
|
wgpuRenderPassEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
|
|
9072
9596
|
}
|
|
9073
9597
|
void RenderPassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
|
|
9074
|
-
wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const
|
|
9598
|
+
wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
|
|
9075
9599
|
}
|
|
9076
9600
|
void RenderPassEncoder::SetBlendConstant(Color const * color) const {
|
|
9077
|
-
wgpuRenderPassEncoderSetBlendConstant(Get(), reinterpret_cast<WGPUColor const
|
|
9601
|
+
wgpuRenderPassEncoderSetBlendConstant(Get(), reinterpret_cast<WGPUColor const *>(color));
|
|
9078
9602
|
}
|
|
9079
9603
|
void RenderPassEncoder::SetImmediateData(uint32_t offset, void const * data, size_t size) const {
|
|
9080
|
-
wgpuRenderPassEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const
|
|
9604
|
+
wgpuRenderPassEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const *>(data), size);
|
|
9081
9605
|
}
|
|
9082
9606
|
void RenderPassEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
|
|
9083
9607
|
wgpuRenderPassEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
|
|
@@ -9240,20 +9764,20 @@ static_assert(alignof(ShaderModule) == alignof(WGPUShaderModule), "alignof misma
|
|
|
9240
9764
|
// SharedBufferMemory implementation
|
|
9241
9765
|
|
|
9242
9766
|
ConvertibleStatus SharedBufferMemory::BeginAccess(Buffer const& buffer, SharedBufferMemoryBeginAccessDescriptor const * descriptor) const {
|
|
9243
|
-
auto result = wgpuSharedBufferMemoryBeginAccess(Get(), buffer.Get(), reinterpret_cast<WGPUSharedBufferMemoryBeginAccessDescriptor const
|
|
9767
|
+
auto result = wgpuSharedBufferMemoryBeginAccess(Get(), buffer.Get(), reinterpret_cast<WGPUSharedBufferMemoryBeginAccessDescriptor const *>(descriptor));
|
|
9244
9768
|
return static_cast<Status>(result);
|
|
9245
9769
|
}
|
|
9246
9770
|
Buffer SharedBufferMemory::CreateBuffer(BufferDescriptor const * descriptor) const {
|
|
9247
|
-
auto result = wgpuSharedBufferMemoryCreateBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const
|
|
9771
|
+
auto result = wgpuSharedBufferMemoryCreateBuffer(Get(), reinterpret_cast<WGPUBufferDescriptor const *>(descriptor));
|
|
9248
9772
|
return Buffer::Acquire(result);
|
|
9249
9773
|
}
|
|
9250
9774
|
ConvertibleStatus SharedBufferMemory::EndAccess(Buffer const& buffer, SharedBufferMemoryEndAccessState * descriptor) const {
|
|
9251
9775
|
*descriptor = SharedBufferMemoryEndAccessState();
|
|
9252
|
-
auto result = wgpuSharedBufferMemoryEndAccess(Get(), buffer.Get(), reinterpret_cast<WGPUSharedBufferMemoryEndAccessState
|
|
9776
|
+
auto result = wgpuSharedBufferMemoryEndAccess(Get(), buffer.Get(), reinterpret_cast<WGPUSharedBufferMemoryEndAccessState *>(descriptor));
|
|
9253
9777
|
return static_cast<Status>(result);
|
|
9254
9778
|
}
|
|
9255
9779
|
ConvertibleStatus SharedBufferMemory::GetProperties(SharedBufferMemoryProperties * properties) const {
|
|
9256
|
-
auto result = wgpuSharedBufferMemoryGetProperties(Get(), reinterpret_cast<WGPUSharedBufferMemoryProperties
|
|
9780
|
+
auto result = wgpuSharedBufferMemoryGetProperties(Get(), reinterpret_cast<WGPUSharedBufferMemoryProperties *>(properties));
|
|
9257
9781
|
return static_cast<Status>(result);
|
|
9258
9782
|
}
|
|
9259
9783
|
Bool SharedBufferMemory::IsDeviceLost() const {
|
|
@@ -9281,7 +9805,7 @@ static_assert(alignof(SharedBufferMemory) == alignof(WGPUSharedBufferMemory), "a
|
|
|
9281
9805
|
// SharedFence implementation
|
|
9282
9806
|
|
|
9283
9807
|
void SharedFence::ExportInfo(SharedFenceExportInfo * info) const {
|
|
9284
|
-
wgpuSharedFenceExportInfo(Get(), reinterpret_cast<WGPUSharedFenceExportInfo
|
|
9808
|
+
wgpuSharedFenceExportInfo(Get(), reinterpret_cast<WGPUSharedFenceExportInfo *>(info));
|
|
9285
9809
|
}
|
|
9286
9810
|
|
|
9287
9811
|
|
|
@@ -9301,20 +9825,20 @@ static_assert(alignof(SharedFence) == alignof(WGPUSharedFence), "alignof mismatc
|
|
|
9301
9825
|
// SharedTextureMemory implementation
|
|
9302
9826
|
|
|
9303
9827
|
ConvertibleStatus SharedTextureMemory::BeginAccess(Texture const& texture, SharedTextureMemoryBeginAccessDescriptor const * descriptor) const {
|
|
9304
|
-
auto result = wgpuSharedTextureMemoryBeginAccess(Get(), texture.Get(), reinterpret_cast<WGPUSharedTextureMemoryBeginAccessDescriptor const
|
|
9828
|
+
auto result = wgpuSharedTextureMemoryBeginAccess(Get(), texture.Get(), reinterpret_cast<WGPUSharedTextureMemoryBeginAccessDescriptor const *>(descriptor));
|
|
9305
9829
|
return static_cast<Status>(result);
|
|
9306
9830
|
}
|
|
9307
9831
|
Texture SharedTextureMemory::CreateTexture(TextureDescriptor const * descriptor) const {
|
|
9308
|
-
auto result = wgpuSharedTextureMemoryCreateTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const
|
|
9832
|
+
auto result = wgpuSharedTextureMemoryCreateTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const *>(descriptor));
|
|
9309
9833
|
return Texture::Acquire(result);
|
|
9310
9834
|
}
|
|
9311
9835
|
ConvertibleStatus SharedTextureMemory::EndAccess(Texture const& texture, SharedTextureMemoryEndAccessState * descriptor) const {
|
|
9312
9836
|
*descriptor = SharedTextureMemoryEndAccessState();
|
|
9313
|
-
auto result = wgpuSharedTextureMemoryEndAccess(Get(), texture.Get(), reinterpret_cast<WGPUSharedTextureMemoryEndAccessState
|
|
9837
|
+
auto result = wgpuSharedTextureMemoryEndAccess(Get(), texture.Get(), reinterpret_cast<WGPUSharedTextureMemoryEndAccessState *>(descriptor));
|
|
9314
9838
|
return static_cast<Status>(result);
|
|
9315
9839
|
}
|
|
9316
9840
|
ConvertibleStatus SharedTextureMemory::GetProperties(SharedTextureMemoryProperties * properties) const {
|
|
9317
|
-
auto result = wgpuSharedTextureMemoryGetProperties(Get(), reinterpret_cast<WGPUSharedTextureMemoryProperties
|
|
9841
|
+
auto result = wgpuSharedTextureMemoryGetProperties(Get(), reinterpret_cast<WGPUSharedTextureMemoryProperties *>(properties));
|
|
9318
9842
|
return static_cast<Status>(result);
|
|
9319
9843
|
}
|
|
9320
9844
|
Bool SharedTextureMemory::IsDeviceLost() const {
|
|
@@ -9342,18 +9866,19 @@ static_assert(alignof(SharedTextureMemory) == alignof(WGPUSharedTextureMemory),
|
|
|
9342
9866
|
// Surface implementation
|
|
9343
9867
|
|
|
9344
9868
|
void Surface::Configure(SurfaceConfiguration const * config) const {
|
|
9345
|
-
wgpuSurfaceConfigure(Get(), reinterpret_cast<WGPUSurfaceConfiguration const
|
|
9869
|
+
wgpuSurfaceConfigure(Get(), reinterpret_cast<WGPUSurfaceConfiguration const *>(config));
|
|
9346
9870
|
}
|
|
9347
9871
|
ConvertibleStatus Surface::GetCapabilities(Adapter const& adapter, SurfaceCapabilities * capabilities) const {
|
|
9348
9872
|
*capabilities = SurfaceCapabilities();
|
|
9349
|
-
auto result = wgpuSurfaceGetCapabilities(Get(), adapter.Get(), reinterpret_cast<WGPUSurfaceCapabilities
|
|
9873
|
+
auto result = wgpuSurfaceGetCapabilities(Get(), adapter.Get(), reinterpret_cast<WGPUSurfaceCapabilities *>(capabilities));
|
|
9350
9874
|
return static_cast<Status>(result);
|
|
9351
9875
|
}
|
|
9352
9876
|
void Surface::GetCurrentTexture(SurfaceTexture * surfaceTexture) const {
|
|
9353
|
-
wgpuSurfaceGetCurrentTexture(Get(), reinterpret_cast<WGPUSurfaceTexture
|
|
9877
|
+
wgpuSurfaceGetCurrentTexture(Get(), reinterpret_cast<WGPUSurfaceTexture *>(surfaceTexture));
|
|
9354
9878
|
}
|
|
9355
|
-
|
|
9356
|
-
wgpuSurfacePresent(Get());
|
|
9879
|
+
ConvertibleStatus Surface::Present() const {
|
|
9880
|
+
auto result = wgpuSurfacePresent(Get());
|
|
9881
|
+
return static_cast<Status>(result);
|
|
9357
9882
|
}
|
|
9358
9883
|
void Surface::SetLabel(StringView label) const {
|
|
9359
9884
|
wgpuSurfaceSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
@@ -9376,14 +9901,34 @@ void Surface::WGPURelease(WGPUSurface handle) {
|
|
|
9376
9901
|
static_assert(sizeof(Surface) == sizeof(WGPUSurface), "sizeof mismatch for Surface");
|
|
9377
9902
|
static_assert(alignof(Surface) == alignof(WGPUSurface), "alignof mismatch for Surface");
|
|
9378
9903
|
|
|
9904
|
+
// TexelBufferView implementation
|
|
9905
|
+
|
|
9906
|
+
void TexelBufferView::SetLabel(StringView label) const {
|
|
9907
|
+
wgpuTexelBufferViewSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
9908
|
+
}
|
|
9909
|
+
|
|
9910
|
+
|
|
9911
|
+
void TexelBufferView::WGPUAddRef(WGPUTexelBufferView handle) {
|
|
9912
|
+
if (handle != nullptr) {
|
|
9913
|
+
wgpuTexelBufferViewAddRef(handle);
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
void TexelBufferView::WGPURelease(WGPUTexelBufferView handle) {
|
|
9917
|
+
if (handle != nullptr) {
|
|
9918
|
+
wgpuTexelBufferViewRelease(handle);
|
|
9919
|
+
}
|
|
9920
|
+
}
|
|
9921
|
+
static_assert(sizeof(TexelBufferView) == sizeof(WGPUTexelBufferView), "sizeof mismatch for TexelBufferView");
|
|
9922
|
+
static_assert(alignof(TexelBufferView) == alignof(WGPUTexelBufferView), "alignof mismatch for TexelBufferView");
|
|
9923
|
+
|
|
9379
9924
|
// Texture implementation
|
|
9380
9925
|
|
|
9381
9926
|
TextureView Texture::CreateErrorView(TextureViewDescriptor const * descriptor) const {
|
|
9382
|
-
auto result = wgpuTextureCreateErrorView(Get(), reinterpret_cast<WGPUTextureViewDescriptor const
|
|
9927
|
+
auto result = wgpuTextureCreateErrorView(Get(), reinterpret_cast<WGPUTextureViewDescriptor const *>(descriptor));
|
|
9383
9928
|
return TextureView::Acquire(result);
|
|
9384
9929
|
}
|
|
9385
9930
|
TextureView Texture::CreateView(TextureViewDescriptor const * descriptor) const {
|
|
9386
|
-
auto result = wgpuTextureCreateView(Get(), reinterpret_cast<WGPUTextureViewDescriptor const
|
|
9931
|
+
auto result = wgpuTextureCreateView(Get(), reinterpret_cast<WGPUTextureViewDescriptor const *>(descriptor));
|
|
9387
9932
|
return TextureView::Acquire(result);
|
|
9388
9933
|
}
|
|
9389
9934
|
void Texture::Destroy() const {
|
|
@@ -9421,9 +9966,15 @@ uint32_t Texture::GetWidth() const {
|
|
|
9421
9966
|
auto result = wgpuTextureGetWidth(Get());
|
|
9422
9967
|
return result;
|
|
9423
9968
|
}
|
|
9969
|
+
void Texture::Pin(TextureUsage usage) const {
|
|
9970
|
+
wgpuTexturePin(Get(), static_cast<WGPUTextureUsage>(usage));
|
|
9971
|
+
}
|
|
9424
9972
|
void Texture::SetLabel(StringView label) const {
|
|
9425
9973
|
wgpuTextureSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
|
|
9426
9974
|
}
|
|
9975
|
+
void Texture::Unpin() const {
|
|
9976
|
+
wgpuTextureUnpin(Get());
|
|
9977
|
+
}
|
|
9427
9978
|
|
|
9428
9979
|
|
|
9429
9980
|
void Texture::WGPUAddRef(WGPUTexture handle) {
|
|
@@ -9491,13 +10042,20 @@ using SurfaceDescriptorFromXlibWindow = SurfaceSourceXlibWindow;
|
|
|
9491
10042
|
|
|
9492
10043
|
// Free Functions
|
|
9493
10044
|
static inline Instance CreateInstance(InstanceDescriptor const * descriptor = nullptr) {
|
|
9494
|
-
auto result = wgpuCreateInstance(reinterpret_cast<WGPUInstanceDescriptor const
|
|
10045
|
+
auto result = wgpuCreateInstance(reinterpret_cast<WGPUInstanceDescriptor const *>(descriptor));
|
|
9495
10046
|
return Instance::Acquire(result);
|
|
9496
10047
|
}
|
|
9497
|
-
static inline
|
|
9498
|
-
|
|
10048
|
+
static inline void GetInstanceFeatures(SupportedInstanceFeatures * features) {
|
|
10049
|
+
wgpuGetInstanceFeatures(reinterpret_cast<WGPUSupportedInstanceFeatures *>(features));
|
|
10050
|
+
}
|
|
10051
|
+
static inline Status GetInstanceLimits(InstanceLimits * limits) {
|
|
10052
|
+
auto result = wgpuGetInstanceLimits(reinterpret_cast<WGPUInstanceLimits *>(limits));
|
|
9499
10053
|
return static_cast<Status>(result);
|
|
9500
10054
|
}
|
|
10055
|
+
static inline Bool HasInstanceFeature(InstanceFeatureName feature) {
|
|
10056
|
+
auto result = wgpuHasInstanceFeature(static_cast<WGPUInstanceFeatureName>(feature));
|
|
10057
|
+
return result;
|
|
10058
|
+
}
|
|
9501
10059
|
static inline Proc GetProcAddress(StringView procName) {
|
|
9502
10060
|
auto result = wgpuGetProcAddress(*reinterpret_cast<WGPUStringView const*>(&procName));
|
|
9503
10061
|
return reinterpret_cast<Proc>(result);
|