| --- webgpu_header |
| +++ dawn_header |
| @@ |
| struct WGPUSurfaceTexture; |
| struct WGPUTexelCopyBufferLayout; |
| struct WGPUTextureBindingLayout; |
| -struct WGPUTextureViewDescriptor; |
| +struct WGPUTextureComponentSwizzle; |
| struct WGPUVertexAttribute; |
| struct WGPUBindGroupDescriptor; |
| struct WGPUBindGroupLayoutEntry; |
| @@ |
| struct WGPUSurfaceDescriptor; |
| struct WGPUTexelCopyBufferInfo; |
| struct WGPUTexelCopyTextureInfo; |
| +struct WGPUTextureComponentSwizzleDescriptor; |
| struct WGPUTextureDescriptor; |
| struct WGPUVertexBufferLayout; |
| struct WGPUBindGroupLayoutDescriptor; |
| struct WGPUColorTargetState; |
| struct WGPUComputePipelineDescriptor; |
| struct WGPURenderPassDescriptor; |
| +struct WGPUTextureViewDescriptor; |
| struct WGPUVertexState; |
| struct WGPUFragmentState; |
| struct WGPURenderPipelineDescriptor; |
| @@ |
| WGPUCompilationMessageType_Info = 0x00000003, |
| WGPUCompilationMessageType_Force32 = 0x7FFFFFFF |
| } WGPUCompilationMessageType WGPU_ENUM_ATTRIBUTE; |
| + |
| +typedef enum WGPUComponentSwizzle { |
| + WGPUComponentSwizzle_Undefined = 0x00000000, |
| + WGPUComponentSwizzle_Zero = 0x00000001, |
| + WGPUComponentSwizzle_One = 0x00000002, |
| + WGPUComponentSwizzle_R = 0x00000003, |
| + WGPUComponentSwizzle_G = 0x00000004, |
| + WGPUComponentSwizzle_B = 0x00000005, |
| + WGPUComponentSwizzle_A = 0x00000006, |
| + WGPUComponentSwizzle_Force32 = 0x7FFFFFFF |
| +} WGPUComponentSwizzle WGPU_ENUM_ATTRIBUTE; |
| |
| typedef enum WGPUCompositeAlphaMode { |
| WGPUCompositeAlphaMode_Auto = 0x00000000, |
| @@ |
| WGPUFeatureName_TextureFormatsTier1 = 0x00000013, |
| WGPUFeatureName_TextureFormatsTier2 = 0x00000014, |
| WGPUFeatureName_PrimitiveIndex = 0x00000015, |
| + WGPUFeatureName_TextureComponentSwizzle = 0x00000016, |
| WGPUFeatureName_Force32 = 0x7FFFFFFF |
| } WGPUFeatureName WGPU_ENUM_ATTRIBUTE; |
| |
| @@ |
| WGPUSType_SurfaceSourceXCBWindow = 0x00000009, |
| WGPUSType_SurfaceColorManagement = 0x0000000A, |
| WGPUSType_RequestAdapterWebXROptions = 0x0000000B, |
| + WGPUSType_TextureComponentSwizzleDescriptor = 0x0000000C, |
| WGPUSType_Force32 = 0x7FFFFFFF |
| } WGPUSType WGPU_ENUM_ATTRIBUTE; |
| |
| @@ |
| /*.multisampled=*/WGPU_FALSE _wgpu_COMMA \ |
| }) |
| |
| -typedef struct WGPUTextureViewDescriptor { |
| - WGPUChainedStruct * nextInChain; |
| - WGPUStringView label; |
| - WGPUTextureFormat format; |
| - WGPUTextureViewDimension dimension; |
| - uint32_t baseMipLevel; |
| - uint32_t mipLevelCount; |
| - uint32_t baseArrayLayer; |
| - uint32_t arrayLayerCount; |
| - WGPUTextureAspect aspect; |
| - WGPUTextureUsage usage; |
| -} WGPUTextureViewDescriptor WGPU_STRUCTURE_ATTRIBUTE; |
| - |
| -#define WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureViewDescriptor, { \ |
| - /*.nextInChain=*/NULL _wgpu_COMMA \ |
| - /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ |
| - /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \ |
| - /*.dimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \ |
| - /*.baseMipLevel=*/0 _wgpu_COMMA \ |
| - /*.mipLevelCount=*/WGPU_MIP_LEVEL_COUNT_UNDEFINED _wgpu_COMMA \ |
| - /*.baseArrayLayer=*/0 _wgpu_COMMA \ |
| - /*.arrayLayerCount=*/WGPU_ARRAY_LAYER_COUNT_UNDEFINED _wgpu_COMMA \ |
| - /*.aspect=*/WGPUTextureAspect_Undefined _wgpu_COMMA \ |
| - /*.usage=*/WGPUTextureUsage_None _wgpu_COMMA \ |
| +typedef struct WGPUTextureComponentSwizzle { |
| + WGPUComponentSwizzle r; |
| + WGPUComponentSwizzle g; |
| + WGPUComponentSwizzle b; |
| + WGPUComponentSwizzle a; |
| +} WGPUTextureComponentSwizzle WGPU_STRUCTURE_ATTRIBUTE; |
| + |
| +#define WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureComponentSwizzle, { \ |
| + /*.r=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \ |
| + /*.g=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \ |
| + /*.b=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \ |
| + /*.a=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \ |
| }) |
| |
| typedef struct WGPUVertexAttribute { |
| @@ |
| /*.aspect=*/WGPUTextureAspect_Undefined _wgpu_COMMA \ |
| }) |
| |
| +typedef struct WGPUTextureComponentSwizzleDescriptor { |
| + WGPUChainedStruct chain; |
| + WGPUTextureComponentSwizzle swizzle; |
| +} WGPUTextureComponentSwizzleDescriptor WGPU_STRUCTURE_ATTRIBUTE; |
| + |
| +#define WGPU_TEXTURE_COMPONENT_SWIZZLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureComponentSwizzleDescriptor, { \ |
| + /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \ |
| + /*.next=*/NULL _wgpu_COMMA \ |
| + /*.sType=*/WGPUSType_TextureComponentSwizzleDescriptor _wgpu_COMMA \ |
| + }) _wgpu_COMMA \ |
| + /*.swizzle=*/WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT _wgpu_COMMA \ |
| +}) |
| + |
| typedef struct WGPUTextureDescriptor { |
| WGPUChainedStruct * nextInChain; |
| WGPUStringView label; |
| @@ |
| /*.depthStencilAttachment=*/NULL _wgpu_COMMA \ |
| /*.occlusionQuerySet=*/NULL _wgpu_COMMA \ |
| /*.timestampWrites=*/NULL _wgpu_COMMA \ |
| +}) |
| + |
| +typedef struct WGPUTextureViewDescriptor { |
| + WGPUChainedStruct * nextInChain; |
| + WGPUStringView label; |
| + WGPUTextureFormat format; |
| + WGPUTextureViewDimension dimension; |
| + uint32_t baseMipLevel; |
| + uint32_t mipLevelCount; |
| + uint32_t baseArrayLayer; |
| + uint32_t arrayLayerCount; |
| + WGPUTextureAspect aspect; |
| + WGPUTextureUsage usage; |
| +} WGPUTextureViewDescriptor WGPU_STRUCTURE_ATTRIBUTE; |
| + |
| +#define WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureViewDescriptor, { \ |
| + /*.nextInChain=*/NULL _wgpu_COMMA \ |
| + /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ |
| + /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \ |
| + /*.dimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \ |
| + /*.baseMipLevel=*/0 _wgpu_COMMA \ |
| + /*.mipLevelCount=*/WGPU_MIP_LEVEL_COUNT_UNDEFINED _wgpu_COMMA \ |
| + /*.baseArrayLayer=*/0 _wgpu_COMMA \ |
| + /*.arrayLayerCount=*/WGPU_ARRAY_LAYER_COUNT_UNDEFINED _wgpu_COMMA \ |
| + /*.aspect=*/WGPUTextureAspect_Undefined _wgpu_COMMA \ |
| + /*.usage=*/WGPUTextureUsage_None _wgpu_COMMA \ |
| }) |
| |
| typedef struct WGPUVertexState { |