react-native-wgpu 0.5.10 → 0.5.11

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.
@@ -54,6 +54,7 @@ static constexpr uint32_t kArrayLayerCountUndefined = WGPU_ARRAY_LAYER_COUNT_UND
54
54
  static constexpr uint32_t kCopyStrideUndefined = WGPU_COPY_STRIDE_UNDEFINED;
55
55
  static constexpr float kDepthClearValueUndefined = std::numeric_limits<float>::quiet_NaN();
56
56
  static constexpr uint32_t kDepthSliceUndefined = WGPU_DEPTH_SLICE_UNDEFINED;
57
+ static constexpr uint32_t kInvalidBinding = WGPU_INVALID_BINDING;
57
58
  static constexpr uint32_t kLimitU32Undefined = WGPU_LIMIT_U32_UNDEFINED;
58
59
  static constexpr uint64_t kLimitU64Undefined = WGPU_LIMIT_U64_UNDEFINED;
59
60
  static constexpr uint32_t kMipLevelCountUndefined = WGPU_MIP_LEVEL_COUNT_UNDEFINED;
@@ -240,13 +241,6 @@ enum class DeviceLostReason : uint32_t {
240
241
  static_assert(sizeof(DeviceLostReason) == sizeof(WGPUDeviceLostReason), "sizeof mismatch for DeviceLostReason");
241
242
  static_assert(alignof(DeviceLostReason) == alignof(WGPUDeviceLostReason), "alignof mismatch for DeviceLostReason");
242
243
 
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
-
250
244
  enum class ErrorFilter : uint32_t {
251
245
  Validation = WGPUErrorFilter_Validation,
252
246
  OutOfMemory = WGPUErrorFilter_OutOfMemory,
@@ -304,6 +298,7 @@ enum class FeatureName : uint32_t {
304
298
  TextureFormatsTier1 = WGPUFeatureName_TextureFormatsTier1,
305
299
  TextureFormatsTier2 = WGPUFeatureName_TextureFormatsTier2,
306
300
  PrimitiveIndex = WGPUFeatureName_PrimitiveIndex,
301
+ TextureComponentSwizzle = WGPUFeatureName_TextureComponentSwizzle,
307
302
  DawnInternalUsages = WGPUFeatureName_DawnInternalUsages,
308
303
  DawnMultiPlanarFormats = WGPUFeatureName_DawnMultiPlanarFormats,
309
304
  DawnNative = WGPUFeatureName_DawnNative,
@@ -316,7 +311,6 @@ enum class FeatureName : uint32_t {
316
311
  PixelLocalStorageCoherent = WGPUFeatureName_PixelLocalStorageCoherent,
317
312
  PixelLocalStorageNonCoherent = WGPUFeatureName_PixelLocalStorageNonCoherent,
318
313
  Unorm16TextureFormats = WGPUFeatureName_Unorm16TextureFormats,
319
- Snorm16TextureFormats = WGPUFeatureName_Snorm16TextureFormats,
320
314
  MultiPlanarFormatExtendedUsages = WGPUFeatureName_MultiPlanarFormatExtendedUsages,
321
315
  MultiPlanarFormatP010 = WGPUFeatureName_MultiPlanarFormatP010,
322
316
  HostMappedPointer = WGPUFeatureName_HostMappedPointer,
@@ -327,10 +321,8 @@ enum class FeatureName : uint32_t {
327
321
  AdapterPropertiesMemoryHeaps = WGPUFeatureName_AdapterPropertiesMemoryHeaps,
328
322
  AdapterPropertiesD3D = WGPUFeatureName_AdapterPropertiesD3D,
329
323
  AdapterPropertiesVk = WGPUFeatureName_AdapterPropertiesVk,
330
- R8UnormStorage = WGPUFeatureName_R8UnormStorage,
331
324
  DawnFormatCapabilities = WGPUFeatureName_DawnFormatCapabilities,
332
325
  DawnDrmFormatCapabilities = WGPUFeatureName_DawnDrmFormatCapabilities,
333
- Norm16TextureFormats = WGPUFeatureName_Norm16TextureFormats,
334
326
  MultiPlanarFormatNv16 = WGPUFeatureName_MultiPlanarFormatNv16,
335
327
  MultiPlanarFormatNv24 = WGPUFeatureName_MultiPlanarFormatNv24,
336
328
  MultiPlanarFormatP210 = WGPUFeatureName_MultiPlanarFormatP210,
@@ -361,9 +353,16 @@ enum class FeatureName : uint32_t {
361
353
  ChromiumExperimentalSubgroupMatrix = WGPUFeatureName_ChromiumExperimentalSubgroupMatrix,
362
354
  SharedFenceEGLSync = WGPUFeatureName_SharedFenceEGLSync,
363
355
  DawnDeviceAllocatorControl = WGPUFeatureName_DawnDeviceAllocatorControl,
364
- TextureComponentSwizzle = WGPUFeatureName_TextureComponentSwizzle,
365
- ChromiumExperimentalBindless = WGPUFeatureName_ChromiumExperimentalBindless,
366
356
  AdapterPropertiesWGPU = WGPUFeatureName_AdapterPropertiesWGPU,
357
+ SharedBufferMemoryD3D12SharedMemoryFileMappingHandle = WGPUFeatureName_SharedBufferMemoryD3D12SharedMemoryFileMappingHandle,
358
+ SharedTextureMemoryD3D12Resource = WGPUFeatureName_SharedTextureMemoryD3D12Resource,
359
+ ChromiumExperimentalSamplingResourceTable = WGPUFeatureName_ChromiumExperimentalSamplingResourceTable,
360
+ ChromiumExperimentalSubgroupSizeControl = WGPUFeatureName_ChromiumExperimentalSubgroupSizeControl,
361
+ AtomicVec2uMinMax = WGPUFeatureName_AtomicVec2uMinMax,
362
+ Unorm16FormatsForExternalTexture = WGPUFeatureName_Unorm16FormatsForExternalTexture,
363
+ OpaqueYCbCrAndroidForExternalTexture = WGPUFeatureName_OpaqueYCbCrAndroidForExternalTexture,
364
+ Unorm16Filterable = WGPUFeatureName_Unorm16Filterable,
365
+ RenderPassRenderArea = WGPUFeatureName_RenderPassRenderArea,
367
366
  };
368
367
  static_assert(sizeof(FeatureName) == sizeof(WGPUFeatureName), "sizeof mismatch for FeatureName");
369
368
  static_assert(alignof(FeatureName) == alignof(WGPUFeatureName), "alignof mismatch for FeatureName");
@@ -583,12 +582,13 @@ enum class SType : uint32_t {
583
582
  SurfaceSourceXCBWindow = WGPUSType_SurfaceSourceXCBWindow,
584
583
  SurfaceColorManagement = WGPUSType_SurfaceColorManagement,
585
584
  RequestAdapterWebXROptions = WGPUSType_RequestAdapterWebXROptions,
585
+ TextureComponentSwizzleDescriptor = WGPUSType_TextureComponentSwizzleDescriptor,
586
+ ExternalTextureBindingLayout = WGPUSType_ExternalTextureBindingLayout,
587
+ ExternalTextureBindingEntry = WGPUSType_ExternalTextureBindingEntry,
586
588
  CompatibilityModeLimits = WGPUSType_CompatibilityModeLimits,
587
- TextureBindingViewDimensionDescriptor = WGPUSType_TextureBindingViewDimensionDescriptor,
589
+ TextureBindingViewDimension = WGPUSType_TextureBindingViewDimension,
588
590
  EmscriptenSurfaceSourceCanvasHTMLSelector = WGPUSType_EmscriptenSurfaceSourceCanvasHTMLSelector,
589
591
  SurfaceDescriptorFromWindowsCoreWindow = WGPUSType_SurfaceDescriptorFromWindowsCoreWindow,
590
- ExternalTextureBindingEntry = WGPUSType_ExternalTextureBindingEntry,
591
- ExternalTextureBindingLayout = WGPUSType_ExternalTextureBindingLayout,
592
592
  SurfaceDescriptorFromWindowsUWPSwapChainPanel = WGPUSType_SurfaceDescriptorFromWindowsUWPSwapChainPanel,
593
593
  DawnTextureInternalUsageDescriptor = WGPUSType_DawnTextureInternalUsageDescriptor,
594
594
  DawnEncoderInternalUsageDescriptor = WGPUSType_DawnEncoderInternalUsageDescriptor,
@@ -601,7 +601,7 @@ enum class SType : uint32_t {
601
601
  RequestAdapterOptionsLUID = WGPUSType_RequestAdapterOptionsLUID,
602
602
  RequestAdapterOptionsGetGLProc = WGPUSType_RequestAdapterOptionsGetGLProc,
603
603
  RequestAdapterOptionsD3D11Device = WGPUSType_RequestAdapterOptionsD3D11Device,
604
- DawnRenderPassColorAttachmentRenderToSingleSampled = WGPUSType_DawnRenderPassColorAttachmentRenderToSingleSampled,
604
+ DawnRenderPassSampleCount = WGPUSType_DawnRenderPassSampleCount,
605
605
  RenderPassPixelLocalStorage = WGPUSType_RenderPassPixelLocalStorage,
606
606
  PipelineLayoutPixelLocalStorage = WGPUSType_PipelineLayoutPixelLocalStorage,
607
607
  BufferHostMappedPointer = WGPUSType_BufferHostMappedPointer,
@@ -613,7 +613,7 @@ enum class SType : uint32_t {
613
613
  DawnDrmFormatCapabilities = WGPUSType_DawnDrmFormatCapabilities,
614
614
  ShaderModuleCompilationOptions = WGPUSType_ShaderModuleCompilationOptions,
615
615
  ColorTargetStateExpandResolveTextureDawn = WGPUSType_ColorTargetStateExpandResolveTextureDawn,
616
- RenderPassDescriptorExpandResolveRect = WGPUSType_RenderPassDescriptorExpandResolveRect,
616
+ RenderPassRenderAreaRect = WGPUSType_RenderPassRenderAreaRect,
617
617
  SharedTextureMemoryVkDedicatedAllocationDescriptor = WGPUSType_SharedTextureMemoryVkDedicatedAllocationDescriptor,
618
618
  SharedTextureMemoryAHardwareBufferDescriptor = WGPUSType_SharedTextureMemoryAHardwareBufferDescriptor,
619
619
  SharedTextureMemoryDmaBufDescriptor = WGPUSType_SharedTextureMemoryDmaBufDescriptor,
@@ -656,16 +656,17 @@ enum class SType : uint32_t {
656
656
  RenderPassDescriptorResolveRect = WGPUSType_RenderPassDescriptorResolveRect,
657
657
  RequestAdapterWebGPUBackendOptions = WGPUSType_RequestAdapterWebGPUBackendOptions,
658
658
  DawnFakeDeviceInitializeErrorForTesting = WGPUSType_DawnFakeDeviceInitializeErrorForTesting,
659
- TextureComponentSwizzleDescriptor = WGPUSType_TextureComponentSwizzleDescriptor,
660
659
  SharedTextureMemoryD3D11BeginState = WGPUSType_SharedTextureMemoryD3D11BeginState,
661
660
  DawnConsumeAdapterDescriptor = WGPUSType_DawnConsumeAdapterDescriptor,
662
- BindGroupLayoutDynamicBindingArray = WGPUSType_BindGroupLayoutDynamicBindingArray,
663
- DynamicBindingArrayLimits = WGPUSType_DynamicBindingArrayLimits,
664
- BindGroupDynamicBindingArray = WGPUSType_BindGroupDynamicBindingArray,
665
661
  TexelBufferBindingEntry = WGPUSType_TexelBufferBindingEntry,
666
662
  TexelBufferBindingLayout = WGPUSType_TexelBufferBindingLayout,
667
663
  SharedTextureMemoryMetalEndAccessState = WGPUSType_SharedTextureMemoryMetalEndAccessState,
668
664
  AdapterPropertiesWGPU = WGPUSType_AdapterPropertiesWGPU,
665
+ SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor = WGPUSType_SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor,
666
+ SharedTextureMemoryD3D12ResourceDescriptor = WGPUSType_SharedTextureMemoryD3D12ResourceDescriptor,
667
+ RequestAdapterOptionsAngleVirtualizationGroup = WGPUSType_RequestAdapterOptionsAngleVirtualizationGroup,
668
+ PipelineLayoutResourceTable = WGPUSType_PipelineLayoutResourceTable,
669
+ AdapterPropertiesExplicitComputeSubgroupSizeConfigs = WGPUSType_AdapterPropertiesExplicitComputeSubgroupSizeConfigs,
669
670
  };
670
671
  static_assert(sizeof(SType) == sizeof(WGPUSType), "sizeof mismatch for SType");
671
672
  static_assert(alignof(SType) == alignof(WGPUSType), "alignof mismatch for SType");
@@ -831,7 +832,7 @@ enum class TextureFormat : uint32_t {
831
832
  R8BG8Biplanar444Unorm = WGPUTextureFormat_R8BG8Biplanar444Unorm,
832
833
  R10X6BG10X6Biplanar422Unorm = WGPUTextureFormat_R10X6BG10X6Biplanar422Unorm,
833
834
  R10X6BG10X6Biplanar444Unorm = WGPUTextureFormat_R10X6BG10X6Biplanar444Unorm,
834
- External = WGPUTextureFormat_External,
835
+ OpaqueYCbCrAndroid = WGPUTextureFormat_OpaqueYCbCrAndroid,
835
836
  };
836
837
  static_assert(sizeof(TextureFormat) == sizeof(WGPUTextureFormat), "sizeof mismatch for TextureFormat");
837
838
  static_assert(alignof(TextureFormat) == alignof(WGPUTextureFormat), "alignof mismatch for TextureFormat");
@@ -934,14 +935,25 @@ enum class WGSLLanguageFeatureName : uint32_t {
934
935
  Packed4x8IntegerDotProduct = WGPUWGSLLanguageFeatureName_Packed4x8IntegerDotProduct,
935
936
  UnrestrictedPointerParameters = WGPUWGSLLanguageFeatureName_UnrestrictedPointerParameters,
936
937
  PointerCompositeAccess = WGPUWGSLLanguageFeatureName_PointerCompositeAccess,
937
- SizedBindingArray = WGPUWGSLLanguageFeatureName_SizedBindingArray,
938
- TexelBuffers = WGPUWGSLLanguageFeatureName_TexelBuffers,
939
- ChromiumPrint = WGPUWGSLLanguageFeatureName_ChromiumPrint,
938
+ UniformBufferStandardLayout = WGPUWGSLLanguageFeatureName_UniformBufferStandardLayout,
939
+ SubgroupId = WGPUWGSLLanguageFeatureName_SubgroupId,
940
+ TextureAndSamplerLet = WGPUWGSLLanguageFeatureName_TextureAndSamplerLet,
941
+ SubgroupUniformity = WGPUWGSLLanguageFeatureName_SubgroupUniformity,
942
+ TextureFormatsTier1 = WGPUWGSLLanguageFeatureName_TextureFormatsTier1,
940
943
  ChromiumTestingUnimplemented = WGPUWGSLLanguageFeatureName_ChromiumTestingUnimplemented,
941
944
  ChromiumTestingUnsafeExperimental = WGPUWGSLLanguageFeatureName_ChromiumTestingUnsafeExperimental,
942
945
  ChromiumTestingExperimental = WGPUWGSLLanguageFeatureName_ChromiumTestingExperimental,
943
946
  ChromiumTestingShippedWithKillswitch = WGPUWGSLLanguageFeatureName_ChromiumTestingShippedWithKillswitch,
944
947
  ChromiumTestingShipped = WGPUWGSLLanguageFeatureName_ChromiumTestingShipped,
948
+ SizedBindingArray = WGPUWGSLLanguageFeatureName_SizedBindingArray,
949
+ TexelBuffers = WGPUWGSLLanguageFeatureName_TexelBuffers,
950
+ ChromiumPrint = WGPUWGSLLanguageFeatureName_ChromiumPrint,
951
+ FragmentDepth = WGPUWGSLLanguageFeatureName_FragmentDepth,
952
+ ImmediateAddressSpace = WGPUWGSLLanguageFeatureName_ImmediateAddressSpace,
953
+ BufferView = WGPUWGSLLanguageFeatureName_BufferView,
954
+ FilteringParameters = WGPUWGSLLanguageFeatureName_FilteringParameters,
955
+ SwizzleAssignment = WGPUWGSLLanguageFeatureName_SwizzleAssignment,
956
+ LinearIndexing = WGPUWGSLLanguageFeatureName_LinearIndexing,
945
957
  };
946
958
  static_assert(sizeof(WGSLLanguageFeatureName) == sizeof(WGPUWGSLLanguageFeatureName), "sizeof mismatch for WGSLLanguageFeatureName");
947
959
  static_assert(alignof(WGSLLanguageFeatureName) == alignof(WGPUWGSLLanguageFeatureName), "alignof mismatch for WGSLLanguageFeatureName");
@@ -1198,7 +1210,6 @@ class BindGroupLayout;
1198
1210
  class Buffer;
1199
1211
  class CommandBuffer;
1200
1212
  class CommandEncoder;
1201
- class ComputePassEncoder;
1202
1213
  class ComputePipeline;
1203
1214
  class Device;
1204
1215
  class ExternalTexture;
@@ -1207,9 +1218,8 @@ class PipelineLayout;
1207
1218
  class QuerySet;
1208
1219
  class Queue;
1209
1220
  class RenderBundle;
1210
- class RenderBundleEncoder;
1211
- class RenderPassEncoder;
1212
1221
  class RenderPipeline;
1222
+ class ResourceTable;
1213
1223
  class Sampler;
1214
1224
  class ShaderModule;
1215
1225
  class SharedBufferMemory;
@@ -1219,12 +1229,16 @@ class Surface;
1219
1229
  class TexelBufferView;
1220
1230
  class Texture;
1221
1231
  class TextureView;
1232
+ class ComputePassEncoder;
1233
+ class RenderBundleEncoder;
1234
+ class RenderPassEncoder;
1222
1235
 
1223
1236
  struct StringView;
1224
1237
  struct AdapterPropertiesD3D;
1238
+ struct AdapterPropertiesExplicitComputeSubgroupSizeConfigs;
1225
1239
  struct AdapterPropertiesVk;
1226
1240
  struct AdapterPropertiesWGPU;
1227
- struct BindGroupDynamicBindingArray;
1241
+ struct BindingResource;
1228
1242
  struct BlendComponent;
1229
1243
  struct BufferBindingLayout;
1230
1244
  struct BufferHostMappedPointer;
@@ -1246,15 +1260,13 @@ struct DawnFakeBufferOOMForTesting;
1246
1260
  struct DawnFakeDeviceInitializeErrorForTesting;
1247
1261
  struct DawnHostMappedPointerLimits;
1248
1262
  struct DawnInjectedInvalidSType;
1249
- struct DawnRenderPassColorAttachmentRenderToSingleSampled;
1263
+ struct DawnRenderPassSampleCount;
1250
1264
  struct DawnShaderModuleSPIRVOptionsDescriptor;
1251
1265
  struct DawnTexelCopyBufferRowAlignmentLimits;
1252
1266
  struct DawnTextureInternalUsageDescriptor;
1253
1267
  struct DawnTogglesDescriptor;
1254
1268
  struct DawnWGSLBlocklist;
1255
1269
  struct DawnWireWGSLControl;
1256
- struct DynamicBindingArrayLayout;
1257
- struct DynamicBindingArrayLimits;
1258
1270
  struct EmscriptenSurfaceSourceCanvasHTMLSelector;
1259
1271
  struct Extent2D;
1260
1272
  struct Extent3D;
@@ -1268,6 +1280,7 @@ struct MultisampleState;
1268
1280
  struct Origin2D;
1269
1281
  struct Origin3D;
1270
1282
  struct PassTimestampWrites;
1283
+ struct PipelineLayoutResourceTable;
1271
1284
  struct PipelineLayoutStorageAttachment;
1272
1285
  struct PrimitiveState;
1273
1286
  struct QuerySetDescriptor;
@@ -1275,17 +1288,17 @@ struct QueueDescriptor;
1275
1288
  struct RenderBundleDescriptor;
1276
1289
  struct RenderBundleEncoderDescriptor;
1277
1290
  struct RenderPassDepthStencilAttachment;
1278
- struct RenderPassDescriptorExpandResolveRect;
1279
1291
  struct RenderPassDescriptorResolveRect;
1280
1292
  struct RenderPassMaxDrawCount;
1281
1293
  struct RequestAdapterWebGPUBackendOptions;
1282
1294
  struct RequestAdapterWebXROptions;
1295
+ struct ResourceTableDescriptor;
1283
1296
  struct SamplerBindingLayout;
1284
1297
  struct ShaderModuleCompilationOptions;
1285
1298
  struct ShaderSourceSPIRV;
1286
1299
  struct ShaderSourceWGSL;
1287
1300
  struct SharedBufferMemoryBeginAccessDescriptor;
1288
- struct SharedBufferMemoryDescriptor;
1301
+ struct SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor;
1289
1302
  struct SharedBufferMemoryEndAccessState;
1290
1303
  struct SharedBufferMemoryProperties;
1291
1304
  struct SharedFenceDXGISharedHandleDescriptor;
@@ -1337,7 +1350,7 @@ struct TexelBufferBindingLayout;
1337
1350
  struct TexelBufferViewDescriptor;
1338
1351
  struct TexelCopyBufferLayout;
1339
1352
  struct TextureBindingLayout;
1340
- struct TextureBindingViewDimensionDescriptor;
1353
+ struct TextureBindingViewDimension;
1341
1354
  struct TextureComponentSwizzle;
1342
1355
  struct VertexAttribute;
1343
1356
  struct YCbCrVkDescriptor;
@@ -1345,7 +1358,6 @@ struct AdapterPropertiesMemoryHeaps;
1345
1358
  struct AdapterPropertiesSubgroupMatrixConfigs;
1346
1359
  struct AHardwareBufferProperties;
1347
1360
  struct BindGroupEntry;
1348
- struct BindGroupLayoutDynamicBindingArray;
1349
1361
  struct BindGroupLayoutEntry;
1350
1362
  struct BlendState;
1351
1363
  struct BufferDescriptor;
@@ -1362,10 +1374,12 @@ struct InstanceDescriptor;
1362
1374
  struct Limits;
1363
1375
  struct PipelineLayoutPixelLocalStorage;
1364
1376
  struct RenderPassColorAttachment;
1377
+ struct RenderPassRenderAreaRect;
1365
1378
  struct RenderPassStorageAttachment;
1366
1379
  struct RequestAdapterOptions;
1367
1380
  struct SamplerDescriptor;
1368
1381
  struct ShaderModuleDescriptor;
1382
+ struct SharedBufferMemoryDescriptor;
1369
1383
  struct SharedFenceDescriptor;
1370
1384
  struct SharedFenceExportInfo;
1371
1385
  struct SharedTextureMemoryAHardwareBufferProperties;
@@ -1594,7 +1608,6 @@ class BindGroup : public ObjectBase<BindGroup, WGPUBindGroup> {
1594
1608
  using ObjectBase::ObjectBase;
1595
1609
  using ObjectBase::operator=;
1596
1610
 
1597
- inline void Destroy() const;
1598
1611
  inline void SetLabel(StringView label) const;
1599
1612
 
1600
1613
 
@@ -1695,30 +1708,6 @@ class CommandEncoder : public ObjectBase<CommandEncoder, WGPUCommandEncoder> {
1695
1708
  static inline void WGPURelease(WGPUCommandEncoder handle);
1696
1709
  };
1697
1710
 
1698
- class ComputePassEncoder : public ObjectBase<ComputePassEncoder, WGPUComputePassEncoder> {
1699
- public:
1700
- using ObjectBase::ObjectBase;
1701
- using ObjectBase::operator=;
1702
-
1703
- inline void DispatchWorkgroups(uint32_t workgroupCountX, uint32_t workgroupCountY = 1, uint32_t workgroupCountZ = 1) const;
1704
- inline void DispatchWorkgroupsIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
1705
- inline void End() const;
1706
- inline void InsertDebugMarker(StringView markerLabel) const;
1707
- inline void PopDebugGroup() const;
1708
- inline void PushDebugGroup(StringView groupLabel) const;
1709
- inline void SetBindGroup(uint32_t groupIndex, BindGroup const& group = nullptr, size_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
1710
- inline void SetImmediateData(uint32_t offset, void const * data, size_t size) const;
1711
- inline void SetLabel(StringView label) const;
1712
- inline void SetPipeline(ComputePipeline const& pipeline) const;
1713
- inline void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const;
1714
-
1715
-
1716
- private:
1717
- friend ObjectBase<ComputePassEncoder, WGPUComputePassEncoder>;
1718
- static inline void WGPUAddRef(WGPUComputePassEncoder handle);
1719
- static inline void WGPURelease(WGPUComputePassEncoder handle);
1720
- };
1721
-
1722
1711
  class ComputePipeline : public ObjectBase<ComputePipeline, WGPUComputePipeline> {
1723
1712
  public:
1724
1713
  using ObjectBase::ObjectBase;
@@ -1773,6 +1762,7 @@ class Device : public ObjectBase<Device, WGPUDevice> {
1773
1762
  typename CbChar = std::function<void(CreatePipelineAsyncStatus status, RenderPipeline pipeline, const char* message)>,
1774
1763
  typename = std::enable_if_t<std::is_convertible_v<L, Cb> || std::is_convertible_v<L, CbChar>>>
1775
1764
  Future CreateRenderPipelineAsync(RenderPipelineDescriptor const * descriptor, CallbackMode callbackMode,L callback) const;
1765
+ inline ResourceTable CreateResourceTable(ResourceTableDescriptor const * descriptor) const;
1776
1766
  inline Sampler CreateSampler(SamplerDescriptor const * descriptor = nullptr) const;
1777
1767
  inline ShaderModule CreateShaderModule(ShaderModuleDescriptor const * descriptor) const;
1778
1768
  inline Texture CreateTexture(TextureDescriptor const * descriptor) const;
@@ -1942,84 +1932,37 @@ class RenderBundle : public ObjectBase<RenderBundle, WGPURenderBundle> {
1942
1932
  static inline void WGPURelease(WGPURenderBundle handle);
1943
1933
  };
1944
1934
 
1945
- class RenderBundleEncoder : public ObjectBase<RenderBundleEncoder, WGPURenderBundleEncoder> {
1946
- public:
1947
- using ObjectBase::ObjectBase;
1948
- using ObjectBase::operator=;
1949
-
1950
- inline void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t firstInstance = 0) const;
1951
- inline void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t firstIndex = 0, int32_t baseVertex = 0, uint32_t firstInstance = 0) const;
1952
- inline void DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
1953
- inline void DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
1954
- inline RenderBundle Finish(RenderBundleDescriptor const * descriptor = nullptr) const;
1955
- inline void InsertDebugMarker(StringView markerLabel) const;
1956
- inline void PopDebugGroup() const;
1957
- inline void PushDebugGroup(StringView groupLabel) const;
1958
- inline void SetBindGroup(uint32_t groupIndex, BindGroup const& group = nullptr, size_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
1959
- inline void SetImmediateData(uint32_t offset, void const * data, size_t size) const;
1960
- inline void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = kWholeSize) const;
1961
- inline void SetLabel(StringView label) const;
1962
- inline void SetPipeline(RenderPipeline const& pipeline) const;
1963
- inline void SetVertexBuffer(uint32_t slot, Buffer const& buffer = nullptr, uint64_t offset = 0, uint64_t size = kWholeSize) const;
1964
-
1965
-
1966
- private:
1967
- friend ObjectBase<RenderBundleEncoder, WGPURenderBundleEncoder>;
1968
- static inline void WGPUAddRef(WGPURenderBundleEncoder handle);
1969
- static inline void WGPURelease(WGPURenderBundleEncoder handle);
1970
- };
1971
-
1972
- class RenderPassEncoder : public ObjectBase<RenderPassEncoder, WGPURenderPassEncoder> {
1935
+ class RenderPipeline : public ObjectBase<RenderPipeline, WGPURenderPipeline> {
1973
1936
  public:
1974
1937
  using ObjectBase::ObjectBase;
1975
1938
  using ObjectBase::operator=;
1976
1939
 
1977
- inline void BeginOcclusionQuery(uint32_t queryIndex) const;
1978
- inline void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t firstInstance = 0) const;
1979
- inline void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t firstIndex = 0, int32_t baseVertex = 0, uint32_t firstInstance = 0) const;
1980
- inline void DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
1981
- inline void DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
1982
- inline void End() const;
1983
- inline void EndOcclusionQuery() const;
1984
- inline void ExecuteBundles(size_t bundleCount, RenderBundle const * bundles) const;
1985
- inline void InsertDebugMarker(StringView markerLabel) const;
1986
- inline void MultiDrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer = nullptr, uint64_t drawCountBufferOffset = 0) const;
1987
- inline void MultiDrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer = nullptr, uint64_t drawCountBufferOffset = 0) const;
1988
- inline void PixelLocalStorageBarrier() const;
1989
- inline void PopDebugGroup() const;
1990
- inline void PushDebugGroup(StringView groupLabel) const;
1991
- inline void SetBindGroup(uint32_t groupIndex, BindGroup const& group = nullptr, size_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
1992
- inline void SetBlendConstant(Color const * color) const;
1993
- inline void SetImmediateData(uint32_t offset, void const * data, size_t size) const;
1994
- inline void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = kWholeSize) const;
1940
+ inline BindGroupLayout GetBindGroupLayout(uint32_t groupIndex) const;
1995
1941
  inline void SetLabel(StringView label) const;
1996
- inline void SetPipeline(RenderPipeline const& pipeline) const;
1997
- inline void SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const;
1998
- inline void SetStencilReference(uint32_t reference) const;
1999
- inline void SetVertexBuffer(uint32_t slot, Buffer const& buffer = nullptr, uint64_t offset = 0, uint64_t size = kWholeSize) const;
2000
- inline void SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const;
2001
- inline void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const;
2002
1942
 
2003
1943
 
2004
1944
  private:
2005
- friend ObjectBase<RenderPassEncoder, WGPURenderPassEncoder>;
2006
- static inline void WGPUAddRef(WGPURenderPassEncoder handle);
2007
- static inline void WGPURelease(WGPURenderPassEncoder handle);
1945
+ friend ObjectBase<RenderPipeline, WGPURenderPipeline>;
1946
+ static inline void WGPUAddRef(WGPURenderPipeline handle);
1947
+ static inline void WGPURelease(WGPURenderPipeline handle);
2008
1948
  };
2009
1949
 
2010
- class RenderPipeline : public ObjectBase<RenderPipeline, WGPURenderPipeline> {
1950
+ class ResourceTable : public ObjectBase<ResourceTable, WGPUResourceTable> {
2011
1951
  public:
2012
1952
  using ObjectBase::ObjectBase;
2013
1953
  using ObjectBase::operator=;
2014
1954
 
2015
- inline BindGroupLayout GetBindGroupLayout(uint32_t groupIndex) const;
2016
- inline void SetLabel(StringView label) const;
1955
+ inline void Destroy() const;
1956
+ inline uint32_t GetSize() const;
1957
+ inline uint32_t InsertBinding(BindingResource const * resource) const;
1958
+ inline ConvertibleStatus RemoveBinding(uint32_t slot) const;
1959
+ inline ConvertibleStatus Update(uint32_t slot, BindingResource const * resource) const;
2017
1960
 
2018
1961
 
2019
1962
  private:
2020
- friend ObjectBase<RenderPipeline, WGPURenderPipeline>;
2021
- static inline void WGPUAddRef(WGPURenderPipeline handle);
2022
- static inline void WGPURelease(WGPURenderPipeline handle);
1963
+ friend ObjectBase<ResourceTable, WGPUResourceTable>;
1964
+ static inline void WGPUAddRef(WGPUResourceTable handle);
1965
+ static inline void WGPURelease(WGPUResourceTable handle);
2023
1966
  };
2024
1967
 
2025
1968
  class Sampler : public ObjectBase<Sampler, WGPUSampler> {
@@ -2085,6 +2028,7 @@ class SharedFence : public ObjectBase<SharedFence, WGPUSharedFence> {
2085
2028
  using ObjectBase::operator=;
2086
2029
 
2087
2030
  inline void ExportInfo(SharedFenceExportInfo * info) const;
2031
+ inline void SetLabel(StringView label) const;
2088
2032
 
2089
2033
 
2090
2034
  private:
@@ -2159,10 +2103,12 @@ class Texture : public ObjectBase<Texture, WGPUTexture> {
2159
2103
  inline uint32_t GetHeight() const;
2160
2104
  inline uint32_t GetMipLevelCount() const;
2161
2105
  inline uint32_t GetSampleCount() const;
2106
+ inline TextureViewDimension GetTextureBindingViewDimension() const;
2162
2107
  inline TextureUsage GetUsage() const;
2163
2108
  inline uint32_t GetWidth() const;
2164
2109
  inline void Pin(TextureUsage usage) const;
2165
2110
  inline void SetLabel(StringView label) const;
2111
+ inline void SetOwnershipForMemoryDump(uint64_t ownerGuid = 0) const;
2166
2112
  inline void Unpin() const;
2167
2113
 
2168
2114
 
@@ -2186,6 +2132,98 @@ class TextureView : public ObjectBase<TextureView, WGPUTextureView> {
2186
2132
  static inline void WGPURelease(WGPUTextureView handle);
2187
2133
  };
2188
2134
 
2135
+ class ComputePassEncoder : public ObjectBase<ComputePassEncoder, WGPUComputePassEncoder> {
2136
+ public:
2137
+ using ObjectBase::ObjectBase;
2138
+ using ObjectBase::operator=;
2139
+
2140
+ inline void DispatchWorkgroups(uint32_t workgroupCountX, uint32_t workgroupCountY = 1, uint32_t workgroupCountZ = 1) const;
2141
+ inline void DispatchWorkgroupsIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
2142
+ inline void End() const;
2143
+ inline void InsertDebugMarker(StringView markerLabel) const;
2144
+ inline void PopDebugGroup() const;
2145
+ inline void PushDebugGroup(StringView groupLabel) const;
2146
+ inline void SetBindGroup(uint32_t groupIndex, BindGroup const& group = nullptr, size_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
2147
+ inline void SetImmediates(uint32_t offset, void const * data, size_t size) const;
2148
+ inline void SetLabel(StringView label) const;
2149
+ inline void SetPipeline(ComputePipeline const& pipeline) const;
2150
+ inline void SetResourceTable(ResourceTable const& table = nullptr) const;
2151
+ inline void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const;
2152
+
2153
+
2154
+ private:
2155
+ friend ObjectBase<ComputePassEncoder, WGPUComputePassEncoder>;
2156
+ static inline void WGPUAddRef(WGPUComputePassEncoder handle);
2157
+ static inline void WGPURelease(WGPUComputePassEncoder handle);
2158
+ };
2159
+
2160
+ class RenderBundleEncoder : public ObjectBase<RenderBundleEncoder, WGPURenderBundleEncoder> {
2161
+ public:
2162
+ using ObjectBase::ObjectBase;
2163
+ using ObjectBase::operator=;
2164
+
2165
+ inline void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t firstInstance = 0) const;
2166
+ inline void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t firstIndex = 0, int32_t baseVertex = 0, uint32_t firstInstance = 0) const;
2167
+ inline void DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
2168
+ inline void DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
2169
+ inline RenderBundle Finish(RenderBundleDescriptor const * descriptor = nullptr) const;
2170
+ inline void InsertDebugMarker(StringView markerLabel) const;
2171
+ inline void PopDebugGroup() const;
2172
+ inline void PushDebugGroup(StringView groupLabel) const;
2173
+ inline void SetBindGroup(uint32_t groupIndex, BindGroup const& group = nullptr, size_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
2174
+ inline void SetImmediates(uint32_t offset, void const * data, size_t size) const;
2175
+ inline void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = kWholeSize) const;
2176
+ inline void SetLabel(StringView label) const;
2177
+ inline void SetPipeline(RenderPipeline const& pipeline) const;
2178
+ inline void SetResourceTable(ResourceTable const& table = nullptr) const;
2179
+ inline void SetVertexBuffer(uint32_t slot, Buffer const& buffer = nullptr, uint64_t offset = 0, uint64_t size = kWholeSize) const;
2180
+
2181
+
2182
+ private:
2183
+ friend ObjectBase<RenderBundleEncoder, WGPURenderBundleEncoder>;
2184
+ static inline void WGPUAddRef(WGPURenderBundleEncoder handle);
2185
+ static inline void WGPURelease(WGPURenderBundleEncoder handle);
2186
+ };
2187
+
2188
+ class RenderPassEncoder : public ObjectBase<RenderPassEncoder, WGPURenderPassEncoder> {
2189
+ public:
2190
+ using ObjectBase::ObjectBase;
2191
+ using ObjectBase::operator=;
2192
+
2193
+ inline void BeginOcclusionQuery(uint32_t queryIndex) const;
2194
+ inline void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t firstInstance = 0) const;
2195
+ inline void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t firstIndex = 0, int32_t baseVertex = 0, uint32_t firstInstance = 0) const;
2196
+ inline void DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
2197
+ inline void DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const;
2198
+ inline void End() const;
2199
+ inline void EndOcclusionQuery() const;
2200
+ inline void ExecuteBundles(size_t bundleCount, RenderBundle const * bundles) const;
2201
+ inline void InsertDebugMarker(StringView markerLabel) const;
2202
+ inline void MultiDrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer = nullptr, uint64_t drawCountBufferOffset = 0) const;
2203
+ inline void MultiDrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer = nullptr, uint64_t drawCountBufferOffset = 0) const;
2204
+ inline void PixelLocalStorageBarrier() const;
2205
+ inline void PopDebugGroup() const;
2206
+ inline void PushDebugGroup(StringView groupLabel) const;
2207
+ inline void SetBindGroup(uint32_t groupIndex, BindGroup const& group = nullptr, size_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
2208
+ inline void SetBlendConstant(Color const * color) const;
2209
+ inline void SetImmediates(uint32_t offset, void const * data, size_t size) const;
2210
+ inline void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = kWholeSize) const;
2211
+ inline void SetLabel(StringView label) const;
2212
+ inline void SetPipeline(RenderPipeline const& pipeline) const;
2213
+ inline void SetResourceTable(ResourceTable const& table = nullptr) const;
2214
+ inline void SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const;
2215
+ inline void SetStencilReference(uint32_t reference) const;
2216
+ inline void SetVertexBuffer(uint32_t slot, Buffer const& buffer = nullptr, uint64_t offset = 0, uint64_t size = kWholeSize) const;
2217
+ inline void SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const;
2218
+ inline void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const;
2219
+
2220
+
2221
+ private:
2222
+ friend ObjectBase<RenderPassEncoder, WGPURenderPassEncoder>;
2223
+ static inline void WGPUAddRef(WGPURenderPassEncoder handle);
2224
+ static inline void WGPURelease(WGPURenderPassEncoder handle);
2225
+ };
2226
+
2189
2227
 
2190
2228
  // ChainedStruct
2191
2229
  static_assert(sizeof(ChainedStruct) == sizeof(WGPUChainedStruct),
@@ -2210,6 +2248,20 @@ struct AdapterPropertiesD3D : ChainedStructOut {
2210
2248
  alignas(kFirstMemberAlignment) uint32_t shaderModel;
2211
2249
  };
2212
2250
 
2251
+ // Can be chained in AdapterInfo
2252
+ struct AdapterPropertiesExplicitComputeSubgroupSizeConfigs : ChainedStructOut {
2253
+ inline AdapterPropertiesExplicitComputeSubgroupSizeConfigs();
2254
+
2255
+ struct Init;
2256
+ inline AdapterPropertiesExplicitComputeSubgroupSizeConfigs(Init&& init);
2257
+ inline operator const WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs&() const noexcept;
2258
+
2259
+ static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
2260
+ alignas(kFirstMemberAlignment) uint32_t minExplicitComputeSubgroupSize;
2261
+ uint32_t maxExplicitComputeSubgroupSize;
2262
+ uint32_t maxComputeWorkgroupSubgroups;
2263
+ };
2264
+
2213
2265
  // Can be chained in AdapterInfo
2214
2266
  struct AdapterPropertiesVk : ChainedStructOut {
2215
2267
  inline AdapterPropertiesVk();
@@ -2234,16 +2286,15 @@ struct AdapterPropertiesWGPU : ChainedStructOut {
2234
2286
  alignas(kFirstMemberAlignment) BackendType backendType = BackendType::Undefined;
2235
2287
  };
2236
2288
 
2237
- // Can be chained in BindGroupDescriptor
2238
- struct BindGroupDynamicBindingArray : ChainedStruct {
2239
- inline BindGroupDynamicBindingArray();
2240
-
2241
- struct Init;
2242
- inline BindGroupDynamicBindingArray(Init&& init);
2243
- inline operator const WGPUBindGroupDynamicBindingArray&() const noexcept;
2289
+ struct BindingResource {
2290
+ inline operator const WGPUBindingResource&() const noexcept;
2244
2291
 
2245
- static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
2246
- alignas(kFirstMemberAlignment) uint32_t dynamicArraySize = 0;
2292
+ ChainedStruct const * nextInChain = nullptr;
2293
+ Buffer buffer = nullptr;
2294
+ uint64_t offset = 0;
2295
+ uint64_t size = kWholeSize;
2296
+ Sampler sampler = nullptr;
2297
+ TextureView textureView = nullptr;
2247
2298
  };
2248
2299
 
2249
2300
  struct BlendComponent {
@@ -2485,16 +2536,16 @@ struct DawnInjectedInvalidSType : ChainedStruct {
2485
2536
  alignas(kFirstMemberAlignment) SType invalidSType = {};
2486
2537
  };
2487
2538
 
2488
- // Can be chained in RenderPassColorAttachment
2489
- struct DawnRenderPassColorAttachmentRenderToSingleSampled : ChainedStruct {
2490
- inline DawnRenderPassColorAttachmentRenderToSingleSampled();
2539
+ // Can be chained in RenderPassDescriptor
2540
+ struct DawnRenderPassSampleCount : ChainedStruct {
2541
+ inline DawnRenderPassSampleCount();
2491
2542
 
2492
2543
  struct Init;
2493
- inline DawnRenderPassColorAttachmentRenderToSingleSampled(Init&& init);
2494
- inline operator const WGPUDawnRenderPassColorAttachmentRenderToSingleSampled&() const noexcept;
2544
+ inline DawnRenderPassSampleCount(Init&& init);
2545
+ inline operator const WGPUDawnRenderPassSampleCount&() const noexcept;
2495
2546
 
2496
2547
  static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
2497
- alignas(kFirstMemberAlignment) uint32_t implicitSampleCount = 1;
2548
+ alignas(kFirstMemberAlignment) uint32_t sampleCount = 1;
2498
2549
  };
2499
2550
 
2500
2551
  // Can be chained in ShaderModuleDescriptor
@@ -2577,26 +2628,6 @@ struct DawnWireWGSLControl : ChainedStruct {
2577
2628
  Bool enableTesting = false;
2578
2629
  };
2579
2630
 
2580
- struct DynamicBindingArrayLayout {
2581
- inline operator const WGPUDynamicBindingArrayLayout&() const noexcept;
2582
-
2583
- ChainedStruct const * nextInChain = nullptr;
2584
- uint32_t start = 0;
2585
- DynamicBindingKind kind = DynamicBindingKind::Undefined;
2586
- };
2587
-
2588
- // Can be chained in Limits
2589
- struct DynamicBindingArrayLimits : ChainedStructOut {
2590
- inline DynamicBindingArrayLimits();
2591
-
2592
- struct Init;
2593
- inline DynamicBindingArrayLimits(Init&& init);
2594
- inline operator const WGPUDynamicBindingArrayLimits&() const noexcept;
2595
-
2596
- static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
2597
- alignas(kFirstMemberAlignment) uint32_t maxDynamicBindingArraySize = kLimitU32Undefined;
2598
- };
2599
-
2600
2631
  // Can be chained in SurfaceDescriptor
2601
2632
  struct EmscriptenSurfaceSourceCanvasHTMLSelector : ChainedStruct {
2602
2633
  inline EmscriptenSurfaceSourceCanvasHTMLSelector();
@@ -2705,6 +2736,18 @@ struct PassTimestampWrites {
2705
2736
  uint32_t endOfPassWriteIndex = kQuerySetIndexUndefined;
2706
2737
  };
2707
2738
 
2739
+ // Can be chained in PipelineLayoutDescriptor
2740
+ struct PipelineLayoutResourceTable : ChainedStruct {
2741
+ inline PipelineLayoutResourceTable();
2742
+
2743
+ struct Init;
2744
+ inline PipelineLayoutResourceTable(Init&& init);
2745
+ inline operator const WGPUPipelineLayoutResourceTable&() const noexcept;
2746
+
2747
+ static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Bool));
2748
+ alignas(kFirstMemberAlignment) Bool usesResourceTable = false;
2749
+ };
2750
+
2708
2751
  struct PipelineLayoutStorageAttachment {
2709
2752
  inline operator const WGPUPipelineLayoutStorageAttachment&() const noexcept;
2710
2753
 
@@ -2775,21 +2818,6 @@ struct RenderPassDepthStencilAttachment {
2775
2818
  Bool stencilReadOnly = false;
2776
2819
  };
2777
2820
 
2778
- // Can be chained in RenderPassDescriptor
2779
- struct RenderPassDescriptorExpandResolveRect : ChainedStruct {
2780
- inline RenderPassDescriptorExpandResolveRect();
2781
-
2782
- struct Init;
2783
- inline RenderPassDescriptorExpandResolveRect(Init&& init);
2784
- inline operator const WGPURenderPassDescriptorExpandResolveRect&() const noexcept;
2785
-
2786
- static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(uint32_t));
2787
- alignas(kFirstMemberAlignment) uint32_t x;
2788
- uint32_t y;
2789
- uint32_t width;
2790
- uint32_t height;
2791
- };
2792
-
2793
2821
  // Can be chained in RenderPassDescriptor
2794
2822
  struct RenderPassDescriptorResolveRect : ChainedStruct {
2795
2823
  inline RenderPassDescriptorResolveRect();
@@ -2841,6 +2869,14 @@ struct RequestAdapterWebXROptions : ChainedStruct {
2841
2869
  alignas(kFirstMemberAlignment) Bool xrCompatible;
2842
2870
  };
2843
2871
 
2872
+ struct ResourceTableDescriptor {
2873
+ inline operator const WGPUResourceTableDescriptor&() const noexcept;
2874
+
2875
+ ChainedStruct const * nextInChain = nullptr;
2876
+ StringView label = {};
2877
+ uint32_t size;
2878
+ };
2879
+
2844
2880
  struct SamplerBindingLayout {
2845
2881
  inline operator const WGPUSamplerBindingLayout&() const noexcept;
2846
2882
 
@@ -2895,14 +2931,20 @@ struct SharedBufferMemoryBeginAccessDescriptor {
2895
2931
  uint64_t const * signaledValues = nullptr;
2896
2932
  };
2897
2933
 
2898
- struct SharedBufferMemoryDescriptor {
2899
- inline operator const WGPUSharedBufferMemoryDescriptor&() const noexcept;
2934
+ // Can be chained in SharedBufferMemoryDescriptor
2935
+ struct SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor : ChainedStruct {
2936
+ inline SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor();
2900
2937
 
2901
- ChainedStruct const * nextInChain = nullptr;
2902
- StringView label = {};
2903
- };
2938
+ struct Init;
2939
+ inline SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor(Init&& init);
2940
+ inline operator const WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor&() const noexcept;
2904
2941
 
2905
- struct SharedBufferMemoryEndAccessState {
2942
+ static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
2943
+ alignas(kFirstMemberAlignment) void * handle;
2944
+ uint64_t size;
2945
+ };
2946
+
2947
+ struct SharedBufferMemoryEndAccessState {
2906
2948
  inline SharedBufferMemoryEndAccessState();
2907
2949
  inline ~SharedBufferMemoryEndAccessState();
2908
2950
  SharedBufferMemoryEndAccessState(const SharedBufferMemoryEndAccessState&) = delete;
@@ -3084,7 +3126,6 @@ struct SharedTextureMemoryAHardwareBufferDescriptor : ChainedStruct {
3084
3126
 
3085
3127
  static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(void *));
3086
3128
  alignas(kFirstMemberAlignment) void * handle;
3087
- Bool useExternalFormat;
3088
3129
  };
3089
3130
 
3090
3131
  // Can be chained in SharedTextureMemoryBeginAccessDescriptor
@@ -3540,12 +3581,12 @@ struct TextureBindingLayout {
3540
3581
  };
3541
3582
 
3542
3583
  // Can be chained in TextureDescriptor
3543
- struct TextureBindingViewDimensionDescriptor : ChainedStruct {
3544
- inline TextureBindingViewDimensionDescriptor();
3584
+ struct TextureBindingViewDimension : ChainedStruct {
3585
+ inline TextureBindingViewDimension();
3545
3586
 
3546
3587
  struct Init;
3547
- inline TextureBindingViewDimensionDescriptor(Init&& init);
3548
- inline operator const WGPUTextureBindingViewDimensionDescriptor&() const noexcept;
3588
+ inline TextureBindingViewDimension(Init&& init);
3589
+ inline operator const WGPUTextureBindingViewDimension&() const noexcept;
3549
3590
 
3550
3591
  static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(TextureViewDimension));
3551
3592
  alignas(kFirstMemberAlignment) TextureViewDimension textureBindingViewDimension = TextureViewDimension::Undefined;
@@ -3655,18 +3696,6 @@ struct BindGroupEntry {
3655
3696
  TextureView textureView = nullptr;
3656
3697
  };
3657
3698
 
3658
- // Can be chained in BindGroupLayoutDescriptor
3659
- struct BindGroupLayoutDynamicBindingArray : ChainedStruct {
3660
- inline BindGroupLayoutDynamicBindingArray();
3661
-
3662
- struct Init;
3663
- inline BindGroupLayoutDynamicBindingArray(Init&& init);
3664
- inline operator const WGPUBindGroupLayoutDynamicBindingArray&() const noexcept;
3665
-
3666
- static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(DynamicBindingArrayLayout));
3667
- alignas(kFirstMemberAlignment) DynamicBindingArrayLayout dynamicArray = {};
3668
- };
3669
-
3670
3699
  struct BindGroupLayoutEntry {
3671
3700
  inline operator const WGPUBindGroupLayoutEntry&() const noexcept;
3672
3701
 
@@ -3880,6 +3909,19 @@ struct RenderPassColorAttachment {
3880
3909
  Color clearValue = {};
3881
3910
  };
3882
3911
 
3912
+ // Can be chained in RenderPassDescriptor
3913
+ struct RenderPassRenderAreaRect : ChainedStruct {
3914
+ inline RenderPassRenderAreaRect();
3915
+
3916
+ struct Init;
3917
+ inline RenderPassRenderAreaRect(Init&& init);
3918
+ inline operator const WGPURenderPassRenderAreaRect&() const noexcept;
3919
+
3920
+ static constexpr size_t kFirstMemberAlignment = detail::ConstexprMax(alignof(ChainedStruct), alignof(Origin2D));
3921
+ alignas(kFirstMemberAlignment) Origin2D origin = {};
3922
+ Extent2D size = {};
3923
+ };
3924
+
3883
3925
  struct RenderPassStorageAttachment {
3884
3926
  inline operator const WGPURenderPassStorageAttachment&() const noexcept;
3885
3927
 
@@ -3926,6 +3968,13 @@ struct ShaderModuleDescriptor {
3926
3968
  StringView label = {};
3927
3969
  };
3928
3970
 
3971
+ struct SharedBufferMemoryDescriptor {
3972
+ inline operator const WGPUSharedBufferMemoryDescriptor&() const noexcept;
3973
+
3974
+ ChainedStruct const * nextInChain = nullptr;
3975
+ StringView label = {};
3976
+ };
3977
+
3929
3978
  struct SharedFenceDescriptor {
3930
3979
  inline operator const WGPUSharedFenceDescriptor&() const noexcept;
3931
3980
 
@@ -4324,6 +4373,34 @@ static_assert(alignof(AdapterPropertiesD3D) == alignof(WGPUAdapterPropertiesD3D)
4324
4373
  static_assert(offsetof(AdapterPropertiesD3D, shaderModel) == offsetof(WGPUAdapterPropertiesD3D, shaderModel),
4325
4374
  "offsetof mismatch for AdapterPropertiesD3D::shaderModel");
4326
4375
 
4376
+ // AdapterPropertiesExplicitComputeSubgroupSizeConfigs implementation
4377
+ AdapterPropertiesExplicitComputeSubgroupSizeConfigs::AdapterPropertiesExplicitComputeSubgroupSizeConfigs()
4378
+ : ChainedStructOut { nullptr, SType::AdapterPropertiesExplicitComputeSubgroupSizeConfigs } {}
4379
+ struct AdapterPropertiesExplicitComputeSubgroupSizeConfigs::Init {
4380
+ ChainedStructOut * nextInChain;
4381
+ uint32_t minExplicitComputeSubgroupSize;
4382
+ uint32_t maxExplicitComputeSubgroupSize;
4383
+ uint32_t maxComputeWorkgroupSubgroups;
4384
+ };
4385
+ AdapterPropertiesExplicitComputeSubgroupSizeConfigs::AdapterPropertiesExplicitComputeSubgroupSizeConfigs(AdapterPropertiesExplicitComputeSubgroupSizeConfigs::Init&& init)
4386
+ : ChainedStructOut { init.nextInChain, SType::AdapterPropertiesExplicitComputeSubgroupSizeConfigs },
4387
+ minExplicitComputeSubgroupSize(std::move(init.minExplicitComputeSubgroupSize)),
4388
+ maxExplicitComputeSubgroupSize(std::move(init.maxExplicitComputeSubgroupSize)),
4389
+ maxComputeWorkgroupSubgroups(std::move(init.maxComputeWorkgroupSubgroups)){}
4390
+
4391
+ AdapterPropertiesExplicitComputeSubgroupSizeConfigs::operator const WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs&() const noexcept {
4392
+ return *reinterpret_cast<const WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs*>(this);
4393
+ }
4394
+
4395
+ static_assert(sizeof(AdapterPropertiesExplicitComputeSubgroupSizeConfigs) == sizeof(WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs), "sizeof mismatch for AdapterPropertiesExplicitComputeSubgroupSizeConfigs");
4396
+ static_assert(alignof(AdapterPropertiesExplicitComputeSubgroupSizeConfigs) == alignof(WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs), "alignof mismatch for AdapterPropertiesExplicitComputeSubgroupSizeConfigs");
4397
+ static_assert(offsetof(AdapterPropertiesExplicitComputeSubgroupSizeConfigs, minExplicitComputeSubgroupSize) == offsetof(WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs, minExplicitComputeSubgroupSize),
4398
+ "offsetof mismatch for AdapterPropertiesExplicitComputeSubgroupSizeConfigs::minExplicitComputeSubgroupSize");
4399
+ static_assert(offsetof(AdapterPropertiesExplicitComputeSubgroupSizeConfigs, maxExplicitComputeSubgroupSize) == offsetof(WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs, maxExplicitComputeSubgroupSize),
4400
+ "offsetof mismatch for AdapterPropertiesExplicitComputeSubgroupSizeConfigs::maxExplicitComputeSubgroupSize");
4401
+ static_assert(offsetof(AdapterPropertiesExplicitComputeSubgroupSizeConfigs, maxComputeWorkgroupSubgroups) == offsetof(WGPUAdapterPropertiesExplicitComputeSubgroupSizeConfigs, maxComputeWorkgroupSubgroups),
4402
+ "offsetof mismatch for AdapterPropertiesExplicitComputeSubgroupSizeConfigs::maxComputeWorkgroupSubgroups");
4403
+
4327
4404
  // AdapterPropertiesVk implementation
4328
4405
  AdapterPropertiesVk::AdapterPropertiesVk()
4329
4406
  : ChainedStructOut { nullptr, SType::AdapterPropertiesVk } {}
@@ -4364,25 +4441,26 @@ static_assert(alignof(AdapterPropertiesWGPU) == alignof(WGPUAdapterPropertiesWGP
4364
4441
  static_assert(offsetof(AdapterPropertiesWGPU, backendType) == offsetof(WGPUAdapterPropertiesWGPU, backendType),
4365
4442
  "offsetof mismatch for AdapterPropertiesWGPU::backendType");
4366
4443
 
4367
- // BindGroupDynamicBindingArray implementation
4368
- BindGroupDynamicBindingArray::BindGroupDynamicBindingArray()
4369
- : ChainedStruct { nullptr, SType::BindGroupDynamicBindingArray } {}
4370
- struct BindGroupDynamicBindingArray::Init {
4371
- ChainedStruct * const nextInChain;
4372
- uint32_t dynamicArraySize = 0;
4373
- };
4374
- BindGroupDynamicBindingArray::BindGroupDynamicBindingArray(BindGroupDynamicBindingArray::Init&& init)
4375
- : ChainedStruct { init.nextInChain, SType::BindGroupDynamicBindingArray },
4376
- dynamicArraySize(std::move(init.dynamicArraySize)){}
4444
+ // BindingResource implementation
4377
4445
 
4378
- BindGroupDynamicBindingArray::operator const WGPUBindGroupDynamicBindingArray&() const noexcept {
4379
- return *reinterpret_cast<const WGPUBindGroupDynamicBindingArray*>(this);
4446
+ BindingResource::operator const WGPUBindingResource&() const noexcept {
4447
+ return *reinterpret_cast<const WGPUBindingResource*>(this);
4380
4448
  }
4381
4449
 
4382
- static_assert(sizeof(BindGroupDynamicBindingArray) == sizeof(WGPUBindGroupDynamicBindingArray), "sizeof mismatch for BindGroupDynamicBindingArray");
4383
- static_assert(alignof(BindGroupDynamicBindingArray) == alignof(WGPUBindGroupDynamicBindingArray), "alignof mismatch for BindGroupDynamicBindingArray");
4384
- static_assert(offsetof(BindGroupDynamicBindingArray, dynamicArraySize) == offsetof(WGPUBindGroupDynamicBindingArray, dynamicArraySize),
4385
- "offsetof mismatch for BindGroupDynamicBindingArray::dynamicArraySize");
4450
+ static_assert(sizeof(BindingResource) == sizeof(WGPUBindingResource), "sizeof mismatch for BindingResource");
4451
+ static_assert(alignof(BindingResource) == alignof(WGPUBindingResource), "alignof mismatch for BindingResource");
4452
+ static_assert(offsetof(BindingResource, nextInChain) == offsetof(WGPUBindingResource, nextInChain),
4453
+ "offsetof mismatch for BindingResource::nextInChain");
4454
+ static_assert(offsetof(BindingResource, buffer) == offsetof(WGPUBindingResource, buffer),
4455
+ "offsetof mismatch for BindingResource::buffer");
4456
+ static_assert(offsetof(BindingResource, offset) == offsetof(WGPUBindingResource, offset),
4457
+ "offsetof mismatch for BindingResource::offset");
4458
+ static_assert(offsetof(BindingResource, size) == offsetof(WGPUBindingResource, size),
4459
+ "offsetof mismatch for BindingResource::size");
4460
+ static_assert(offsetof(BindingResource, sampler) == offsetof(WGPUBindingResource, sampler),
4461
+ "offsetof mismatch for BindingResource::sampler");
4462
+ static_assert(offsetof(BindingResource, textureView) == offsetof(WGPUBindingResource, textureView),
4463
+ "offsetof mismatch for BindingResource::textureView");
4386
4464
 
4387
4465
  // BlendComponent implementation
4388
4466
 
@@ -4825,25 +4903,25 @@ static_assert(alignof(DawnInjectedInvalidSType) == alignof(WGPUDawnInjectedInval
4825
4903
  static_assert(offsetof(DawnInjectedInvalidSType, invalidSType) == offsetof(WGPUDawnInjectedInvalidSType, invalidSType),
4826
4904
  "offsetof mismatch for DawnInjectedInvalidSType::invalidSType");
4827
4905
 
4828
- // DawnRenderPassColorAttachmentRenderToSingleSampled implementation
4829
- DawnRenderPassColorAttachmentRenderToSingleSampled::DawnRenderPassColorAttachmentRenderToSingleSampled()
4830
- : ChainedStruct { nullptr, SType::DawnRenderPassColorAttachmentRenderToSingleSampled } {}
4831
- struct DawnRenderPassColorAttachmentRenderToSingleSampled::Init {
4906
+ // DawnRenderPassSampleCount implementation
4907
+ DawnRenderPassSampleCount::DawnRenderPassSampleCount()
4908
+ : ChainedStruct { nullptr, SType::DawnRenderPassSampleCount } {}
4909
+ struct DawnRenderPassSampleCount::Init {
4832
4910
  ChainedStruct * const nextInChain;
4833
- uint32_t implicitSampleCount = 1;
4911
+ uint32_t sampleCount = 1;
4834
4912
  };
4835
- DawnRenderPassColorAttachmentRenderToSingleSampled::DawnRenderPassColorAttachmentRenderToSingleSampled(DawnRenderPassColorAttachmentRenderToSingleSampled::Init&& init)
4836
- : ChainedStruct { init.nextInChain, SType::DawnRenderPassColorAttachmentRenderToSingleSampled },
4837
- implicitSampleCount(std::move(init.implicitSampleCount)){}
4913
+ DawnRenderPassSampleCount::DawnRenderPassSampleCount(DawnRenderPassSampleCount::Init&& init)
4914
+ : ChainedStruct { init.nextInChain, SType::DawnRenderPassSampleCount },
4915
+ sampleCount(std::move(init.sampleCount)){}
4838
4916
 
4839
- DawnRenderPassColorAttachmentRenderToSingleSampled::operator const WGPUDawnRenderPassColorAttachmentRenderToSingleSampled&() const noexcept {
4840
- return *reinterpret_cast<const WGPUDawnRenderPassColorAttachmentRenderToSingleSampled*>(this);
4917
+ DawnRenderPassSampleCount::operator const WGPUDawnRenderPassSampleCount&() const noexcept {
4918
+ return *reinterpret_cast<const WGPUDawnRenderPassSampleCount*>(this);
4841
4919
  }
4842
4920
 
4843
- static_assert(sizeof(DawnRenderPassColorAttachmentRenderToSingleSampled) == sizeof(WGPUDawnRenderPassColorAttachmentRenderToSingleSampled), "sizeof mismatch for DawnRenderPassColorAttachmentRenderToSingleSampled");
4844
- static_assert(alignof(DawnRenderPassColorAttachmentRenderToSingleSampled) == alignof(WGPUDawnRenderPassColorAttachmentRenderToSingleSampled), "alignof mismatch for DawnRenderPassColorAttachmentRenderToSingleSampled");
4845
- static_assert(offsetof(DawnRenderPassColorAttachmentRenderToSingleSampled, implicitSampleCount) == offsetof(WGPUDawnRenderPassColorAttachmentRenderToSingleSampled, implicitSampleCount),
4846
- "offsetof mismatch for DawnRenderPassColorAttachmentRenderToSingleSampled::implicitSampleCount");
4921
+ static_assert(sizeof(DawnRenderPassSampleCount) == sizeof(WGPUDawnRenderPassSampleCount), "sizeof mismatch for DawnRenderPassSampleCount");
4922
+ static_assert(alignof(DawnRenderPassSampleCount) == alignof(WGPUDawnRenderPassSampleCount), "alignof mismatch for DawnRenderPassSampleCount");
4923
+ static_assert(offsetof(DawnRenderPassSampleCount, sampleCount) == offsetof(WGPUDawnRenderPassSampleCount, sampleCount),
4924
+ "offsetof mismatch for DawnRenderPassSampleCount::sampleCount");
4847
4925
 
4848
4926
  // DawnShaderModuleSPIRVOptionsDescriptor implementation
4849
4927
  DawnShaderModuleSPIRVOptionsDescriptor::DawnShaderModuleSPIRVOptionsDescriptor()
@@ -4989,41 +5067,6 @@ static_assert(offsetof(DawnWireWGSLControl, enableUnsafe) == offsetof(WGPUDawnWi
4989
5067
  static_assert(offsetof(DawnWireWGSLControl, enableTesting) == offsetof(WGPUDawnWireWGSLControl, enableTesting),
4990
5068
  "offsetof mismatch for DawnWireWGSLControl::enableTesting");
4991
5069
 
4992
- // DynamicBindingArrayLayout implementation
4993
-
4994
- DynamicBindingArrayLayout::operator const WGPUDynamicBindingArrayLayout&() const noexcept {
4995
- return *reinterpret_cast<const WGPUDynamicBindingArrayLayout*>(this);
4996
- }
4997
-
4998
- static_assert(sizeof(DynamicBindingArrayLayout) == sizeof(WGPUDynamicBindingArrayLayout), "sizeof mismatch for DynamicBindingArrayLayout");
4999
- static_assert(alignof(DynamicBindingArrayLayout) == alignof(WGPUDynamicBindingArrayLayout), "alignof mismatch for DynamicBindingArrayLayout");
5000
- static_assert(offsetof(DynamicBindingArrayLayout, nextInChain) == offsetof(WGPUDynamicBindingArrayLayout, nextInChain),
5001
- "offsetof mismatch for DynamicBindingArrayLayout::nextInChain");
5002
- static_assert(offsetof(DynamicBindingArrayLayout, start) == offsetof(WGPUDynamicBindingArrayLayout, start),
5003
- "offsetof mismatch for DynamicBindingArrayLayout::start");
5004
- static_assert(offsetof(DynamicBindingArrayLayout, kind) == offsetof(WGPUDynamicBindingArrayLayout, kind),
5005
- "offsetof mismatch for DynamicBindingArrayLayout::kind");
5006
-
5007
- // DynamicBindingArrayLimits implementation
5008
- DynamicBindingArrayLimits::DynamicBindingArrayLimits()
5009
- : ChainedStructOut { nullptr, SType::DynamicBindingArrayLimits } {}
5010
- struct DynamicBindingArrayLimits::Init {
5011
- ChainedStructOut * nextInChain;
5012
- uint32_t maxDynamicBindingArraySize = kLimitU32Undefined;
5013
- };
5014
- DynamicBindingArrayLimits::DynamicBindingArrayLimits(DynamicBindingArrayLimits::Init&& init)
5015
- : ChainedStructOut { init.nextInChain, SType::DynamicBindingArrayLimits },
5016
- maxDynamicBindingArraySize(std::move(init.maxDynamicBindingArraySize)){}
5017
-
5018
- DynamicBindingArrayLimits::operator const WGPUDynamicBindingArrayLimits&() const noexcept {
5019
- return *reinterpret_cast<const WGPUDynamicBindingArrayLimits*>(this);
5020
- }
5021
-
5022
- static_assert(sizeof(DynamicBindingArrayLimits) == sizeof(WGPUDynamicBindingArrayLimits), "sizeof mismatch for DynamicBindingArrayLimits");
5023
- static_assert(alignof(DynamicBindingArrayLimits) == alignof(WGPUDynamicBindingArrayLimits), "alignof mismatch for DynamicBindingArrayLimits");
5024
- static_assert(offsetof(DynamicBindingArrayLimits, maxDynamicBindingArraySize) == offsetof(WGPUDynamicBindingArrayLimits, maxDynamicBindingArraySize),
5025
- "offsetof mismatch for DynamicBindingArrayLimits::maxDynamicBindingArraySize");
5026
-
5027
5070
  // EmscriptenSurfaceSourceCanvasHTMLSelector implementation
5028
5071
  EmscriptenSurfaceSourceCanvasHTMLSelector::EmscriptenSurfaceSourceCanvasHTMLSelector()
5029
5072
  : ChainedStruct { nullptr, SType::EmscriptenSurfaceSourceCanvasHTMLSelector } {}
@@ -5218,6 +5261,26 @@ static_assert(offsetof(PassTimestampWrites, beginningOfPassWriteIndex) == offset
5218
5261
  static_assert(offsetof(PassTimestampWrites, endOfPassWriteIndex) == offsetof(WGPUPassTimestampWrites, endOfPassWriteIndex),
5219
5262
  "offsetof mismatch for PassTimestampWrites::endOfPassWriteIndex");
5220
5263
 
5264
+ // PipelineLayoutResourceTable implementation
5265
+ PipelineLayoutResourceTable::PipelineLayoutResourceTable()
5266
+ : ChainedStruct { nullptr, SType::PipelineLayoutResourceTable } {}
5267
+ struct PipelineLayoutResourceTable::Init {
5268
+ ChainedStruct * const nextInChain;
5269
+ Bool usesResourceTable = false;
5270
+ };
5271
+ PipelineLayoutResourceTable::PipelineLayoutResourceTable(PipelineLayoutResourceTable::Init&& init)
5272
+ : ChainedStruct { init.nextInChain, SType::PipelineLayoutResourceTable },
5273
+ usesResourceTable(std::move(init.usesResourceTable)){}
5274
+
5275
+ PipelineLayoutResourceTable::operator const WGPUPipelineLayoutResourceTable&() const noexcept {
5276
+ return *reinterpret_cast<const WGPUPipelineLayoutResourceTable*>(this);
5277
+ }
5278
+
5279
+ static_assert(sizeof(PipelineLayoutResourceTable) == sizeof(WGPUPipelineLayoutResourceTable), "sizeof mismatch for PipelineLayoutResourceTable");
5280
+ static_assert(alignof(PipelineLayoutResourceTable) == alignof(WGPUPipelineLayoutResourceTable), "alignof mismatch for PipelineLayoutResourceTable");
5281
+ static_assert(offsetof(PipelineLayoutResourceTable, usesResourceTable) == offsetof(WGPUPipelineLayoutResourceTable, usesResourceTable),
5282
+ "offsetof mismatch for PipelineLayoutResourceTable::usesResourceTable");
5283
+
5221
5284
  // PipelineLayoutStorageAttachment implementation
5222
5285
 
5223
5286
  PipelineLayoutStorageAttachment::operator const WGPUPipelineLayoutStorageAttachment&() const noexcept {
@@ -5351,38 +5414,6 @@ static_assert(offsetof(RenderPassDepthStencilAttachment, stencilClearValue) == o
5351
5414
  static_assert(offsetof(RenderPassDepthStencilAttachment, stencilReadOnly) == offsetof(WGPURenderPassDepthStencilAttachment, stencilReadOnly),
5352
5415
  "offsetof mismatch for RenderPassDepthStencilAttachment::stencilReadOnly");
5353
5416
 
5354
- // RenderPassDescriptorExpandResolveRect implementation
5355
- RenderPassDescriptorExpandResolveRect::RenderPassDescriptorExpandResolveRect()
5356
- : ChainedStruct { nullptr, SType::RenderPassDescriptorExpandResolveRect } {}
5357
- struct RenderPassDescriptorExpandResolveRect::Init {
5358
- ChainedStruct * const nextInChain;
5359
- uint32_t x;
5360
- uint32_t y;
5361
- uint32_t width;
5362
- uint32_t height;
5363
- };
5364
- RenderPassDescriptorExpandResolveRect::RenderPassDescriptorExpandResolveRect(RenderPassDescriptorExpandResolveRect::Init&& init)
5365
- : ChainedStruct { init.nextInChain, SType::RenderPassDescriptorExpandResolveRect },
5366
- x(std::move(init.x)),
5367
- y(std::move(init.y)),
5368
- width(std::move(init.width)),
5369
- height(std::move(init.height)){}
5370
-
5371
- RenderPassDescriptorExpandResolveRect::operator const WGPURenderPassDescriptorExpandResolveRect&() const noexcept {
5372
- return *reinterpret_cast<const WGPURenderPassDescriptorExpandResolveRect*>(this);
5373
- }
5374
-
5375
- static_assert(sizeof(RenderPassDescriptorExpandResolveRect) == sizeof(WGPURenderPassDescriptorExpandResolveRect), "sizeof mismatch for RenderPassDescriptorExpandResolveRect");
5376
- static_assert(alignof(RenderPassDescriptorExpandResolveRect) == alignof(WGPURenderPassDescriptorExpandResolveRect), "alignof mismatch for RenderPassDescriptorExpandResolveRect");
5377
- static_assert(offsetof(RenderPassDescriptorExpandResolveRect, x) == offsetof(WGPURenderPassDescriptorExpandResolveRect, x),
5378
- "offsetof mismatch for RenderPassDescriptorExpandResolveRect::x");
5379
- static_assert(offsetof(RenderPassDescriptorExpandResolveRect, y) == offsetof(WGPURenderPassDescriptorExpandResolveRect, y),
5380
- "offsetof mismatch for RenderPassDescriptorExpandResolveRect::y");
5381
- static_assert(offsetof(RenderPassDescriptorExpandResolveRect, width) == offsetof(WGPURenderPassDescriptorExpandResolveRect, width),
5382
- "offsetof mismatch for RenderPassDescriptorExpandResolveRect::width");
5383
- static_assert(offsetof(RenderPassDescriptorExpandResolveRect, height) == offsetof(WGPURenderPassDescriptorExpandResolveRect, height),
5384
- "offsetof mismatch for RenderPassDescriptorExpandResolveRect::height");
5385
-
5386
5417
  // RenderPassDescriptorResolveRect implementation
5387
5418
  RenderPassDescriptorResolveRect::RenderPassDescriptorResolveRect()
5388
5419
  : ChainedStruct { nullptr, SType::RenderPassDescriptorResolveRect } {}
@@ -5479,6 +5510,21 @@ static_assert(alignof(RequestAdapterWebXROptions) == alignof(WGPURequestAdapterW
5479
5510
  static_assert(offsetof(RequestAdapterWebXROptions, xrCompatible) == offsetof(WGPURequestAdapterWebXROptions, xrCompatible),
5480
5511
  "offsetof mismatch for RequestAdapterWebXROptions::xrCompatible");
5481
5512
 
5513
+ // ResourceTableDescriptor implementation
5514
+
5515
+ ResourceTableDescriptor::operator const WGPUResourceTableDescriptor&() const noexcept {
5516
+ return *reinterpret_cast<const WGPUResourceTableDescriptor*>(this);
5517
+ }
5518
+
5519
+ static_assert(sizeof(ResourceTableDescriptor) == sizeof(WGPUResourceTableDescriptor), "sizeof mismatch for ResourceTableDescriptor");
5520
+ static_assert(alignof(ResourceTableDescriptor) == alignof(WGPUResourceTableDescriptor), "alignof mismatch for ResourceTableDescriptor");
5521
+ static_assert(offsetof(ResourceTableDescriptor, nextInChain) == offsetof(WGPUResourceTableDescriptor, nextInChain),
5522
+ "offsetof mismatch for ResourceTableDescriptor::nextInChain");
5523
+ static_assert(offsetof(ResourceTableDescriptor, label) == offsetof(WGPUResourceTableDescriptor, label),
5524
+ "offsetof mismatch for ResourceTableDescriptor::label");
5525
+ static_assert(offsetof(ResourceTableDescriptor, size) == offsetof(WGPUResourceTableDescriptor, size),
5526
+ "offsetof mismatch for ResourceTableDescriptor::size");
5527
+
5482
5528
  // SamplerBindingLayout implementation
5483
5529
 
5484
5530
  SamplerBindingLayout::operator const WGPUSamplerBindingLayout&() const noexcept {
@@ -5575,18 +5621,29 @@ static_assert(offsetof(SharedBufferMemoryBeginAccessDescriptor, fences) == offse
5575
5621
  static_assert(offsetof(SharedBufferMemoryBeginAccessDescriptor, signaledValues) == offsetof(WGPUSharedBufferMemoryBeginAccessDescriptor, signaledValues),
5576
5622
  "offsetof mismatch for SharedBufferMemoryBeginAccessDescriptor::signaledValues");
5577
5623
 
5578
- // SharedBufferMemoryDescriptor implementation
5624
+ // SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor implementation
5625
+ SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor()
5626
+ : ChainedStruct { nullptr, SType::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor } {}
5627
+ struct SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::Init {
5628
+ ChainedStruct * const nextInChain;
5629
+ void * handle;
5630
+ uint64_t size;
5631
+ };
5632
+ SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::Init&& init)
5633
+ : ChainedStruct { init.nextInChain, SType::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor },
5634
+ handle(std::move(init.handle)),
5635
+ size(std::move(init.size)){}
5579
5636
 
5580
- SharedBufferMemoryDescriptor::operator const WGPUSharedBufferMemoryDescriptor&() const noexcept {
5581
- return *reinterpret_cast<const WGPUSharedBufferMemoryDescriptor*>(this);
5637
+ SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::operator const WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor&() const noexcept {
5638
+ return *reinterpret_cast<const WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor*>(this);
5582
5639
  }
5583
5640
 
5584
- static_assert(sizeof(SharedBufferMemoryDescriptor) == sizeof(WGPUSharedBufferMemoryDescriptor), "sizeof mismatch for SharedBufferMemoryDescriptor");
5585
- static_assert(alignof(SharedBufferMemoryDescriptor) == alignof(WGPUSharedBufferMemoryDescriptor), "alignof mismatch for SharedBufferMemoryDescriptor");
5586
- static_assert(offsetof(SharedBufferMemoryDescriptor, nextInChain) == offsetof(WGPUSharedBufferMemoryDescriptor, nextInChain),
5587
- "offsetof mismatch for SharedBufferMemoryDescriptor::nextInChain");
5588
- static_assert(offsetof(SharedBufferMemoryDescriptor, label) == offsetof(WGPUSharedBufferMemoryDescriptor, label),
5589
- "offsetof mismatch for SharedBufferMemoryDescriptor::label");
5641
+ static_assert(sizeof(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor) == sizeof(WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor), "sizeof mismatch for SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor");
5642
+ static_assert(alignof(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor) == alignof(WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor), "alignof mismatch for SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor");
5643
+ static_assert(offsetof(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor, handle) == offsetof(WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor, handle),
5644
+ "offsetof mismatch for SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::handle");
5645
+ static_assert(offsetof(SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor, size) == offsetof(WGPUSharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor, size),
5646
+ "offsetof mismatch for SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor::size");
5590
5647
 
5591
5648
  // SharedBufferMemoryEndAccessState implementation
5592
5649
  SharedBufferMemoryEndAccessState::SharedBufferMemoryEndAccessState() = default;
@@ -5909,12 +5966,10 @@ SharedTextureMemoryAHardwareBufferDescriptor::SharedTextureMemoryAHardwareBuffer
5909
5966
  struct SharedTextureMemoryAHardwareBufferDescriptor::Init {
5910
5967
  ChainedStruct * const nextInChain;
5911
5968
  void * handle;
5912
- Bool useExternalFormat;
5913
5969
  };
5914
5970
  SharedTextureMemoryAHardwareBufferDescriptor::SharedTextureMemoryAHardwareBufferDescriptor(SharedTextureMemoryAHardwareBufferDescriptor::Init&& init)
5915
5971
  : ChainedStruct { init.nextInChain, SType::SharedTextureMemoryAHardwareBufferDescriptor },
5916
- handle(std::move(init.handle)),
5917
- useExternalFormat(std::move(init.useExternalFormat)){}
5972
+ handle(std::move(init.handle)){}
5918
5973
 
5919
5974
  SharedTextureMemoryAHardwareBufferDescriptor::operator const WGPUSharedTextureMemoryAHardwareBufferDescriptor&() const noexcept {
5920
5975
  return *reinterpret_cast<const WGPUSharedTextureMemoryAHardwareBufferDescriptor*>(this);
@@ -5924,8 +5979,6 @@ static_assert(sizeof(SharedTextureMemoryAHardwareBufferDescriptor) == sizeof(WGP
5924
5979
  static_assert(alignof(SharedTextureMemoryAHardwareBufferDescriptor) == alignof(WGPUSharedTextureMemoryAHardwareBufferDescriptor), "alignof mismatch for SharedTextureMemoryAHardwareBufferDescriptor");
5925
5980
  static_assert(offsetof(SharedTextureMemoryAHardwareBufferDescriptor, handle) == offsetof(WGPUSharedTextureMemoryAHardwareBufferDescriptor, handle),
5926
5981
  "offsetof mismatch for SharedTextureMemoryAHardwareBufferDescriptor::handle");
5927
- static_assert(offsetof(SharedTextureMemoryAHardwareBufferDescriptor, useExternalFormat) == offsetof(WGPUSharedTextureMemoryAHardwareBufferDescriptor, useExternalFormat),
5928
- "offsetof mismatch for SharedTextureMemoryAHardwareBufferDescriptor::useExternalFormat");
5929
5982
 
5930
5983
  // SharedTextureMemoryD3D11BeginState implementation
5931
5984
  SharedTextureMemoryD3D11BeginState::SharedTextureMemoryD3D11BeginState()
@@ -6833,25 +6886,25 @@ static_assert(offsetof(TextureBindingLayout, viewDimension) == offsetof(WGPUText
6833
6886
  static_assert(offsetof(TextureBindingLayout, multisampled) == offsetof(WGPUTextureBindingLayout, multisampled),
6834
6887
  "offsetof mismatch for TextureBindingLayout::multisampled");
6835
6888
 
6836
- // TextureBindingViewDimensionDescriptor implementation
6837
- TextureBindingViewDimensionDescriptor::TextureBindingViewDimensionDescriptor()
6838
- : ChainedStruct { nullptr, SType::TextureBindingViewDimensionDescriptor } {}
6839
- struct TextureBindingViewDimensionDescriptor::Init {
6889
+ // TextureBindingViewDimension implementation
6890
+ TextureBindingViewDimension::TextureBindingViewDimension()
6891
+ : ChainedStruct { nullptr, SType::TextureBindingViewDimension } {}
6892
+ struct TextureBindingViewDimension::Init {
6840
6893
  ChainedStruct * const nextInChain;
6841
6894
  TextureViewDimension textureBindingViewDimension = TextureViewDimension::Undefined;
6842
6895
  };
6843
- TextureBindingViewDimensionDescriptor::TextureBindingViewDimensionDescriptor(TextureBindingViewDimensionDescriptor::Init&& init)
6844
- : ChainedStruct { init.nextInChain, SType::TextureBindingViewDimensionDescriptor },
6896
+ TextureBindingViewDimension::TextureBindingViewDimension(TextureBindingViewDimension::Init&& init)
6897
+ : ChainedStruct { init.nextInChain, SType::TextureBindingViewDimension },
6845
6898
  textureBindingViewDimension(std::move(init.textureBindingViewDimension)){}
6846
6899
 
6847
- TextureBindingViewDimensionDescriptor::operator const WGPUTextureBindingViewDimensionDescriptor&() const noexcept {
6848
- return *reinterpret_cast<const WGPUTextureBindingViewDimensionDescriptor*>(this);
6900
+ TextureBindingViewDimension::operator const WGPUTextureBindingViewDimension&() const noexcept {
6901
+ return *reinterpret_cast<const WGPUTextureBindingViewDimension*>(this);
6849
6902
  }
6850
6903
 
6851
- static_assert(sizeof(TextureBindingViewDimensionDescriptor) == sizeof(WGPUTextureBindingViewDimensionDescriptor), "sizeof mismatch for TextureBindingViewDimensionDescriptor");
6852
- static_assert(alignof(TextureBindingViewDimensionDescriptor) == alignof(WGPUTextureBindingViewDimensionDescriptor), "alignof mismatch for TextureBindingViewDimensionDescriptor");
6853
- static_assert(offsetof(TextureBindingViewDimensionDescriptor, textureBindingViewDimension) == offsetof(WGPUTextureBindingViewDimensionDescriptor, textureBindingViewDimension),
6854
- "offsetof mismatch for TextureBindingViewDimensionDescriptor::textureBindingViewDimension");
6904
+ static_assert(sizeof(TextureBindingViewDimension) == sizeof(WGPUTextureBindingViewDimension), "sizeof mismatch for TextureBindingViewDimension");
6905
+ static_assert(alignof(TextureBindingViewDimension) == alignof(WGPUTextureBindingViewDimension), "alignof mismatch for TextureBindingViewDimension");
6906
+ static_assert(offsetof(TextureBindingViewDimension, textureBindingViewDimension) == offsetof(WGPUTextureBindingViewDimension, textureBindingViewDimension),
6907
+ "offsetof mismatch for TextureBindingViewDimension::textureBindingViewDimension");
6855
6908
 
6856
6909
  // TextureComponentSwizzle implementation
6857
6910
 
@@ -7101,26 +7154,6 @@ static_assert(offsetof(BindGroupEntry, sampler) == offsetof(WGPUBindGroupEntry,
7101
7154
  static_assert(offsetof(BindGroupEntry, textureView) == offsetof(WGPUBindGroupEntry, textureView),
7102
7155
  "offsetof mismatch for BindGroupEntry::textureView");
7103
7156
 
7104
- // BindGroupLayoutDynamicBindingArray implementation
7105
- BindGroupLayoutDynamicBindingArray::BindGroupLayoutDynamicBindingArray()
7106
- : ChainedStruct { nullptr, SType::BindGroupLayoutDynamicBindingArray } {}
7107
- struct BindGroupLayoutDynamicBindingArray::Init {
7108
- ChainedStruct * const nextInChain;
7109
- DynamicBindingArrayLayout dynamicArray = {};
7110
- };
7111
- BindGroupLayoutDynamicBindingArray::BindGroupLayoutDynamicBindingArray(BindGroupLayoutDynamicBindingArray::Init&& init)
7112
- : ChainedStruct { init.nextInChain, SType::BindGroupLayoutDynamicBindingArray },
7113
- dynamicArray(std::move(init.dynamicArray)){}
7114
-
7115
- BindGroupLayoutDynamicBindingArray::operator const WGPUBindGroupLayoutDynamicBindingArray&() const noexcept {
7116
- return *reinterpret_cast<const WGPUBindGroupLayoutDynamicBindingArray*>(this);
7117
- }
7118
-
7119
- static_assert(sizeof(BindGroupLayoutDynamicBindingArray) == sizeof(WGPUBindGroupLayoutDynamicBindingArray), "sizeof mismatch for BindGroupLayoutDynamicBindingArray");
7120
- static_assert(alignof(BindGroupLayoutDynamicBindingArray) == alignof(WGPUBindGroupLayoutDynamicBindingArray), "alignof mismatch for BindGroupLayoutDynamicBindingArray");
7121
- static_assert(offsetof(BindGroupLayoutDynamicBindingArray, dynamicArray) == offsetof(WGPUBindGroupLayoutDynamicBindingArray, dynamicArray),
7122
- "offsetof mismatch for BindGroupLayoutDynamicBindingArray::dynamicArray");
7123
-
7124
7157
  // BindGroupLayoutEntry implementation
7125
7158
 
7126
7159
  BindGroupLayoutEntry::operator const WGPUBindGroupLayoutEntry&() const noexcept {
@@ -7547,6 +7580,30 @@ static_assert(offsetof(RenderPassColorAttachment, storeOp) == offsetof(WGPURende
7547
7580
  static_assert(offsetof(RenderPassColorAttachment, clearValue) == offsetof(WGPURenderPassColorAttachment, clearValue),
7548
7581
  "offsetof mismatch for RenderPassColorAttachment::clearValue");
7549
7582
 
7583
+ // RenderPassRenderAreaRect implementation
7584
+ RenderPassRenderAreaRect::RenderPassRenderAreaRect()
7585
+ : ChainedStruct { nullptr, SType::RenderPassRenderAreaRect } {}
7586
+ struct RenderPassRenderAreaRect::Init {
7587
+ ChainedStruct * const nextInChain;
7588
+ Origin2D origin = {};
7589
+ Extent2D size = {};
7590
+ };
7591
+ RenderPassRenderAreaRect::RenderPassRenderAreaRect(RenderPassRenderAreaRect::Init&& init)
7592
+ : ChainedStruct { init.nextInChain, SType::RenderPassRenderAreaRect },
7593
+ origin(std::move(init.origin)),
7594
+ size(std::move(init.size)){}
7595
+
7596
+ RenderPassRenderAreaRect::operator const WGPURenderPassRenderAreaRect&() const noexcept {
7597
+ return *reinterpret_cast<const WGPURenderPassRenderAreaRect*>(this);
7598
+ }
7599
+
7600
+ static_assert(sizeof(RenderPassRenderAreaRect) == sizeof(WGPURenderPassRenderAreaRect), "sizeof mismatch for RenderPassRenderAreaRect");
7601
+ static_assert(alignof(RenderPassRenderAreaRect) == alignof(WGPURenderPassRenderAreaRect), "alignof mismatch for RenderPassRenderAreaRect");
7602
+ static_assert(offsetof(RenderPassRenderAreaRect, origin) == offsetof(WGPURenderPassRenderAreaRect, origin),
7603
+ "offsetof mismatch for RenderPassRenderAreaRect::origin");
7604
+ static_assert(offsetof(RenderPassRenderAreaRect, size) == offsetof(WGPURenderPassRenderAreaRect, size),
7605
+ "offsetof mismatch for RenderPassRenderAreaRect::size");
7606
+
7550
7607
  // RenderPassStorageAttachment implementation
7551
7608
 
7552
7609
  RenderPassStorageAttachment::operator const WGPURenderPassStorageAttachment&() const noexcept {
@@ -7635,6 +7692,19 @@ static_assert(offsetof(ShaderModuleDescriptor, nextInChain) == offsetof(WGPUShad
7635
7692
  static_assert(offsetof(ShaderModuleDescriptor, label) == offsetof(WGPUShaderModuleDescriptor, label),
7636
7693
  "offsetof mismatch for ShaderModuleDescriptor::label");
7637
7694
 
7695
+ // SharedBufferMemoryDescriptor implementation
7696
+
7697
+ SharedBufferMemoryDescriptor::operator const WGPUSharedBufferMemoryDescriptor&() const noexcept {
7698
+ return *reinterpret_cast<const WGPUSharedBufferMemoryDescriptor*>(this);
7699
+ }
7700
+
7701
+ static_assert(sizeof(SharedBufferMemoryDescriptor) == sizeof(WGPUSharedBufferMemoryDescriptor), "sizeof mismatch for SharedBufferMemoryDescriptor");
7702
+ static_assert(alignof(SharedBufferMemoryDescriptor) == alignof(WGPUSharedBufferMemoryDescriptor), "alignof mismatch for SharedBufferMemoryDescriptor");
7703
+ static_assert(offsetof(SharedBufferMemoryDescriptor, nextInChain) == offsetof(WGPUSharedBufferMemoryDescriptor, nextInChain),
7704
+ "offsetof mismatch for SharedBufferMemoryDescriptor::nextInChain");
7705
+ static_assert(offsetof(SharedBufferMemoryDescriptor, label) == offsetof(WGPUSharedBufferMemoryDescriptor, label),
7706
+ "offsetof mismatch for SharedBufferMemoryDescriptor::label");
7707
+
7638
7708
  // SharedFenceDescriptor implementation
7639
7709
 
7640
7710
  SharedFenceDescriptor::operator const WGPUSharedFenceDescriptor&() const noexcept {
@@ -8551,9 +8621,6 @@ static_assert(alignof(Adapter) == alignof(WGPUAdapter), "alignof mismatch for Ad
8551
8621
 
8552
8622
  // BindGroup implementation
8553
8623
 
8554
- void BindGroup::Destroy() const {
8555
- wgpuBindGroupDestroy(Get());
8556
- }
8557
8624
  void BindGroup::SetLabel(StringView label) const {
8558
8625
  wgpuBindGroupSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
8559
8626
  }
@@ -8799,56 +8866,6 @@ void CommandEncoder::WGPURelease(WGPUCommandEncoder handle) {
8799
8866
  static_assert(sizeof(CommandEncoder) == sizeof(WGPUCommandEncoder), "sizeof mismatch for CommandEncoder");
8800
8867
  static_assert(alignof(CommandEncoder) == alignof(WGPUCommandEncoder), "alignof mismatch for CommandEncoder");
8801
8868
 
8802
- // ComputePassEncoder implementation
8803
-
8804
- void ComputePassEncoder::DispatchWorkgroups(uint32_t workgroupCountX, uint32_t workgroupCountY, uint32_t workgroupCountZ) const {
8805
- wgpuComputePassEncoderDispatchWorkgroups(Get(), workgroupCountX, workgroupCountY, workgroupCountZ);
8806
- }
8807
- void ComputePassEncoder::DispatchWorkgroupsIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
8808
- wgpuComputePassEncoderDispatchWorkgroupsIndirect(Get(), indirectBuffer.Get(), indirectOffset);
8809
- }
8810
- void ComputePassEncoder::End() const {
8811
- wgpuComputePassEncoderEnd(Get());
8812
- }
8813
- void ComputePassEncoder::InsertDebugMarker(StringView markerLabel) const {
8814
- wgpuComputePassEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
8815
- }
8816
- void ComputePassEncoder::PopDebugGroup() const {
8817
- wgpuComputePassEncoderPopDebugGroup(Get());
8818
- }
8819
- void ComputePassEncoder::PushDebugGroup(StringView groupLabel) const {
8820
- wgpuComputePassEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
8821
- }
8822
- void ComputePassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
8823
- wgpuComputePassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
8824
- }
8825
- void ComputePassEncoder::SetImmediateData(uint32_t offset, void const * data, size_t size) const {
8826
- wgpuComputePassEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const *>(data), size);
8827
- }
8828
- void ComputePassEncoder::SetLabel(StringView label) const {
8829
- wgpuComputePassEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
8830
- }
8831
- void ComputePassEncoder::SetPipeline(ComputePipeline const& pipeline) const {
8832
- wgpuComputePassEncoderSetPipeline(Get(), pipeline.Get());
8833
- }
8834
- void ComputePassEncoder::WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const {
8835
- wgpuComputePassEncoderWriteTimestamp(Get(), querySet.Get(), queryIndex);
8836
- }
8837
-
8838
-
8839
- void ComputePassEncoder::WGPUAddRef(WGPUComputePassEncoder handle) {
8840
- if (handle != nullptr) {
8841
- wgpuComputePassEncoderAddRef(handle);
8842
- }
8843
- }
8844
- void ComputePassEncoder::WGPURelease(WGPUComputePassEncoder handle) {
8845
- if (handle != nullptr) {
8846
- wgpuComputePassEncoderRelease(handle);
8847
- }
8848
- }
8849
- static_assert(sizeof(ComputePassEncoder) == sizeof(WGPUComputePassEncoder), "sizeof mismatch for ComputePassEncoder");
8850
- static_assert(alignof(ComputePassEncoder) == alignof(WGPUComputePassEncoder), "alignof mismatch for ComputePassEncoder");
8851
-
8852
8869
  // ComputePipeline implementation
8853
8870
 
8854
8871
  BindGroupLayout ComputePipeline::GetBindGroupLayout(uint32_t groupIndex) const {
@@ -9053,6 +9070,10 @@ Future Device::CreateRenderPipelineAsync(RenderPipelineDescriptor const * descri
9053
9070
  result.id
9054
9071
  };
9055
9072
  }
9073
+ ResourceTable Device::CreateResourceTable(ResourceTableDescriptor const * descriptor) const {
9074
+ auto result = wgpuDeviceCreateResourceTable(Get(), reinterpret_cast<WGPUResourceTableDescriptor const *>(descriptor));
9075
+ return ResourceTable::Acquire(result);
9076
+ }
9056
9077
  Sampler Device::CreateSampler(SamplerDescriptor const * descriptor) const {
9057
9078
  auto result = wgpuDeviceCreateSampler(Get(), reinterpret_cast<WGPUSamplerDescriptor const *>(descriptor));
9058
9079
  return Sampler::Acquire(result);
@@ -9559,198 +9580,82 @@ void RenderBundle::WGPURelease(WGPURenderBundle handle) {
9559
9580
  static_assert(sizeof(RenderBundle) == sizeof(WGPURenderBundle), "sizeof mismatch for RenderBundle");
9560
9581
  static_assert(alignof(RenderBundle) == alignof(WGPURenderBundle), "alignof mismatch for RenderBundle");
9561
9582
 
9562
- // RenderBundleEncoder implementation
9583
+ // RenderPipeline implementation
9563
9584
 
9564
- void RenderBundleEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const {
9565
- wgpuRenderBundleEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance);
9566
- }
9567
- void RenderBundleEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const {
9568
- wgpuRenderBundleEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance);
9569
- }
9570
- void RenderBundleEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
9571
- wgpuRenderBundleEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset);
9572
- }
9573
- void RenderBundleEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
9574
- wgpuRenderBundleEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset);
9575
- }
9576
- RenderBundle RenderBundleEncoder::Finish(RenderBundleDescriptor const * descriptor) const {
9577
- auto result = wgpuRenderBundleEncoderFinish(Get(), reinterpret_cast<WGPURenderBundleDescriptor const *>(descriptor));
9578
- return RenderBundle::Acquire(result);
9579
- }
9580
- void RenderBundleEncoder::InsertDebugMarker(StringView markerLabel) const {
9581
- wgpuRenderBundleEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
9585
+ BindGroupLayout RenderPipeline::GetBindGroupLayout(uint32_t groupIndex) const {
9586
+ auto result = wgpuRenderPipelineGetBindGroupLayout(Get(), groupIndex);
9587
+ return BindGroupLayout::Acquire(result);
9582
9588
  }
9583
- void RenderBundleEncoder::PopDebugGroup() const {
9584
- wgpuRenderBundleEncoderPopDebugGroup(Get());
9589
+ void RenderPipeline::SetLabel(StringView label) const {
9590
+ wgpuRenderPipelineSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9585
9591
  }
9586
- void RenderBundleEncoder::PushDebugGroup(StringView groupLabel) const {
9587
- wgpuRenderBundleEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
9592
+
9593
+
9594
+ void RenderPipeline::WGPUAddRef(WGPURenderPipeline handle) {
9595
+ if (handle != nullptr) {
9596
+ wgpuRenderPipelineAddRef(handle);
9597
+ }
9588
9598
  }
9589
- void RenderBundleEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
9590
- wgpuRenderBundleEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
9599
+ void RenderPipeline::WGPURelease(WGPURenderPipeline handle) {
9600
+ if (handle != nullptr) {
9601
+ wgpuRenderPipelineRelease(handle);
9602
+ }
9591
9603
  }
9592
- void RenderBundleEncoder::SetImmediateData(uint32_t offset, void const * data, size_t size) const {
9593
- wgpuRenderBundleEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const *>(data), size);
9604
+ static_assert(sizeof(RenderPipeline) == sizeof(WGPURenderPipeline), "sizeof mismatch for RenderPipeline");
9605
+ static_assert(alignof(RenderPipeline) == alignof(WGPURenderPipeline), "alignof mismatch for RenderPipeline");
9606
+
9607
+ // ResourceTable implementation
9608
+
9609
+ void ResourceTable::Destroy() const {
9610
+ wgpuResourceTableDestroy(Get());
9594
9611
  }
9595
- void RenderBundleEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
9596
- wgpuRenderBundleEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
9612
+ uint32_t ResourceTable::GetSize() const {
9613
+ auto result = wgpuResourceTableGetSize(Get());
9614
+ return result;
9597
9615
  }
9598
- void RenderBundleEncoder::SetLabel(StringView label) const {
9599
- wgpuRenderBundleEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9616
+ uint32_t ResourceTable::InsertBinding(BindingResource const * resource) const {
9617
+ auto result = wgpuResourceTableInsertBinding(Get(), reinterpret_cast<WGPUBindingResource const *>(resource));
9618
+ return result;
9600
9619
  }
9601
- void RenderBundleEncoder::SetPipeline(RenderPipeline const& pipeline) const {
9602
- wgpuRenderBundleEncoderSetPipeline(Get(), pipeline.Get());
9620
+ ConvertibleStatus ResourceTable::RemoveBinding(uint32_t slot) const {
9621
+ auto result = wgpuResourceTableRemoveBinding(Get(), slot);
9622
+ return static_cast<Status>(result);
9603
9623
  }
9604
- void RenderBundleEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const {
9605
- wgpuRenderBundleEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size);
9624
+ ConvertibleStatus ResourceTable::Update(uint32_t slot, BindingResource const * resource) const {
9625
+ auto result = wgpuResourceTableUpdate(Get(), slot, reinterpret_cast<WGPUBindingResource const *>(resource));
9626
+ return static_cast<Status>(result);
9606
9627
  }
9607
9628
 
9608
9629
 
9609
- void RenderBundleEncoder::WGPUAddRef(WGPURenderBundleEncoder handle) {
9630
+ void ResourceTable::WGPUAddRef(WGPUResourceTable handle) {
9610
9631
  if (handle != nullptr) {
9611
- wgpuRenderBundleEncoderAddRef(handle);
9632
+ wgpuResourceTableAddRef(handle);
9612
9633
  }
9613
9634
  }
9614
- void RenderBundleEncoder::WGPURelease(WGPURenderBundleEncoder handle) {
9635
+ void ResourceTable::WGPURelease(WGPUResourceTable handle) {
9615
9636
  if (handle != nullptr) {
9616
- wgpuRenderBundleEncoderRelease(handle);
9637
+ wgpuResourceTableRelease(handle);
9617
9638
  }
9618
9639
  }
9619
- static_assert(sizeof(RenderBundleEncoder) == sizeof(WGPURenderBundleEncoder), "sizeof mismatch for RenderBundleEncoder");
9620
- static_assert(alignof(RenderBundleEncoder) == alignof(WGPURenderBundleEncoder), "alignof mismatch for RenderBundleEncoder");
9640
+ static_assert(sizeof(ResourceTable) == sizeof(WGPUResourceTable), "sizeof mismatch for ResourceTable");
9641
+ static_assert(alignof(ResourceTable) == alignof(WGPUResourceTable), "alignof mismatch for ResourceTable");
9621
9642
 
9622
- // RenderPassEncoder implementation
9643
+ // Sampler implementation
9623
9644
 
9624
- void RenderPassEncoder::BeginOcclusionQuery(uint32_t queryIndex) const {
9625
- wgpuRenderPassEncoderBeginOcclusionQuery(Get(), queryIndex);
9626
- }
9627
- void RenderPassEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const {
9628
- wgpuRenderPassEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance);
9629
- }
9630
- void RenderPassEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const {
9631
- wgpuRenderPassEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance);
9632
- }
9633
- void RenderPassEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
9634
- wgpuRenderPassEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset);
9635
- }
9636
- void RenderPassEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
9637
- wgpuRenderPassEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset);
9638
- }
9639
- void RenderPassEncoder::End() const {
9640
- wgpuRenderPassEncoderEnd(Get());
9641
- }
9642
- void RenderPassEncoder::EndOcclusionQuery() const {
9643
- wgpuRenderPassEncoderEndOcclusionQuery(Get());
9645
+ void Sampler::SetLabel(StringView label) const {
9646
+ wgpuSamplerSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9644
9647
  }
9645
- void RenderPassEncoder::ExecuteBundles(size_t bundleCount, RenderBundle const * bundles) const {
9646
- wgpuRenderPassEncoderExecuteBundles(Get(), bundleCount, reinterpret_cast<WGPURenderBundle const *>(bundles));
9648
+
9649
+
9650
+ void Sampler::WGPUAddRef(WGPUSampler handle) {
9651
+ if (handle != nullptr) {
9652
+ wgpuSamplerAddRef(handle);
9653
+ }
9647
9654
  }
9648
- void RenderPassEncoder::InsertDebugMarker(StringView markerLabel) const {
9649
- wgpuRenderPassEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
9650
- }
9651
- void RenderPassEncoder::MultiDrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer, uint64_t drawCountBufferOffset) const {
9652
- wgpuRenderPassEncoderMultiDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset, maxDrawCount, drawCountBuffer.Get(), drawCountBufferOffset);
9653
- }
9654
- void RenderPassEncoder::MultiDrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer, uint64_t drawCountBufferOffset) const {
9655
- wgpuRenderPassEncoderMultiDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset, maxDrawCount, drawCountBuffer.Get(), drawCountBufferOffset);
9656
- }
9657
- void RenderPassEncoder::PixelLocalStorageBarrier() const {
9658
- wgpuRenderPassEncoderPixelLocalStorageBarrier(Get());
9659
- }
9660
- void RenderPassEncoder::PopDebugGroup() const {
9661
- wgpuRenderPassEncoderPopDebugGroup(Get());
9662
- }
9663
- void RenderPassEncoder::PushDebugGroup(StringView groupLabel) const {
9664
- wgpuRenderPassEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
9665
- }
9666
- void RenderPassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
9667
- wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
9668
- }
9669
- void RenderPassEncoder::SetBlendConstant(Color const * color) const {
9670
- wgpuRenderPassEncoderSetBlendConstant(Get(), reinterpret_cast<WGPUColor const *>(color));
9671
- }
9672
- void RenderPassEncoder::SetImmediateData(uint32_t offset, void const * data, size_t size) const {
9673
- wgpuRenderPassEncoderSetImmediateData(Get(), offset, reinterpret_cast<void const *>(data), size);
9674
- }
9675
- void RenderPassEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
9676
- wgpuRenderPassEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
9677
- }
9678
- void RenderPassEncoder::SetLabel(StringView label) const {
9679
- wgpuRenderPassEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9680
- }
9681
- void RenderPassEncoder::SetPipeline(RenderPipeline const& pipeline) const {
9682
- wgpuRenderPassEncoderSetPipeline(Get(), pipeline.Get());
9683
- }
9684
- void RenderPassEncoder::SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const {
9685
- wgpuRenderPassEncoderSetScissorRect(Get(), x, y, width, height);
9686
- }
9687
- void RenderPassEncoder::SetStencilReference(uint32_t reference) const {
9688
- wgpuRenderPassEncoderSetStencilReference(Get(), reference);
9689
- }
9690
- void RenderPassEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const {
9691
- wgpuRenderPassEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size);
9692
- }
9693
- void RenderPassEncoder::SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const {
9694
- wgpuRenderPassEncoderSetViewport(Get(), x, y, width, height, minDepth, maxDepth);
9695
- }
9696
- void RenderPassEncoder::WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const {
9697
- wgpuRenderPassEncoderWriteTimestamp(Get(), querySet.Get(), queryIndex);
9698
- }
9699
-
9700
-
9701
- void RenderPassEncoder::WGPUAddRef(WGPURenderPassEncoder handle) {
9702
- if (handle != nullptr) {
9703
- wgpuRenderPassEncoderAddRef(handle);
9704
- }
9705
- }
9706
- void RenderPassEncoder::WGPURelease(WGPURenderPassEncoder handle) {
9707
- if (handle != nullptr) {
9708
- wgpuRenderPassEncoderRelease(handle);
9709
- }
9710
- }
9711
- static_assert(sizeof(RenderPassEncoder) == sizeof(WGPURenderPassEncoder), "sizeof mismatch for RenderPassEncoder");
9712
- static_assert(alignof(RenderPassEncoder) == alignof(WGPURenderPassEncoder), "alignof mismatch for RenderPassEncoder");
9713
-
9714
- // RenderPipeline implementation
9715
-
9716
- BindGroupLayout RenderPipeline::GetBindGroupLayout(uint32_t groupIndex) const {
9717
- auto result = wgpuRenderPipelineGetBindGroupLayout(Get(), groupIndex);
9718
- return BindGroupLayout::Acquire(result);
9719
- }
9720
- void RenderPipeline::SetLabel(StringView label) const {
9721
- wgpuRenderPipelineSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9722
- }
9723
-
9724
-
9725
- void RenderPipeline::WGPUAddRef(WGPURenderPipeline handle) {
9726
- if (handle != nullptr) {
9727
- wgpuRenderPipelineAddRef(handle);
9728
- }
9729
- }
9730
- void RenderPipeline::WGPURelease(WGPURenderPipeline handle) {
9731
- if (handle != nullptr) {
9732
- wgpuRenderPipelineRelease(handle);
9733
- }
9734
- }
9735
- static_assert(sizeof(RenderPipeline) == sizeof(WGPURenderPipeline), "sizeof mismatch for RenderPipeline");
9736
- static_assert(alignof(RenderPipeline) == alignof(WGPURenderPipeline), "alignof mismatch for RenderPipeline");
9737
-
9738
- // Sampler implementation
9739
-
9740
- void Sampler::SetLabel(StringView label) const {
9741
- wgpuSamplerSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9742
- }
9743
-
9744
-
9745
- void Sampler::WGPUAddRef(WGPUSampler handle) {
9746
- if (handle != nullptr) {
9747
- wgpuSamplerAddRef(handle);
9748
- }
9749
- }
9750
- void Sampler::WGPURelease(WGPUSampler handle) {
9751
- if (handle != nullptr) {
9752
- wgpuSamplerRelease(handle);
9753
- }
9655
+ void Sampler::WGPURelease(WGPUSampler handle) {
9656
+ if (handle != nullptr) {
9657
+ wgpuSamplerRelease(handle);
9658
+ }
9754
9659
  }
9755
9660
  static_assert(sizeof(Sampler) == sizeof(WGPUSampler), "sizeof mismatch for Sampler");
9756
9661
  static_assert(alignof(Sampler) == alignof(WGPUSampler), "alignof mismatch for Sampler");
@@ -9876,6 +9781,9 @@ static_assert(alignof(SharedBufferMemory) == alignof(WGPUSharedBufferMemory), "a
9876
9781
  void SharedFence::ExportInfo(SharedFenceExportInfo * info) const {
9877
9782
  wgpuSharedFenceExportInfo(Get(), reinterpret_cast<WGPUSharedFenceExportInfo *>(info));
9878
9783
  }
9784
+ void SharedFence::SetLabel(StringView label) const {
9785
+ wgpuSharedFenceSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
9786
+ }
9879
9787
 
9880
9788
 
9881
9789
  void SharedFence::WGPUAddRef(WGPUSharedFence handle) {
@@ -10027,6 +9935,10 @@ uint32_t Texture::GetSampleCount() const {
10027
9935
  auto result = wgpuTextureGetSampleCount(Get());
10028
9936
  return result;
10029
9937
  }
9938
+ TextureViewDimension Texture::GetTextureBindingViewDimension() const {
9939
+ auto result = wgpuTextureGetTextureBindingViewDimension(Get());
9940
+ return static_cast<TextureViewDimension>(result);
9941
+ }
10030
9942
  TextureUsage Texture::GetUsage() const {
10031
9943
  auto result = wgpuTextureGetUsage(Get());
10032
9944
  return static_cast<TextureUsage>(result);
@@ -10041,6 +9953,9 @@ void Texture::Pin(TextureUsage usage) const {
10041
9953
  void Texture::SetLabel(StringView label) const {
10042
9954
  wgpuTextureSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
10043
9955
  }
9956
+ void Texture::SetOwnershipForMemoryDump(uint64_t ownerGuid) const {
9957
+ wgpuTextureSetOwnershipForMemoryDump(Get(), ownerGuid);
9958
+ }
10044
9959
  void Texture::Unpin() const {
10045
9960
  wgpuTextureUnpin(Get());
10046
9961
  }
@@ -10079,6 +9994,217 @@ void TextureView::WGPURelease(WGPUTextureView handle) {
10079
9994
  static_assert(sizeof(TextureView) == sizeof(WGPUTextureView), "sizeof mismatch for TextureView");
10080
9995
  static_assert(alignof(TextureView) == alignof(WGPUTextureView), "alignof mismatch for TextureView");
10081
9996
 
9997
+ // ComputePassEncoder implementation
9998
+
9999
+ void ComputePassEncoder::DispatchWorkgroups(uint32_t workgroupCountX, uint32_t workgroupCountY, uint32_t workgroupCountZ) const {
10000
+ wgpuComputePassEncoderDispatchWorkgroups(Get(), workgroupCountX, workgroupCountY, workgroupCountZ);
10001
+ }
10002
+ void ComputePassEncoder::DispatchWorkgroupsIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
10003
+ wgpuComputePassEncoderDispatchWorkgroupsIndirect(Get(), indirectBuffer.Get(), indirectOffset);
10004
+ }
10005
+ void ComputePassEncoder::End() const {
10006
+ wgpuComputePassEncoderEnd(Get());
10007
+ }
10008
+ void ComputePassEncoder::InsertDebugMarker(StringView markerLabel) const {
10009
+ wgpuComputePassEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
10010
+ }
10011
+ void ComputePassEncoder::PopDebugGroup() const {
10012
+ wgpuComputePassEncoderPopDebugGroup(Get());
10013
+ }
10014
+ void ComputePassEncoder::PushDebugGroup(StringView groupLabel) const {
10015
+ wgpuComputePassEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
10016
+ }
10017
+ void ComputePassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
10018
+ wgpuComputePassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
10019
+ }
10020
+ void ComputePassEncoder::SetImmediates(uint32_t offset, void const * data, size_t size) const {
10021
+ wgpuComputePassEncoderSetImmediates(Get(), offset, reinterpret_cast<void const *>(data), size);
10022
+ }
10023
+ void ComputePassEncoder::SetLabel(StringView label) const {
10024
+ wgpuComputePassEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
10025
+ }
10026
+ void ComputePassEncoder::SetPipeline(ComputePipeline const& pipeline) const {
10027
+ wgpuComputePassEncoderSetPipeline(Get(), pipeline.Get());
10028
+ }
10029
+ void ComputePassEncoder::SetResourceTable(ResourceTable const& table) const {
10030
+ wgpuComputePassEncoderSetResourceTable(Get(), table.Get());
10031
+ }
10032
+ void ComputePassEncoder::WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const {
10033
+ wgpuComputePassEncoderWriteTimestamp(Get(), querySet.Get(), queryIndex);
10034
+ }
10035
+
10036
+
10037
+ void ComputePassEncoder::WGPUAddRef(WGPUComputePassEncoder handle) {
10038
+ if (handle != nullptr) {
10039
+ wgpuComputePassEncoderAddRef(handle);
10040
+ }
10041
+ }
10042
+ void ComputePassEncoder::WGPURelease(WGPUComputePassEncoder handle) {
10043
+ if (handle != nullptr) {
10044
+ wgpuComputePassEncoderRelease(handle);
10045
+ }
10046
+ }
10047
+ static_assert(sizeof(ComputePassEncoder) == sizeof(WGPUComputePassEncoder), "sizeof mismatch for ComputePassEncoder");
10048
+ static_assert(alignof(ComputePassEncoder) == alignof(WGPUComputePassEncoder), "alignof mismatch for ComputePassEncoder");
10049
+
10050
+ // RenderBundleEncoder implementation
10051
+
10052
+ void RenderBundleEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const {
10053
+ wgpuRenderBundleEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance);
10054
+ }
10055
+ void RenderBundleEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const {
10056
+ wgpuRenderBundleEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance);
10057
+ }
10058
+ void RenderBundleEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
10059
+ wgpuRenderBundleEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset);
10060
+ }
10061
+ void RenderBundleEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
10062
+ wgpuRenderBundleEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset);
10063
+ }
10064
+ RenderBundle RenderBundleEncoder::Finish(RenderBundleDescriptor const * descriptor) const {
10065
+ auto result = wgpuRenderBundleEncoderFinish(Get(), reinterpret_cast<WGPURenderBundleDescriptor const *>(descriptor));
10066
+ return RenderBundle::Acquire(result);
10067
+ }
10068
+ void RenderBundleEncoder::InsertDebugMarker(StringView markerLabel) const {
10069
+ wgpuRenderBundleEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
10070
+ }
10071
+ void RenderBundleEncoder::PopDebugGroup() const {
10072
+ wgpuRenderBundleEncoderPopDebugGroup(Get());
10073
+ }
10074
+ void RenderBundleEncoder::PushDebugGroup(StringView groupLabel) const {
10075
+ wgpuRenderBundleEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
10076
+ }
10077
+ void RenderBundleEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
10078
+ wgpuRenderBundleEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
10079
+ }
10080
+ void RenderBundleEncoder::SetImmediates(uint32_t offset, void const * data, size_t size) const {
10081
+ wgpuRenderBundleEncoderSetImmediates(Get(), offset, reinterpret_cast<void const *>(data), size);
10082
+ }
10083
+ void RenderBundleEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
10084
+ wgpuRenderBundleEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
10085
+ }
10086
+ void RenderBundleEncoder::SetLabel(StringView label) const {
10087
+ wgpuRenderBundleEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
10088
+ }
10089
+ void RenderBundleEncoder::SetPipeline(RenderPipeline const& pipeline) const {
10090
+ wgpuRenderBundleEncoderSetPipeline(Get(), pipeline.Get());
10091
+ }
10092
+ void RenderBundleEncoder::SetResourceTable(ResourceTable const& table) const {
10093
+ wgpuRenderBundleEncoderSetResourceTable(Get(), table.Get());
10094
+ }
10095
+ void RenderBundleEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const {
10096
+ wgpuRenderBundleEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size);
10097
+ }
10098
+
10099
+
10100
+ void RenderBundleEncoder::WGPUAddRef(WGPURenderBundleEncoder handle) {
10101
+ if (handle != nullptr) {
10102
+ wgpuRenderBundleEncoderAddRef(handle);
10103
+ }
10104
+ }
10105
+ void RenderBundleEncoder::WGPURelease(WGPURenderBundleEncoder handle) {
10106
+ if (handle != nullptr) {
10107
+ wgpuRenderBundleEncoderRelease(handle);
10108
+ }
10109
+ }
10110
+ static_assert(sizeof(RenderBundleEncoder) == sizeof(WGPURenderBundleEncoder), "sizeof mismatch for RenderBundleEncoder");
10111
+ static_assert(alignof(RenderBundleEncoder) == alignof(WGPURenderBundleEncoder), "alignof mismatch for RenderBundleEncoder");
10112
+
10113
+ // RenderPassEncoder implementation
10114
+
10115
+ void RenderPassEncoder::BeginOcclusionQuery(uint32_t queryIndex) const {
10116
+ wgpuRenderPassEncoderBeginOcclusionQuery(Get(), queryIndex);
10117
+ }
10118
+ void RenderPassEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const {
10119
+ wgpuRenderPassEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance);
10120
+ }
10121
+ void RenderPassEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const {
10122
+ wgpuRenderPassEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance);
10123
+ }
10124
+ void RenderPassEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
10125
+ wgpuRenderPassEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset);
10126
+ }
10127
+ void RenderPassEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const {
10128
+ wgpuRenderPassEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset);
10129
+ }
10130
+ void RenderPassEncoder::End() const {
10131
+ wgpuRenderPassEncoderEnd(Get());
10132
+ }
10133
+ void RenderPassEncoder::EndOcclusionQuery() const {
10134
+ wgpuRenderPassEncoderEndOcclusionQuery(Get());
10135
+ }
10136
+ void RenderPassEncoder::ExecuteBundles(size_t bundleCount, RenderBundle const * bundles) const {
10137
+ wgpuRenderPassEncoderExecuteBundles(Get(), bundleCount, reinterpret_cast<WGPURenderBundle const *>(bundles));
10138
+ }
10139
+ void RenderPassEncoder::InsertDebugMarker(StringView markerLabel) const {
10140
+ wgpuRenderPassEncoderInsertDebugMarker(Get(), *reinterpret_cast<WGPUStringView const*>(&markerLabel));
10141
+ }
10142
+ void RenderPassEncoder::MultiDrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer, uint64_t drawCountBufferOffset) const {
10143
+ wgpuRenderPassEncoderMultiDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset, maxDrawCount, drawCountBuffer.Get(), drawCountBufferOffset);
10144
+ }
10145
+ void RenderPassEncoder::MultiDrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, Buffer const& drawCountBuffer, uint64_t drawCountBufferOffset) const {
10146
+ wgpuRenderPassEncoderMultiDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset, maxDrawCount, drawCountBuffer.Get(), drawCountBufferOffset);
10147
+ }
10148
+ void RenderPassEncoder::PixelLocalStorageBarrier() const {
10149
+ wgpuRenderPassEncoderPixelLocalStorageBarrier(Get());
10150
+ }
10151
+ void RenderPassEncoder::PopDebugGroup() const {
10152
+ wgpuRenderPassEncoderPopDebugGroup(Get());
10153
+ }
10154
+ void RenderPassEncoder::PushDebugGroup(StringView groupLabel) const {
10155
+ wgpuRenderPassEncoderPushDebugGroup(Get(), *reinterpret_cast<WGPUStringView const*>(&groupLabel));
10156
+ }
10157
+ void RenderPassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
10158
+ wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const *>(dynamicOffsets));
10159
+ }
10160
+ void RenderPassEncoder::SetBlendConstant(Color const * color) const {
10161
+ wgpuRenderPassEncoderSetBlendConstant(Get(), reinterpret_cast<WGPUColor const *>(color));
10162
+ }
10163
+ void RenderPassEncoder::SetImmediates(uint32_t offset, void const * data, size_t size) const {
10164
+ wgpuRenderPassEncoderSetImmediates(Get(), offset, reinterpret_cast<void const *>(data), size);
10165
+ }
10166
+ void RenderPassEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
10167
+ wgpuRenderPassEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
10168
+ }
10169
+ void RenderPassEncoder::SetLabel(StringView label) const {
10170
+ wgpuRenderPassEncoderSetLabel(Get(), *reinterpret_cast<WGPUStringView const*>(&label));
10171
+ }
10172
+ void RenderPassEncoder::SetPipeline(RenderPipeline const& pipeline) const {
10173
+ wgpuRenderPassEncoderSetPipeline(Get(), pipeline.Get());
10174
+ }
10175
+ void RenderPassEncoder::SetResourceTable(ResourceTable const& table) const {
10176
+ wgpuRenderPassEncoderSetResourceTable(Get(), table.Get());
10177
+ }
10178
+ void RenderPassEncoder::SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const {
10179
+ wgpuRenderPassEncoderSetScissorRect(Get(), x, y, width, height);
10180
+ }
10181
+ void RenderPassEncoder::SetStencilReference(uint32_t reference) const {
10182
+ wgpuRenderPassEncoderSetStencilReference(Get(), reference);
10183
+ }
10184
+ void RenderPassEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const {
10185
+ wgpuRenderPassEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size);
10186
+ }
10187
+ void RenderPassEncoder::SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const {
10188
+ wgpuRenderPassEncoderSetViewport(Get(), x, y, width, height, minDepth, maxDepth);
10189
+ }
10190
+ void RenderPassEncoder::WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const {
10191
+ wgpuRenderPassEncoderWriteTimestamp(Get(), querySet.Get(), queryIndex);
10192
+ }
10193
+
10194
+
10195
+ void RenderPassEncoder::WGPUAddRef(WGPURenderPassEncoder handle) {
10196
+ if (handle != nullptr) {
10197
+ wgpuRenderPassEncoderAddRef(handle);
10198
+ }
10199
+ }
10200
+ void RenderPassEncoder::WGPURelease(WGPURenderPassEncoder handle) {
10201
+ if (handle != nullptr) {
10202
+ wgpuRenderPassEncoderRelease(handle);
10203
+ }
10204
+ }
10205
+ static_assert(sizeof(RenderPassEncoder) == sizeof(WGPURenderPassEncoder), "sizeof mismatch for RenderPassEncoder");
10206
+ static_assert(alignof(RenderPassEncoder) == alignof(WGPURenderPassEncoder), "alignof mismatch for RenderPassEncoder");
10207
+
10082
10208
 
10083
10209
 
10084
10210