diff --git a/3rdparty/include/webgpu/include/webgpu_cpp.cpp b/3rdparty/include/webgpu/include/webgpu_cpp.cpp deleted file mode 100644 index fd324184007c..000000000000 --- a/3rdparty/include/webgpu/include/webgpu_cpp.cpp +++ /dev/null @@ -1,1746 +0,0 @@ - -#include "dawn/webgpu_cpp.h" - -namespace wgpu { - - - static_assert(sizeof(AdapterType) == sizeof(WGPUAdapterType), "sizeof mismatch for AdapterType"); - static_assert(alignof(AdapterType) == alignof(WGPUAdapterType), "alignof mismatch for AdapterType"); - - static_assert(static_cast(AdapterType::DiscreteGPU) == WGPUAdapterType_DiscreteGPU, "value mismatch for AdapterType::DiscreteGPU"); - static_assert(static_cast(AdapterType::IntegratedGPU) == WGPUAdapterType_IntegratedGPU, "value mismatch for AdapterType::IntegratedGPU"); - static_assert(static_cast(AdapterType::CPU) == WGPUAdapterType_CPU, "value mismatch for AdapterType::CPU"); - static_assert(static_cast(AdapterType::Unknown) == WGPUAdapterType_Unknown, "value mismatch for AdapterType::Unknown"); - - - static_assert(sizeof(AddressMode) == sizeof(WGPUAddressMode), "sizeof mismatch for AddressMode"); - static_assert(alignof(AddressMode) == alignof(WGPUAddressMode), "alignof mismatch for AddressMode"); - - static_assert(static_cast(AddressMode::Repeat) == WGPUAddressMode_Repeat, "value mismatch for AddressMode::Repeat"); - static_assert(static_cast(AddressMode::MirrorRepeat) == WGPUAddressMode_MirrorRepeat, "value mismatch for AddressMode::MirrorRepeat"); - static_assert(static_cast(AddressMode::ClampToEdge) == WGPUAddressMode_ClampToEdge, "value mismatch for AddressMode::ClampToEdge"); - - - static_assert(sizeof(BackendType) == sizeof(WGPUBackendType), "sizeof mismatch for BackendType"); - static_assert(alignof(BackendType) == alignof(WGPUBackendType), "alignof mismatch for BackendType"); - - static_assert(static_cast(BackendType::Null) == WGPUBackendType_Null, "value mismatch for BackendType::Null"); - static_assert(static_cast(BackendType::D3D11) == WGPUBackendType_D3D11, "value mismatch for BackendType::D3D11"); - static_assert(static_cast(BackendType::D3D12) == WGPUBackendType_D3D12, "value mismatch for BackendType::D3D12"); - static_assert(static_cast(BackendType::Metal) == WGPUBackendType_Metal, "value mismatch for BackendType::Metal"); - static_assert(static_cast(BackendType::Vulkan) == WGPUBackendType_Vulkan, "value mismatch for BackendType::Vulkan"); - static_assert(static_cast(BackendType::OpenGL) == WGPUBackendType_OpenGL, "value mismatch for BackendType::OpenGL"); - static_assert(static_cast(BackendType::OpenGLES) == WGPUBackendType_OpenGLES, "value mismatch for BackendType::OpenGLES"); - - - static_assert(sizeof(BindingType) == sizeof(WGPUBindingType), "sizeof mismatch for BindingType"); - static_assert(alignof(BindingType) == alignof(WGPUBindingType), "alignof mismatch for BindingType"); - - static_assert(static_cast(BindingType::UniformBuffer) == WGPUBindingType_UniformBuffer, "value mismatch for BindingType::UniformBuffer"); - static_assert(static_cast(BindingType::StorageBuffer) == WGPUBindingType_StorageBuffer, "value mismatch for BindingType::StorageBuffer"); - static_assert(static_cast(BindingType::ReadonlyStorageBuffer) == WGPUBindingType_ReadonlyStorageBuffer, "value mismatch for BindingType::ReadonlyStorageBuffer"); - static_assert(static_cast(BindingType::Sampler) == WGPUBindingType_Sampler, "value mismatch for BindingType::Sampler"); - static_assert(static_cast(BindingType::ComparisonSampler) == WGPUBindingType_ComparisonSampler, "value mismatch for BindingType::ComparisonSampler"); - static_assert(static_cast(BindingType::SampledTexture) == WGPUBindingType_SampledTexture, "value mismatch for BindingType::SampledTexture"); - static_assert(static_cast(BindingType::StorageTexture) == WGPUBindingType_StorageTexture, "value mismatch for BindingType::StorageTexture"); - static_assert(static_cast(BindingType::ReadonlyStorageTexture) == WGPUBindingType_ReadonlyStorageTexture, "value mismatch for BindingType::ReadonlyStorageTexture"); - static_assert(static_cast(BindingType::WriteonlyStorageTexture) == WGPUBindingType_WriteonlyStorageTexture, "value mismatch for BindingType::WriteonlyStorageTexture"); - - - static_assert(sizeof(BlendFactor) == sizeof(WGPUBlendFactor), "sizeof mismatch for BlendFactor"); - static_assert(alignof(BlendFactor) == alignof(WGPUBlendFactor), "alignof mismatch for BlendFactor"); - - static_assert(static_cast(BlendFactor::Zero) == WGPUBlendFactor_Zero, "value mismatch for BlendFactor::Zero"); - static_assert(static_cast(BlendFactor::One) == WGPUBlendFactor_One, "value mismatch for BlendFactor::One"); - static_assert(static_cast(BlendFactor::SrcColor) == WGPUBlendFactor_SrcColor, "value mismatch for BlendFactor::SrcColor"); - static_assert(static_cast(BlendFactor::OneMinusSrcColor) == WGPUBlendFactor_OneMinusSrcColor, "value mismatch for BlendFactor::OneMinusSrcColor"); - static_assert(static_cast(BlendFactor::SrcAlpha) == WGPUBlendFactor_SrcAlpha, "value mismatch for BlendFactor::SrcAlpha"); - static_assert(static_cast(BlendFactor::OneMinusSrcAlpha) == WGPUBlendFactor_OneMinusSrcAlpha, "value mismatch for BlendFactor::OneMinusSrcAlpha"); - static_assert(static_cast(BlendFactor::DstColor) == WGPUBlendFactor_DstColor, "value mismatch for BlendFactor::DstColor"); - static_assert(static_cast(BlendFactor::OneMinusDstColor) == WGPUBlendFactor_OneMinusDstColor, "value mismatch for BlendFactor::OneMinusDstColor"); - static_assert(static_cast(BlendFactor::DstAlpha) == WGPUBlendFactor_DstAlpha, "value mismatch for BlendFactor::DstAlpha"); - static_assert(static_cast(BlendFactor::OneMinusDstAlpha) == WGPUBlendFactor_OneMinusDstAlpha, "value mismatch for BlendFactor::OneMinusDstAlpha"); - static_assert(static_cast(BlendFactor::SrcAlphaSaturated) == WGPUBlendFactor_SrcAlphaSaturated, "value mismatch for BlendFactor::SrcAlphaSaturated"); - static_assert(static_cast(BlendFactor::BlendColor) == WGPUBlendFactor_BlendColor, "value mismatch for BlendFactor::BlendColor"); - static_assert(static_cast(BlendFactor::OneMinusBlendColor) == WGPUBlendFactor_OneMinusBlendColor, "value mismatch for BlendFactor::OneMinusBlendColor"); - - - static_assert(sizeof(BlendOperation) == sizeof(WGPUBlendOperation), "sizeof mismatch for BlendOperation"); - static_assert(alignof(BlendOperation) == alignof(WGPUBlendOperation), "alignof mismatch for BlendOperation"); - - static_assert(static_cast(BlendOperation::Add) == WGPUBlendOperation_Add, "value mismatch for BlendOperation::Add"); - static_assert(static_cast(BlendOperation::Subtract) == WGPUBlendOperation_Subtract, "value mismatch for BlendOperation::Subtract"); - static_assert(static_cast(BlendOperation::ReverseSubtract) == WGPUBlendOperation_ReverseSubtract, "value mismatch for BlendOperation::ReverseSubtract"); - static_assert(static_cast(BlendOperation::Min) == WGPUBlendOperation_Min, "value mismatch for BlendOperation::Min"); - static_assert(static_cast(BlendOperation::Max) == WGPUBlendOperation_Max, "value mismatch for BlendOperation::Max"); - - - static_assert(sizeof(BufferMapAsyncStatus) == sizeof(WGPUBufferMapAsyncStatus), "sizeof mismatch for BufferMapAsyncStatus"); - static_assert(alignof(BufferMapAsyncStatus) == alignof(WGPUBufferMapAsyncStatus), "alignof mismatch for BufferMapAsyncStatus"); - - static_assert(static_cast(BufferMapAsyncStatus::Success) == WGPUBufferMapAsyncStatus_Success, "value mismatch for BufferMapAsyncStatus::Success"); - static_assert(static_cast(BufferMapAsyncStatus::Error) == WGPUBufferMapAsyncStatus_Error, "value mismatch for BufferMapAsyncStatus::Error"); - static_assert(static_cast(BufferMapAsyncStatus::Unknown) == WGPUBufferMapAsyncStatus_Unknown, "value mismatch for BufferMapAsyncStatus::Unknown"); - static_assert(static_cast(BufferMapAsyncStatus::DeviceLost) == WGPUBufferMapAsyncStatus_DeviceLost, "value mismatch for BufferMapAsyncStatus::DeviceLost"); - - - static_assert(sizeof(CompareFunction) == sizeof(WGPUCompareFunction), "sizeof mismatch for CompareFunction"); - static_assert(alignof(CompareFunction) == alignof(WGPUCompareFunction), "alignof mismatch for CompareFunction"); - - static_assert(static_cast(CompareFunction::Undefined) == WGPUCompareFunction_Undefined, "value mismatch for CompareFunction::Undefined"); - static_assert(static_cast(CompareFunction::Never) == WGPUCompareFunction_Never, "value mismatch for CompareFunction::Never"); - static_assert(static_cast(CompareFunction::Less) == WGPUCompareFunction_Less, "value mismatch for CompareFunction::Less"); - static_assert(static_cast(CompareFunction::LessEqual) == WGPUCompareFunction_LessEqual, "value mismatch for CompareFunction::LessEqual"); - static_assert(static_cast(CompareFunction::Greater) == WGPUCompareFunction_Greater, "value mismatch for CompareFunction::Greater"); - static_assert(static_cast(CompareFunction::GreaterEqual) == WGPUCompareFunction_GreaterEqual, "value mismatch for CompareFunction::GreaterEqual"); - static_assert(static_cast(CompareFunction::Equal) == WGPUCompareFunction_Equal, "value mismatch for CompareFunction::Equal"); - static_assert(static_cast(CompareFunction::NotEqual) == WGPUCompareFunction_NotEqual, "value mismatch for CompareFunction::NotEqual"); - static_assert(static_cast(CompareFunction::Always) == WGPUCompareFunction_Always, "value mismatch for CompareFunction::Always"); - - - static_assert(sizeof(CullMode) == sizeof(WGPUCullMode), "sizeof mismatch for CullMode"); - static_assert(alignof(CullMode) == alignof(WGPUCullMode), "alignof mismatch for CullMode"); - - static_assert(static_cast(CullMode::None) == WGPUCullMode_None, "value mismatch for CullMode::None"); - static_assert(static_cast(CullMode::Front) == WGPUCullMode_Front, "value mismatch for CullMode::Front"); - static_assert(static_cast(CullMode::Back) == WGPUCullMode_Back, "value mismatch for CullMode::Back"); - - - static_assert(sizeof(ErrorFilter) == sizeof(WGPUErrorFilter), "sizeof mismatch for ErrorFilter"); - static_assert(alignof(ErrorFilter) == alignof(WGPUErrorFilter), "alignof mismatch for ErrorFilter"); - - static_assert(static_cast(ErrorFilter::None) == WGPUErrorFilter_None, "value mismatch for ErrorFilter::None"); - static_assert(static_cast(ErrorFilter::Validation) == WGPUErrorFilter_Validation, "value mismatch for ErrorFilter::Validation"); - static_assert(static_cast(ErrorFilter::OutOfMemory) == WGPUErrorFilter_OutOfMemory, "value mismatch for ErrorFilter::OutOfMemory"); - - - static_assert(sizeof(ErrorType) == sizeof(WGPUErrorType), "sizeof mismatch for ErrorType"); - static_assert(alignof(ErrorType) == alignof(WGPUErrorType), "alignof mismatch for ErrorType"); - - static_assert(static_cast(ErrorType::NoError) == WGPUErrorType_NoError, "value mismatch for ErrorType::NoError"); - static_assert(static_cast(ErrorType::Validation) == WGPUErrorType_Validation, "value mismatch for ErrorType::Validation"); - static_assert(static_cast(ErrorType::OutOfMemory) == WGPUErrorType_OutOfMemory, "value mismatch for ErrorType::OutOfMemory"); - static_assert(static_cast(ErrorType::Unknown) == WGPUErrorType_Unknown, "value mismatch for ErrorType::Unknown"); - static_assert(static_cast(ErrorType::DeviceLost) == WGPUErrorType_DeviceLost, "value mismatch for ErrorType::DeviceLost"); - - - static_assert(sizeof(FenceCompletionStatus) == sizeof(WGPUFenceCompletionStatus), "sizeof mismatch for FenceCompletionStatus"); - static_assert(alignof(FenceCompletionStatus) == alignof(WGPUFenceCompletionStatus), "alignof mismatch for FenceCompletionStatus"); - - static_assert(static_cast(FenceCompletionStatus::Success) == WGPUFenceCompletionStatus_Success, "value mismatch for FenceCompletionStatus::Success"); - static_assert(static_cast(FenceCompletionStatus::Error) == WGPUFenceCompletionStatus_Error, "value mismatch for FenceCompletionStatus::Error"); - static_assert(static_cast(FenceCompletionStatus::Unknown) == WGPUFenceCompletionStatus_Unknown, "value mismatch for FenceCompletionStatus::Unknown"); - static_assert(static_cast(FenceCompletionStatus::DeviceLost) == WGPUFenceCompletionStatus_DeviceLost, "value mismatch for FenceCompletionStatus::DeviceLost"); - - - static_assert(sizeof(FilterMode) == sizeof(WGPUFilterMode), "sizeof mismatch for FilterMode"); - static_assert(alignof(FilterMode) == alignof(WGPUFilterMode), "alignof mismatch for FilterMode"); - - static_assert(static_cast(FilterMode::Nearest) == WGPUFilterMode_Nearest, "value mismatch for FilterMode::Nearest"); - static_assert(static_cast(FilterMode::Linear) == WGPUFilterMode_Linear, "value mismatch for FilterMode::Linear"); - - - static_assert(sizeof(FrontFace) == sizeof(WGPUFrontFace), "sizeof mismatch for FrontFace"); - static_assert(alignof(FrontFace) == alignof(WGPUFrontFace), "alignof mismatch for FrontFace"); - - static_assert(static_cast(FrontFace::CCW) == WGPUFrontFace_CCW, "value mismatch for FrontFace::CCW"); - static_assert(static_cast(FrontFace::CW) == WGPUFrontFace_CW, "value mismatch for FrontFace::CW"); - - - static_assert(sizeof(IndexFormat) == sizeof(WGPUIndexFormat), "sizeof mismatch for IndexFormat"); - static_assert(alignof(IndexFormat) == alignof(WGPUIndexFormat), "alignof mismatch for IndexFormat"); - - static_assert(static_cast(IndexFormat::Uint16) == WGPUIndexFormat_Uint16, "value mismatch for IndexFormat::Uint16"); - static_assert(static_cast(IndexFormat::Uint32) == WGPUIndexFormat_Uint32, "value mismatch for IndexFormat::Uint32"); - - - static_assert(sizeof(InputStepMode) == sizeof(WGPUInputStepMode), "sizeof mismatch for InputStepMode"); - static_assert(alignof(InputStepMode) == alignof(WGPUInputStepMode), "alignof mismatch for InputStepMode"); - - static_assert(static_cast(InputStepMode::Vertex) == WGPUInputStepMode_Vertex, "value mismatch for InputStepMode::Vertex"); - static_assert(static_cast(InputStepMode::Instance) == WGPUInputStepMode_Instance, "value mismatch for InputStepMode::Instance"); - - - static_assert(sizeof(LoadOp) == sizeof(WGPULoadOp), "sizeof mismatch for LoadOp"); - static_assert(alignof(LoadOp) == alignof(WGPULoadOp), "alignof mismatch for LoadOp"); - - static_assert(static_cast(LoadOp::Clear) == WGPULoadOp_Clear, "value mismatch for LoadOp::Clear"); - static_assert(static_cast(LoadOp::Load) == WGPULoadOp_Load, "value mismatch for LoadOp::Load"); - - - static_assert(sizeof(PresentMode) == sizeof(WGPUPresentMode), "sizeof mismatch for PresentMode"); - static_assert(alignof(PresentMode) == alignof(WGPUPresentMode), "alignof mismatch for PresentMode"); - - static_assert(static_cast(PresentMode::Immediate) == WGPUPresentMode_Immediate, "value mismatch for PresentMode::Immediate"); - static_assert(static_cast(PresentMode::Mailbox) == WGPUPresentMode_Mailbox, "value mismatch for PresentMode::Mailbox"); - static_assert(static_cast(PresentMode::Fifo) == WGPUPresentMode_Fifo, "value mismatch for PresentMode::Fifo"); - - - static_assert(sizeof(PrimitiveTopology) == sizeof(WGPUPrimitiveTopology), "sizeof mismatch for PrimitiveTopology"); - static_assert(alignof(PrimitiveTopology) == alignof(WGPUPrimitiveTopology), "alignof mismatch for PrimitiveTopology"); - - static_assert(static_cast(PrimitiveTopology::PointList) == WGPUPrimitiveTopology_PointList, "value mismatch for PrimitiveTopology::PointList"); - static_assert(static_cast(PrimitiveTopology::LineList) == WGPUPrimitiveTopology_LineList, "value mismatch for PrimitiveTopology::LineList"); - static_assert(static_cast(PrimitiveTopology::LineStrip) == WGPUPrimitiveTopology_LineStrip, "value mismatch for PrimitiveTopology::LineStrip"); - static_assert(static_cast(PrimitiveTopology::TriangleList) == WGPUPrimitiveTopology_TriangleList, "value mismatch for PrimitiveTopology::TriangleList"); - static_assert(static_cast(PrimitiveTopology::TriangleStrip) == WGPUPrimitiveTopology_TriangleStrip, "value mismatch for PrimitiveTopology::TriangleStrip"); - - - static_assert(sizeof(SType) == sizeof(WGPUSType), "sizeof mismatch for SType"); - static_assert(alignof(SType) == alignof(WGPUSType), "alignof mismatch for SType"); - - static_assert(static_cast(SType::Invalid) == WGPUSType_Invalid, "value mismatch for SType::Invalid"); - static_assert(static_cast(SType::SurfaceDescriptorFromMetalLayer) == WGPUSType_SurfaceDescriptorFromMetalLayer, "value mismatch for SType::SurfaceDescriptorFromMetalLayer"); - static_assert(static_cast(SType::SurfaceDescriptorFromWindowsHWND) == WGPUSType_SurfaceDescriptorFromWindowsHWND, "value mismatch for SType::SurfaceDescriptorFromWindowsHWND"); - static_assert(static_cast(SType::SurfaceDescriptorFromXlib) == WGPUSType_SurfaceDescriptorFromXlib, "value mismatch for SType::SurfaceDescriptorFromXlib"); - static_assert(static_cast(SType::SurfaceDescriptorFromHTMLCanvasId) == WGPUSType_SurfaceDescriptorFromHTMLCanvasId, "value mismatch for SType::SurfaceDescriptorFromHTMLCanvasId"); - static_assert(static_cast(SType::ShaderModuleSPIRVDescriptor) == WGPUSType_ShaderModuleSPIRVDescriptor, "value mismatch for SType::ShaderModuleSPIRVDescriptor"); - static_assert(static_cast(SType::ShaderModuleWGSLDescriptor) == WGPUSType_ShaderModuleWGSLDescriptor, "value mismatch for SType::ShaderModuleWGSLDescriptor"); - static_assert(static_cast(SType::SamplerDescriptorDummyAnisotropicFiltering) == WGPUSType_SamplerDescriptorDummyAnisotropicFiltering, "value mismatch for SType::SamplerDescriptorDummyAnisotropicFiltering"); - static_assert(static_cast(SType::RenderPipelineDescriptorDummyExtension) == WGPUSType_RenderPipelineDescriptorDummyExtension, "value mismatch for SType::RenderPipelineDescriptorDummyExtension"); - - - static_assert(sizeof(StencilOperation) == sizeof(WGPUStencilOperation), "sizeof mismatch for StencilOperation"); - static_assert(alignof(StencilOperation) == alignof(WGPUStencilOperation), "alignof mismatch for StencilOperation"); - - static_assert(static_cast(StencilOperation::Keep) == WGPUStencilOperation_Keep, "value mismatch for StencilOperation::Keep"); - static_assert(static_cast(StencilOperation::Zero) == WGPUStencilOperation_Zero, "value mismatch for StencilOperation::Zero"); - static_assert(static_cast(StencilOperation::Replace) == WGPUStencilOperation_Replace, "value mismatch for StencilOperation::Replace"); - static_assert(static_cast(StencilOperation::Invert) == WGPUStencilOperation_Invert, "value mismatch for StencilOperation::Invert"); - static_assert(static_cast(StencilOperation::IncrementClamp) == WGPUStencilOperation_IncrementClamp, "value mismatch for StencilOperation::IncrementClamp"); - static_assert(static_cast(StencilOperation::DecrementClamp) == WGPUStencilOperation_DecrementClamp, "value mismatch for StencilOperation::DecrementClamp"); - static_assert(static_cast(StencilOperation::IncrementWrap) == WGPUStencilOperation_IncrementWrap, "value mismatch for StencilOperation::IncrementWrap"); - static_assert(static_cast(StencilOperation::DecrementWrap) == WGPUStencilOperation_DecrementWrap, "value mismatch for StencilOperation::DecrementWrap"); - - - static_assert(sizeof(StoreOp) == sizeof(WGPUStoreOp), "sizeof mismatch for StoreOp"); - static_assert(alignof(StoreOp) == alignof(WGPUStoreOp), "alignof mismatch for StoreOp"); - - static_assert(static_cast(StoreOp::Store) == WGPUStoreOp_Store, "value mismatch for StoreOp::Store"); - static_assert(static_cast(StoreOp::Clear) == WGPUStoreOp_Clear, "value mismatch for StoreOp::Clear"); - - - static_assert(sizeof(TextureAspect) == sizeof(WGPUTextureAspect), "sizeof mismatch for TextureAspect"); - static_assert(alignof(TextureAspect) == alignof(WGPUTextureAspect), "alignof mismatch for TextureAspect"); - - static_assert(static_cast(TextureAspect::All) == WGPUTextureAspect_All, "value mismatch for TextureAspect::All"); - static_assert(static_cast(TextureAspect::StencilOnly) == WGPUTextureAspect_StencilOnly, "value mismatch for TextureAspect::StencilOnly"); - static_assert(static_cast(TextureAspect::DepthOnly) == WGPUTextureAspect_DepthOnly, "value mismatch for TextureAspect::DepthOnly"); - - - static_assert(sizeof(TextureComponentType) == sizeof(WGPUTextureComponentType), "sizeof mismatch for TextureComponentType"); - static_assert(alignof(TextureComponentType) == alignof(WGPUTextureComponentType), "alignof mismatch for TextureComponentType"); - - static_assert(static_cast(TextureComponentType::Float) == WGPUTextureComponentType_Float, "value mismatch for TextureComponentType::Float"); - static_assert(static_cast(TextureComponentType::Sint) == WGPUTextureComponentType_Sint, "value mismatch for TextureComponentType::Sint"); - static_assert(static_cast(TextureComponentType::Uint) == WGPUTextureComponentType_Uint, "value mismatch for TextureComponentType::Uint"); - - - static_assert(sizeof(TextureDimension) == sizeof(WGPUTextureDimension), "sizeof mismatch for TextureDimension"); - static_assert(alignof(TextureDimension) == alignof(WGPUTextureDimension), "alignof mismatch for TextureDimension"); - - static_assert(static_cast(TextureDimension::e1D) == WGPUTextureDimension_1D, "value mismatch for TextureDimension::e1D"); - static_assert(static_cast(TextureDimension::e2D) == WGPUTextureDimension_2D, "value mismatch for TextureDimension::e2D"); - static_assert(static_cast(TextureDimension::e3D) == WGPUTextureDimension_3D, "value mismatch for TextureDimension::e3D"); - - - static_assert(sizeof(TextureFormat) == sizeof(WGPUTextureFormat), "sizeof mismatch for TextureFormat"); - static_assert(alignof(TextureFormat) == alignof(WGPUTextureFormat), "alignof mismatch for TextureFormat"); - - static_assert(static_cast(TextureFormat::Undefined) == WGPUTextureFormat_Undefined, "value mismatch for TextureFormat::Undefined"); - static_assert(static_cast(TextureFormat::R8Unorm) == WGPUTextureFormat_R8Unorm, "value mismatch for TextureFormat::R8Unorm"); - static_assert(static_cast(TextureFormat::R8Snorm) == WGPUTextureFormat_R8Snorm, "value mismatch for TextureFormat::R8Snorm"); - static_assert(static_cast(TextureFormat::R8Uint) == WGPUTextureFormat_R8Uint, "value mismatch for TextureFormat::R8Uint"); - static_assert(static_cast(TextureFormat::R8Sint) == WGPUTextureFormat_R8Sint, "value mismatch for TextureFormat::R8Sint"); - static_assert(static_cast(TextureFormat::R16Uint) == WGPUTextureFormat_R16Uint, "value mismatch for TextureFormat::R16Uint"); - static_assert(static_cast(TextureFormat::R16Sint) == WGPUTextureFormat_R16Sint, "value mismatch for TextureFormat::R16Sint"); - static_assert(static_cast(TextureFormat::R16Float) == WGPUTextureFormat_R16Float, "value mismatch for TextureFormat::R16Float"); - static_assert(static_cast(TextureFormat::RG8Unorm) == WGPUTextureFormat_RG8Unorm, "value mismatch for TextureFormat::RG8Unorm"); - static_assert(static_cast(TextureFormat::RG8Snorm) == WGPUTextureFormat_RG8Snorm, "value mismatch for TextureFormat::RG8Snorm"); - static_assert(static_cast(TextureFormat::RG8Uint) == WGPUTextureFormat_RG8Uint, "value mismatch for TextureFormat::RG8Uint"); - static_assert(static_cast(TextureFormat::RG8Sint) == WGPUTextureFormat_RG8Sint, "value mismatch for TextureFormat::RG8Sint"); - static_assert(static_cast(TextureFormat::R32Float) == WGPUTextureFormat_R32Float, "value mismatch for TextureFormat::R32Float"); - static_assert(static_cast(TextureFormat::R32Uint) == WGPUTextureFormat_R32Uint, "value mismatch for TextureFormat::R32Uint"); - static_assert(static_cast(TextureFormat::R32Sint) == WGPUTextureFormat_R32Sint, "value mismatch for TextureFormat::R32Sint"); - static_assert(static_cast(TextureFormat::RG16Uint) == WGPUTextureFormat_RG16Uint, "value mismatch for TextureFormat::RG16Uint"); - static_assert(static_cast(TextureFormat::RG16Sint) == WGPUTextureFormat_RG16Sint, "value mismatch for TextureFormat::RG16Sint"); - static_assert(static_cast(TextureFormat::RG16Float) == WGPUTextureFormat_RG16Float, "value mismatch for TextureFormat::RG16Float"); - static_assert(static_cast(TextureFormat::RGBA8Unorm) == WGPUTextureFormat_RGBA8Unorm, "value mismatch for TextureFormat::RGBA8Unorm"); - static_assert(static_cast(TextureFormat::RGBA8UnormSrgb) == WGPUTextureFormat_RGBA8UnormSrgb, "value mismatch for TextureFormat::RGBA8UnormSrgb"); - static_assert(static_cast(TextureFormat::RGBA8Snorm) == WGPUTextureFormat_RGBA8Snorm, "value mismatch for TextureFormat::RGBA8Snorm"); - static_assert(static_cast(TextureFormat::RGBA8Uint) == WGPUTextureFormat_RGBA8Uint, "value mismatch for TextureFormat::RGBA8Uint"); - static_assert(static_cast(TextureFormat::RGBA8Sint) == WGPUTextureFormat_RGBA8Sint, "value mismatch for TextureFormat::RGBA8Sint"); - static_assert(static_cast(TextureFormat::BGRA8Unorm) == WGPUTextureFormat_BGRA8Unorm, "value mismatch for TextureFormat::BGRA8Unorm"); - static_assert(static_cast(TextureFormat::BGRA8UnormSrgb) == WGPUTextureFormat_BGRA8UnormSrgb, "value mismatch for TextureFormat::BGRA8UnormSrgb"); - static_assert(static_cast(TextureFormat::RGB10A2Unorm) == WGPUTextureFormat_RGB10A2Unorm, "value mismatch for TextureFormat::RGB10A2Unorm"); - static_assert(static_cast(TextureFormat::RG11B10Float) == WGPUTextureFormat_RG11B10Float, "value mismatch for TextureFormat::RG11B10Float"); - static_assert(static_cast(TextureFormat::RG32Float) == WGPUTextureFormat_RG32Float, "value mismatch for TextureFormat::RG32Float"); - static_assert(static_cast(TextureFormat::RG32Uint) == WGPUTextureFormat_RG32Uint, "value mismatch for TextureFormat::RG32Uint"); - static_assert(static_cast(TextureFormat::RG32Sint) == WGPUTextureFormat_RG32Sint, "value mismatch for TextureFormat::RG32Sint"); - static_assert(static_cast(TextureFormat::RGBA16Uint) == WGPUTextureFormat_RGBA16Uint, "value mismatch for TextureFormat::RGBA16Uint"); - static_assert(static_cast(TextureFormat::RGBA16Sint) == WGPUTextureFormat_RGBA16Sint, "value mismatch for TextureFormat::RGBA16Sint"); - static_assert(static_cast(TextureFormat::RGBA16Float) == WGPUTextureFormat_RGBA16Float, "value mismatch for TextureFormat::RGBA16Float"); - static_assert(static_cast(TextureFormat::RGBA32Float) == WGPUTextureFormat_RGBA32Float, "value mismatch for TextureFormat::RGBA32Float"); - static_assert(static_cast(TextureFormat::RGBA32Uint) == WGPUTextureFormat_RGBA32Uint, "value mismatch for TextureFormat::RGBA32Uint"); - static_assert(static_cast(TextureFormat::RGBA32Sint) == WGPUTextureFormat_RGBA32Sint, "value mismatch for TextureFormat::RGBA32Sint"); - static_assert(static_cast(TextureFormat::Depth32Float) == WGPUTextureFormat_Depth32Float, "value mismatch for TextureFormat::Depth32Float"); - static_assert(static_cast(TextureFormat::Depth24Plus) == WGPUTextureFormat_Depth24Plus, "value mismatch for TextureFormat::Depth24Plus"); - static_assert(static_cast(TextureFormat::Depth24PlusStencil8) == WGPUTextureFormat_Depth24PlusStencil8, "value mismatch for TextureFormat::Depth24PlusStencil8"); - static_assert(static_cast(TextureFormat::BC1RGBAUnorm) == WGPUTextureFormat_BC1RGBAUnorm, "value mismatch for TextureFormat::BC1RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC1RGBAUnormSrgb) == WGPUTextureFormat_BC1RGBAUnormSrgb, "value mismatch for TextureFormat::BC1RGBAUnormSrgb"); - static_assert(static_cast(TextureFormat::BC2RGBAUnorm) == WGPUTextureFormat_BC2RGBAUnorm, "value mismatch for TextureFormat::BC2RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC2RGBAUnormSrgb) == WGPUTextureFormat_BC2RGBAUnormSrgb, "value mismatch for TextureFormat::BC2RGBAUnormSrgb"); - static_assert(static_cast(TextureFormat::BC3RGBAUnorm) == WGPUTextureFormat_BC3RGBAUnorm, "value mismatch for TextureFormat::BC3RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC3RGBAUnormSrgb) == WGPUTextureFormat_BC3RGBAUnormSrgb, "value mismatch for TextureFormat::BC3RGBAUnormSrgb"); - static_assert(static_cast(TextureFormat::BC4RUnorm) == WGPUTextureFormat_BC4RUnorm, "value mismatch for TextureFormat::BC4RUnorm"); - static_assert(static_cast(TextureFormat::BC4RSnorm) == WGPUTextureFormat_BC4RSnorm, "value mismatch for TextureFormat::BC4RSnorm"); - static_assert(static_cast(TextureFormat::BC5RGUnorm) == WGPUTextureFormat_BC5RGUnorm, "value mismatch for TextureFormat::BC5RGUnorm"); - static_assert(static_cast(TextureFormat::BC5RGSnorm) == WGPUTextureFormat_BC5RGSnorm, "value mismatch for TextureFormat::BC5RGSnorm"); - static_assert(static_cast(TextureFormat::BC6HRGBUfloat) == WGPUTextureFormat_BC6HRGBUfloat, "value mismatch for TextureFormat::BC6HRGBUfloat"); - static_assert(static_cast(TextureFormat::BC6HRGBSfloat) == WGPUTextureFormat_BC6HRGBSfloat, "value mismatch for TextureFormat::BC6HRGBSfloat"); - static_assert(static_cast(TextureFormat::BC7RGBAUnorm) == WGPUTextureFormat_BC7RGBAUnorm, "value mismatch for TextureFormat::BC7RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC7RGBAUnormSrgb) == WGPUTextureFormat_BC7RGBAUnormSrgb, "value mismatch for TextureFormat::BC7RGBAUnormSrgb"); - - - static_assert(sizeof(TextureViewDimension) == sizeof(WGPUTextureViewDimension), "sizeof mismatch for TextureViewDimension"); - static_assert(alignof(TextureViewDimension) == alignof(WGPUTextureViewDimension), "alignof mismatch for TextureViewDimension"); - - static_assert(static_cast(TextureViewDimension::Undefined) == WGPUTextureViewDimension_Undefined, "value mismatch for TextureViewDimension::Undefined"); - static_assert(static_cast(TextureViewDimension::e1D) == WGPUTextureViewDimension_1D, "value mismatch for TextureViewDimension::e1D"); - static_assert(static_cast(TextureViewDimension::e2D) == WGPUTextureViewDimension_2D, "value mismatch for TextureViewDimension::e2D"); - static_assert(static_cast(TextureViewDimension::e2DArray) == WGPUTextureViewDimension_2DArray, "value mismatch for TextureViewDimension::e2DArray"); - static_assert(static_cast(TextureViewDimension::Cube) == WGPUTextureViewDimension_Cube, "value mismatch for TextureViewDimension::Cube"); - static_assert(static_cast(TextureViewDimension::CubeArray) == WGPUTextureViewDimension_CubeArray, "value mismatch for TextureViewDimension::CubeArray"); - static_assert(static_cast(TextureViewDimension::e3D) == WGPUTextureViewDimension_3D, "value mismatch for TextureViewDimension::e3D"); - - - static_assert(sizeof(VertexFormat) == sizeof(WGPUVertexFormat), "sizeof mismatch for VertexFormat"); - static_assert(alignof(VertexFormat) == alignof(WGPUVertexFormat), "alignof mismatch for VertexFormat"); - - static_assert(static_cast(VertexFormat::UChar2) == WGPUVertexFormat_UChar2, "value mismatch for VertexFormat::UChar2"); - static_assert(static_cast(VertexFormat::UChar4) == WGPUVertexFormat_UChar4, "value mismatch for VertexFormat::UChar4"); - static_assert(static_cast(VertexFormat::Char2) == WGPUVertexFormat_Char2, "value mismatch for VertexFormat::Char2"); - static_assert(static_cast(VertexFormat::Char4) == WGPUVertexFormat_Char4, "value mismatch for VertexFormat::Char4"); - static_assert(static_cast(VertexFormat::UChar2Norm) == WGPUVertexFormat_UChar2Norm, "value mismatch for VertexFormat::UChar2Norm"); - static_assert(static_cast(VertexFormat::UChar4Norm) == WGPUVertexFormat_UChar4Norm, "value mismatch for VertexFormat::UChar4Norm"); - static_assert(static_cast(VertexFormat::Char2Norm) == WGPUVertexFormat_Char2Norm, "value mismatch for VertexFormat::Char2Norm"); - static_assert(static_cast(VertexFormat::Char4Norm) == WGPUVertexFormat_Char4Norm, "value mismatch for VertexFormat::Char4Norm"); - static_assert(static_cast(VertexFormat::UShort2) == WGPUVertexFormat_UShort2, "value mismatch for VertexFormat::UShort2"); - static_assert(static_cast(VertexFormat::UShort4) == WGPUVertexFormat_UShort4, "value mismatch for VertexFormat::UShort4"); - static_assert(static_cast(VertexFormat::Short2) == WGPUVertexFormat_Short2, "value mismatch for VertexFormat::Short2"); - static_assert(static_cast(VertexFormat::Short4) == WGPUVertexFormat_Short4, "value mismatch for VertexFormat::Short4"); - static_assert(static_cast(VertexFormat::UShort2Norm) == WGPUVertexFormat_UShort2Norm, "value mismatch for VertexFormat::UShort2Norm"); - static_assert(static_cast(VertexFormat::UShort4Norm) == WGPUVertexFormat_UShort4Norm, "value mismatch for VertexFormat::UShort4Norm"); - static_assert(static_cast(VertexFormat::Short2Norm) == WGPUVertexFormat_Short2Norm, "value mismatch for VertexFormat::Short2Norm"); - static_assert(static_cast(VertexFormat::Short4Norm) == WGPUVertexFormat_Short4Norm, "value mismatch for VertexFormat::Short4Norm"); - static_assert(static_cast(VertexFormat::Half2) == WGPUVertexFormat_Half2, "value mismatch for VertexFormat::Half2"); - static_assert(static_cast(VertexFormat::Half4) == WGPUVertexFormat_Half4, "value mismatch for VertexFormat::Half4"); - static_assert(static_cast(VertexFormat::Float) == WGPUVertexFormat_Float, "value mismatch for VertexFormat::Float"); - static_assert(static_cast(VertexFormat::Float2) == WGPUVertexFormat_Float2, "value mismatch for VertexFormat::Float2"); - static_assert(static_cast(VertexFormat::Float3) == WGPUVertexFormat_Float3, "value mismatch for VertexFormat::Float3"); - static_assert(static_cast(VertexFormat::Float4) == WGPUVertexFormat_Float4, "value mismatch for VertexFormat::Float4"); - static_assert(static_cast(VertexFormat::UInt) == WGPUVertexFormat_UInt, "value mismatch for VertexFormat::UInt"); - static_assert(static_cast(VertexFormat::UInt2) == WGPUVertexFormat_UInt2, "value mismatch for VertexFormat::UInt2"); - static_assert(static_cast(VertexFormat::UInt3) == WGPUVertexFormat_UInt3, "value mismatch for VertexFormat::UInt3"); - static_assert(static_cast(VertexFormat::UInt4) == WGPUVertexFormat_UInt4, "value mismatch for VertexFormat::UInt4"); - static_assert(static_cast(VertexFormat::Int) == WGPUVertexFormat_Int, "value mismatch for VertexFormat::Int"); - static_assert(static_cast(VertexFormat::Int2) == WGPUVertexFormat_Int2, "value mismatch for VertexFormat::Int2"); - static_assert(static_cast(VertexFormat::Int3) == WGPUVertexFormat_Int3, "value mismatch for VertexFormat::Int3"); - static_assert(static_cast(VertexFormat::Int4) == WGPUVertexFormat_Int4, "value mismatch for VertexFormat::Int4"); - - - - static_assert(sizeof(BufferUsage) == sizeof(WGPUBufferUsageFlags), "sizeof mismatch for BufferUsage"); - static_assert(alignof(BufferUsage) == alignof(WGPUBufferUsageFlags), "alignof mismatch for BufferUsage"); - - static_assert(static_cast(BufferUsage::None) == WGPUBufferUsage_None, "value mismatch for BufferUsage::None"); - static_assert(static_cast(BufferUsage::MapRead) == WGPUBufferUsage_MapRead, "value mismatch for BufferUsage::MapRead"); - static_assert(static_cast(BufferUsage::MapWrite) == WGPUBufferUsage_MapWrite, "value mismatch for BufferUsage::MapWrite"); - static_assert(static_cast(BufferUsage::CopySrc) == WGPUBufferUsage_CopySrc, "value mismatch for BufferUsage::CopySrc"); - static_assert(static_cast(BufferUsage::CopyDst) == WGPUBufferUsage_CopyDst, "value mismatch for BufferUsage::CopyDst"); - static_assert(static_cast(BufferUsage::Index) == WGPUBufferUsage_Index, "value mismatch for BufferUsage::Index"); - static_assert(static_cast(BufferUsage::Vertex) == WGPUBufferUsage_Vertex, "value mismatch for BufferUsage::Vertex"); - static_assert(static_cast(BufferUsage::Uniform) == WGPUBufferUsage_Uniform, "value mismatch for BufferUsage::Uniform"); - static_assert(static_cast(BufferUsage::Storage) == WGPUBufferUsage_Storage, "value mismatch for BufferUsage::Storage"); - static_assert(static_cast(BufferUsage::Indirect) == WGPUBufferUsage_Indirect, "value mismatch for BufferUsage::Indirect"); - - - static_assert(sizeof(ColorWriteMask) == sizeof(WGPUColorWriteMaskFlags), "sizeof mismatch for ColorWriteMask"); - static_assert(alignof(ColorWriteMask) == alignof(WGPUColorWriteMaskFlags), "alignof mismatch for ColorWriteMask"); - - static_assert(static_cast(ColorWriteMask::None) == WGPUColorWriteMask_None, "value mismatch for ColorWriteMask::None"); - static_assert(static_cast(ColorWriteMask::Red) == WGPUColorWriteMask_Red, "value mismatch for ColorWriteMask::Red"); - static_assert(static_cast(ColorWriteMask::Green) == WGPUColorWriteMask_Green, "value mismatch for ColorWriteMask::Green"); - static_assert(static_cast(ColorWriteMask::Blue) == WGPUColorWriteMask_Blue, "value mismatch for ColorWriteMask::Blue"); - static_assert(static_cast(ColorWriteMask::Alpha) == WGPUColorWriteMask_Alpha, "value mismatch for ColorWriteMask::Alpha"); - static_assert(static_cast(ColorWriteMask::All) == WGPUColorWriteMask_All, "value mismatch for ColorWriteMask::All"); - - - static_assert(sizeof(ShaderStage) == sizeof(WGPUShaderStageFlags), "sizeof mismatch for ShaderStage"); - static_assert(alignof(ShaderStage) == alignof(WGPUShaderStageFlags), "alignof mismatch for ShaderStage"); - - static_assert(static_cast(ShaderStage::None) == WGPUShaderStage_None, "value mismatch for ShaderStage::None"); - static_assert(static_cast(ShaderStage::Vertex) == WGPUShaderStage_Vertex, "value mismatch for ShaderStage::Vertex"); - static_assert(static_cast(ShaderStage::Fragment) == WGPUShaderStage_Fragment, "value mismatch for ShaderStage::Fragment"); - static_assert(static_cast(ShaderStage::Compute) == WGPUShaderStage_Compute, "value mismatch for ShaderStage::Compute"); - - - static_assert(sizeof(TextureUsage) == sizeof(WGPUTextureUsageFlags), "sizeof mismatch for TextureUsage"); - static_assert(alignof(TextureUsage) == alignof(WGPUTextureUsageFlags), "alignof mismatch for TextureUsage"); - - static_assert(static_cast(TextureUsage::None) == WGPUTextureUsage_None, "value mismatch for TextureUsage::None"); - static_assert(static_cast(TextureUsage::CopySrc) == WGPUTextureUsage_CopySrc, "value mismatch for TextureUsage::CopySrc"); - static_assert(static_cast(TextureUsage::CopyDst) == WGPUTextureUsage_CopyDst, "value mismatch for TextureUsage::CopyDst"); - static_assert(static_cast(TextureUsage::Sampled) == WGPUTextureUsage_Sampled, "value mismatch for TextureUsage::Sampled"); - static_assert(static_cast(TextureUsage::Storage) == WGPUTextureUsage_Storage, "value mismatch for TextureUsage::Storage"); - static_assert(static_cast(TextureUsage::OutputAttachment) == WGPUTextureUsage_OutputAttachment, "value mismatch for TextureUsage::OutputAttachment"); - static_assert(static_cast(TextureUsage::Present) == WGPUTextureUsage_Present, "value mismatch for TextureUsage::Present"); - - - static_assert(sizeof(ChainedStruct) == sizeof(WGPUChainedStruct), - "sizeof mismatch for ChainedStruct"); - static_assert(alignof(ChainedStruct) == alignof(WGPUChainedStruct), - "alignof mismatch for ChainedStruct"); - static_assert(offsetof(ChainedStruct, nextInChain) == offsetof(WGPUChainedStruct, next), - "offsetof mismatch for ChainedStruct::nextInChain"); - static_assert(offsetof(ChainedStruct, sType) == offsetof(WGPUChainedStruct, sType), - "offsetof mismatch for ChainedStruct::sType"); - - - static_assert(sizeof(AdapterProperties) == sizeof(WGPUAdapterProperties), "sizeof mismatch for AdapterProperties"); - static_assert(alignof(AdapterProperties) == alignof(WGPUAdapterProperties), "alignof mismatch for AdapterProperties"); - - static_assert(offsetof(AdapterProperties, nextInChain) == offsetof(WGPUAdapterProperties, nextInChain), - "offsetof mismatch for AdapterProperties::nextInChain"); - static_assert(offsetof(AdapterProperties, deviceID) == offsetof(WGPUAdapterProperties, deviceID), - "offsetof mismatch for AdapterProperties::deviceID"); - static_assert(offsetof(AdapterProperties, vendorID) == offsetof(WGPUAdapterProperties, vendorID), - "offsetof mismatch for AdapterProperties::vendorID"); - static_assert(offsetof(AdapterProperties, name) == offsetof(WGPUAdapterProperties, name), - "offsetof mismatch for AdapterProperties::name"); - static_assert(offsetof(AdapterProperties, adapterType) == offsetof(WGPUAdapterProperties, adapterType), - "offsetof mismatch for AdapterProperties::adapterType"); - static_assert(offsetof(AdapterProperties, backendType) == offsetof(WGPUAdapterProperties, backendType), - "offsetof mismatch for AdapterProperties::backendType"); - - - static_assert(sizeof(BindGroupEntry) == sizeof(WGPUBindGroupEntry), "sizeof mismatch for BindGroupEntry"); - static_assert(alignof(BindGroupEntry) == alignof(WGPUBindGroupEntry), "alignof mismatch for BindGroupEntry"); - - static_assert(offsetof(BindGroupEntry, binding) == offsetof(WGPUBindGroupEntry, binding), - "offsetof mismatch for BindGroupEntry::binding"); - static_assert(offsetof(BindGroupEntry, buffer) == offsetof(WGPUBindGroupEntry, buffer), - "offsetof mismatch for BindGroupEntry::buffer"); - static_assert(offsetof(BindGroupEntry, offset) == offsetof(WGPUBindGroupEntry, offset), - "offsetof mismatch for BindGroupEntry::offset"); - static_assert(offsetof(BindGroupEntry, size) == offsetof(WGPUBindGroupEntry, size), - "offsetof mismatch for BindGroupEntry::size"); - static_assert(offsetof(BindGroupEntry, sampler) == offsetof(WGPUBindGroupEntry, sampler), - "offsetof mismatch for BindGroupEntry::sampler"); - static_assert(offsetof(BindGroupEntry, textureView) == offsetof(WGPUBindGroupEntry, textureView), - "offsetof mismatch for BindGroupEntry::textureView"); - - - static_assert(sizeof(BindGroupLayoutEntry) == sizeof(WGPUBindGroupLayoutEntry), "sizeof mismatch for BindGroupLayoutEntry"); - static_assert(alignof(BindGroupLayoutEntry) == alignof(WGPUBindGroupLayoutEntry), "alignof mismatch for BindGroupLayoutEntry"); - - static_assert(offsetof(BindGroupLayoutEntry, binding) == offsetof(WGPUBindGroupLayoutEntry, binding), - "offsetof mismatch for BindGroupLayoutEntry::binding"); - static_assert(offsetof(BindGroupLayoutEntry, visibility) == offsetof(WGPUBindGroupLayoutEntry, visibility), - "offsetof mismatch for BindGroupLayoutEntry::visibility"); - static_assert(offsetof(BindGroupLayoutEntry, type) == offsetof(WGPUBindGroupLayoutEntry, type), - "offsetof mismatch for BindGroupLayoutEntry::type"); - static_assert(offsetof(BindGroupLayoutEntry, hasDynamicOffset) == offsetof(WGPUBindGroupLayoutEntry, hasDynamicOffset), - "offsetof mismatch for BindGroupLayoutEntry::hasDynamicOffset"); - static_assert(offsetof(BindGroupLayoutEntry, multisampled) == offsetof(WGPUBindGroupLayoutEntry, multisampled), - "offsetof mismatch for BindGroupLayoutEntry::multisampled"); - static_assert(offsetof(BindGroupLayoutEntry, viewDimension) == offsetof(WGPUBindGroupLayoutEntry, viewDimension), - "offsetof mismatch for BindGroupLayoutEntry::viewDimension"); - static_assert(offsetof(BindGroupLayoutEntry, textureComponentType) == offsetof(WGPUBindGroupLayoutEntry, textureComponentType), - "offsetof mismatch for BindGroupLayoutEntry::textureComponentType"); - static_assert(offsetof(BindGroupLayoutEntry, storageTextureFormat) == offsetof(WGPUBindGroupLayoutEntry, storageTextureFormat), - "offsetof mismatch for BindGroupLayoutEntry::storageTextureFormat"); - - - static_assert(sizeof(BlendDescriptor) == sizeof(WGPUBlendDescriptor), "sizeof mismatch for BlendDescriptor"); - static_assert(alignof(BlendDescriptor) == alignof(WGPUBlendDescriptor), "alignof mismatch for BlendDescriptor"); - - static_assert(offsetof(BlendDescriptor, operation) == offsetof(WGPUBlendDescriptor, operation), - "offsetof mismatch for BlendDescriptor::operation"); - static_assert(offsetof(BlendDescriptor, srcFactor) == offsetof(WGPUBlendDescriptor, srcFactor), - "offsetof mismatch for BlendDescriptor::srcFactor"); - static_assert(offsetof(BlendDescriptor, dstFactor) == offsetof(WGPUBlendDescriptor, dstFactor), - "offsetof mismatch for BlendDescriptor::dstFactor"); - - - static_assert(sizeof(BufferCopyView) == sizeof(WGPUBufferCopyView), "sizeof mismatch for BufferCopyView"); - static_assert(alignof(BufferCopyView) == alignof(WGPUBufferCopyView), "alignof mismatch for BufferCopyView"); - - static_assert(offsetof(BufferCopyView, nextInChain) == offsetof(WGPUBufferCopyView, nextInChain), - "offsetof mismatch for BufferCopyView::nextInChain"); - static_assert(offsetof(BufferCopyView, buffer) == offsetof(WGPUBufferCopyView, buffer), - "offsetof mismatch for BufferCopyView::buffer"); - static_assert(offsetof(BufferCopyView, offset) == offsetof(WGPUBufferCopyView, offset), - "offsetof mismatch for BufferCopyView::offset"); - static_assert(offsetof(BufferCopyView, bytesPerRow) == offsetof(WGPUBufferCopyView, bytesPerRow), - "offsetof mismatch for BufferCopyView::bytesPerRow"); - static_assert(offsetof(BufferCopyView, rowsPerImage) == offsetof(WGPUBufferCopyView, rowsPerImage), - "offsetof mismatch for BufferCopyView::rowsPerImage"); - - - static_assert(sizeof(BufferDescriptor) == sizeof(WGPUBufferDescriptor), "sizeof mismatch for BufferDescriptor"); - static_assert(alignof(BufferDescriptor) == alignof(WGPUBufferDescriptor), "alignof mismatch for BufferDescriptor"); - - static_assert(offsetof(BufferDescriptor, nextInChain) == offsetof(WGPUBufferDescriptor, nextInChain), - "offsetof mismatch for BufferDescriptor::nextInChain"); - static_assert(offsetof(BufferDescriptor, label) == offsetof(WGPUBufferDescriptor, label), - "offsetof mismatch for BufferDescriptor::label"); - static_assert(offsetof(BufferDescriptor, usage) == offsetof(WGPUBufferDescriptor, usage), - "offsetof mismatch for BufferDescriptor::usage"); - static_assert(offsetof(BufferDescriptor, size) == offsetof(WGPUBufferDescriptor, size), - "offsetof mismatch for BufferDescriptor::size"); - - - static_assert(sizeof(Color) == sizeof(WGPUColor), "sizeof mismatch for Color"); - static_assert(alignof(Color) == alignof(WGPUColor), "alignof mismatch for Color"); - - static_assert(offsetof(Color, r) == offsetof(WGPUColor, r), - "offsetof mismatch for Color::r"); - static_assert(offsetof(Color, g) == offsetof(WGPUColor, g), - "offsetof mismatch for Color::g"); - static_assert(offsetof(Color, b) == offsetof(WGPUColor, b), - "offsetof mismatch for Color::b"); - static_assert(offsetof(Color, a) == offsetof(WGPUColor, a), - "offsetof mismatch for Color::a"); - - - static_assert(sizeof(CommandBufferDescriptor) == sizeof(WGPUCommandBufferDescriptor), "sizeof mismatch for CommandBufferDescriptor"); - static_assert(alignof(CommandBufferDescriptor) == alignof(WGPUCommandBufferDescriptor), "alignof mismatch for CommandBufferDescriptor"); - - static_assert(offsetof(CommandBufferDescriptor, nextInChain) == offsetof(WGPUCommandBufferDescriptor, nextInChain), - "offsetof mismatch for CommandBufferDescriptor::nextInChain"); - static_assert(offsetof(CommandBufferDescriptor, label) == offsetof(WGPUCommandBufferDescriptor, label), - "offsetof mismatch for CommandBufferDescriptor::label"); - - - static_assert(sizeof(CommandEncoderDescriptor) == sizeof(WGPUCommandEncoderDescriptor), "sizeof mismatch for CommandEncoderDescriptor"); - static_assert(alignof(CommandEncoderDescriptor) == alignof(WGPUCommandEncoderDescriptor), "alignof mismatch for CommandEncoderDescriptor"); - - static_assert(offsetof(CommandEncoderDescriptor, nextInChain) == offsetof(WGPUCommandEncoderDescriptor, nextInChain), - "offsetof mismatch for CommandEncoderDescriptor::nextInChain"); - static_assert(offsetof(CommandEncoderDescriptor, label) == offsetof(WGPUCommandEncoderDescriptor, label), - "offsetof mismatch for CommandEncoderDescriptor::label"); - - - static_assert(sizeof(ComputePassDescriptor) == sizeof(WGPUComputePassDescriptor), "sizeof mismatch for ComputePassDescriptor"); - static_assert(alignof(ComputePassDescriptor) == alignof(WGPUComputePassDescriptor), "alignof mismatch for ComputePassDescriptor"); - - static_assert(offsetof(ComputePassDescriptor, nextInChain) == offsetof(WGPUComputePassDescriptor, nextInChain), - "offsetof mismatch for ComputePassDescriptor::nextInChain"); - static_assert(offsetof(ComputePassDescriptor, label) == offsetof(WGPUComputePassDescriptor, label), - "offsetof mismatch for ComputePassDescriptor::label"); - - - static_assert(sizeof(CreateBufferMappedResult) == sizeof(WGPUCreateBufferMappedResult), "sizeof mismatch for CreateBufferMappedResult"); - static_assert(alignof(CreateBufferMappedResult) == alignof(WGPUCreateBufferMappedResult), "alignof mismatch for CreateBufferMappedResult"); - - static_assert(offsetof(CreateBufferMappedResult, buffer) == offsetof(WGPUCreateBufferMappedResult, buffer), - "offsetof mismatch for CreateBufferMappedResult::buffer"); - static_assert(offsetof(CreateBufferMappedResult, dataLength) == offsetof(WGPUCreateBufferMappedResult, dataLength), - "offsetof mismatch for CreateBufferMappedResult::dataLength"); - static_assert(offsetof(CreateBufferMappedResult, data) == offsetof(WGPUCreateBufferMappedResult, data), - "offsetof mismatch for CreateBufferMappedResult::data"); - - - static_assert(sizeof(DeviceProperties) == sizeof(WGPUDeviceProperties), "sizeof mismatch for DeviceProperties"); - static_assert(alignof(DeviceProperties) == alignof(WGPUDeviceProperties), "alignof mismatch for DeviceProperties"); - - static_assert(offsetof(DeviceProperties, textureCompressionBC) == offsetof(WGPUDeviceProperties, textureCompressionBC), - "offsetof mismatch for DeviceProperties::textureCompressionBC"); - static_assert(offsetof(DeviceProperties, shaderFloat16) == offsetof(WGPUDeviceProperties, shaderFloat16), - "offsetof mismatch for DeviceProperties::shaderFloat16"); - static_assert(offsetof(DeviceProperties, pipelineStatisticsQuery) == offsetof(WGPUDeviceProperties, pipelineStatisticsQuery), - "offsetof mismatch for DeviceProperties::pipelineStatisticsQuery"); - static_assert(offsetof(DeviceProperties, timestampQuery) == offsetof(WGPUDeviceProperties, timestampQuery), - "offsetof mismatch for DeviceProperties::timestampQuery"); - - - static_assert(sizeof(Extent3D) == sizeof(WGPUExtent3D), "sizeof mismatch for Extent3D"); - static_assert(alignof(Extent3D) == alignof(WGPUExtent3D), "alignof mismatch for Extent3D"); - - static_assert(offsetof(Extent3D, width) == offsetof(WGPUExtent3D, width), - "offsetof mismatch for Extent3D::width"); - static_assert(offsetof(Extent3D, height) == offsetof(WGPUExtent3D, height), - "offsetof mismatch for Extent3D::height"); - static_assert(offsetof(Extent3D, depth) == offsetof(WGPUExtent3D, depth), - "offsetof mismatch for Extent3D::depth"); - - - static_assert(sizeof(FenceDescriptor) == sizeof(WGPUFenceDescriptor), "sizeof mismatch for FenceDescriptor"); - static_assert(alignof(FenceDescriptor) == alignof(WGPUFenceDescriptor), "alignof mismatch for FenceDescriptor"); - - static_assert(offsetof(FenceDescriptor, nextInChain) == offsetof(WGPUFenceDescriptor, nextInChain), - "offsetof mismatch for FenceDescriptor::nextInChain"); - static_assert(offsetof(FenceDescriptor, label) == offsetof(WGPUFenceDescriptor, label), - "offsetof mismatch for FenceDescriptor::label"); - static_assert(offsetof(FenceDescriptor, initialValue) == offsetof(WGPUFenceDescriptor, initialValue), - "offsetof mismatch for FenceDescriptor::initialValue"); - - - static_assert(sizeof(InstanceDescriptor) == sizeof(WGPUInstanceDescriptor), "sizeof mismatch for InstanceDescriptor"); - static_assert(alignof(InstanceDescriptor) == alignof(WGPUInstanceDescriptor), "alignof mismatch for InstanceDescriptor"); - - static_assert(offsetof(InstanceDescriptor, nextInChain) == offsetof(WGPUInstanceDescriptor, nextInChain), - "offsetof mismatch for InstanceDescriptor::nextInChain"); - - - static_assert(sizeof(Origin3D) == sizeof(WGPUOrigin3D), "sizeof mismatch for Origin3D"); - static_assert(alignof(Origin3D) == alignof(WGPUOrigin3D), "alignof mismatch for Origin3D"); - - static_assert(offsetof(Origin3D, x) == offsetof(WGPUOrigin3D, x), - "offsetof mismatch for Origin3D::x"); - static_assert(offsetof(Origin3D, y) == offsetof(WGPUOrigin3D, y), - "offsetof mismatch for Origin3D::y"); - static_assert(offsetof(Origin3D, z) == offsetof(WGPUOrigin3D, z), - "offsetof mismatch for Origin3D::z"); - - - static_assert(sizeof(PipelineLayoutDescriptor) == sizeof(WGPUPipelineLayoutDescriptor), "sizeof mismatch for PipelineLayoutDescriptor"); - static_assert(alignof(PipelineLayoutDescriptor) == alignof(WGPUPipelineLayoutDescriptor), "alignof mismatch for PipelineLayoutDescriptor"); - - static_assert(offsetof(PipelineLayoutDescriptor, nextInChain) == offsetof(WGPUPipelineLayoutDescriptor, nextInChain), - "offsetof mismatch for PipelineLayoutDescriptor::nextInChain"); - static_assert(offsetof(PipelineLayoutDescriptor, label) == offsetof(WGPUPipelineLayoutDescriptor, label), - "offsetof mismatch for PipelineLayoutDescriptor::label"); - static_assert(offsetof(PipelineLayoutDescriptor, bindGroupLayoutCount) == offsetof(WGPUPipelineLayoutDescriptor, bindGroupLayoutCount), - "offsetof mismatch for PipelineLayoutDescriptor::bindGroupLayoutCount"); - static_assert(offsetof(PipelineLayoutDescriptor, bindGroupLayouts) == offsetof(WGPUPipelineLayoutDescriptor, bindGroupLayouts), - "offsetof mismatch for PipelineLayoutDescriptor::bindGroupLayouts"); - - - static_assert(sizeof(ProgrammableStageDescriptor) == sizeof(WGPUProgrammableStageDescriptor), "sizeof mismatch for ProgrammableStageDescriptor"); - static_assert(alignof(ProgrammableStageDescriptor) == alignof(WGPUProgrammableStageDescriptor), "alignof mismatch for ProgrammableStageDescriptor"); - - static_assert(offsetof(ProgrammableStageDescriptor, nextInChain) == offsetof(WGPUProgrammableStageDescriptor, nextInChain), - "offsetof mismatch for ProgrammableStageDescriptor::nextInChain"); - static_assert(offsetof(ProgrammableStageDescriptor, module) == offsetof(WGPUProgrammableStageDescriptor, module), - "offsetof mismatch for ProgrammableStageDescriptor::module"); - static_assert(offsetof(ProgrammableStageDescriptor, entryPoint) == offsetof(WGPUProgrammableStageDescriptor, entryPoint), - "offsetof mismatch for ProgrammableStageDescriptor::entryPoint"); - - - static_assert(sizeof(RasterizationStateDescriptor) == sizeof(WGPURasterizationStateDescriptor), "sizeof mismatch for RasterizationStateDescriptor"); - static_assert(alignof(RasterizationStateDescriptor) == alignof(WGPURasterizationStateDescriptor), "alignof mismatch for RasterizationStateDescriptor"); - - static_assert(offsetof(RasterizationStateDescriptor, nextInChain) == offsetof(WGPURasterizationStateDescriptor, nextInChain), - "offsetof mismatch for RasterizationStateDescriptor::nextInChain"); - static_assert(offsetof(RasterizationStateDescriptor, frontFace) == offsetof(WGPURasterizationStateDescriptor, frontFace), - "offsetof mismatch for RasterizationStateDescriptor::frontFace"); - static_assert(offsetof(RasterizationStateDescriptor, cullMode) == offsetof(WGPURasterizationStateDescriptor, cullMode), - "offsetof mismatch for RasterizationStateDescriptor::cullMode"); - static_assert(offsetof(RasterizationStateDescriptor, depthBias) == offsetof(WGPURasterizationStateDescriptor, depthBias), - "offsetof mismatch for RasterizationStateDescriptor::depthBias"); - static_assert(offsetof(RasterizationStateDescriptor, depthBiasSlopeScale) == offsetof(WGPURasterizationStateDescriptor, depthBiasSlopeScale), - "offsetof mismatch for RasterizationStateDescriptor::depthBiasSlopeScale"); - static_assert(offsetof(RasterizationStateDescriptor, depthBiasClamp) == offsetof(WGPURasterizationStateDescriptor, depthBiasClamp), - "offsetof mismatch for RasterizationStateDescriptor::depthBiasClamp"); - - - static_assert(sizeof(RenderBundleDescriptor) == sizeof(WGPURenderBundleDescriptor), "sizeof mismatch for RenderBundleDescriptor"); - static_assert(alignof(RenderBundleDescriptor) == alignof(WGPURenderBundleDescriptor), "alignof mismatch for RenderBundleDescriptor"); - - static_assert(offsetof(RenderBundleDescriptor, nextInChain) == offsetof(WGPURenderBundleDescriptor, nextInChain), - "offsetof mismatch for RenderBundleDescriptor::nextInChain"); - static_assert(offsetof(RenderBundleDescriptor, label) == offsetof(WGPURenderBundleDescriptor, label), - "offsetof mismatch for RenderBundleDescriptor::label"); - - - static_assert(sizeof(RenderBundleEncoderDescriptor) == sizeof(WGPURenderBundleEncoderDescriptor), "sizeof mismatch for RenderBundleEncoderDescriptor"); - static_assert(alignof(RenderBundleEncoderDescriptor) == alignof(WGPURenderBundleEncoderDescriptor), "alignof mismatch for RenderBundleEncoderDescriptor"); - - static_assert(offsetof(RenderBundleEncoderDescriptor, nextInChain) == offsetof(WGPURenderBundleEncoderDescriptor, nextInChain), - "offsetof mismatch for RenderBundleEncoderDescriptor::nextInChain"); - static_assert(offsetof(RenderBundleEncoderDescriptor, label) == offsetof(WGPURenderBundleEncoderDescriptor, label), - "offsetof mismatch for RenderBundleEncoderDescriptor::label"); - static_assert(offsetof(RenderBundleEncoderDescriptor, colorFormatsCount) == offsetof(WGPURenderBundleEncoderDescriptor, colorFormatsCount), - "offsetof mismatch for RenderBundleEncoderDescriptor::colorFormatsCount"); - static_assert(offsetof(RenderBundleEncoderDescriptor, colorFormats) == offsetof(WGPURenderBundleEncoderDescriptor, colorFormats), - "offsetof mismatch for RenderBundleEncoderDescriptor::colorFormats"); - static_assert(offsetof(RenderBundleEncoderDescriptor, depthStencilFormat) == offsetof(WGPURenderBundleEncoderDescriptor, depthStencilFormat), - "offsetof mismatch for RenderBundleEncoderDescriptor::depthStencilFormat"); - static_assert(offsetof(RenderBundleEncoderDescriptor, sampleCount) == offsetof(WGPURenderBundleEncoderDescriptor, sampleCount), - "offsetof mismatch for RenderBundleEncoderDescriptor::sampleCount"); - - - static_assert(sizeof(RenderPassDepthStencilAttachmentDescriptor) == sizeof(WGPURenderPassDepthStencilAttachmentDescriptor), "sizeof mismatch for RenderPassDepthStencilAttachmentDescriptor"); - static_assert(alignof(RenderPassDepthStencilAttachmentDescriptor) == alignof(WGPURenderPassDepthStencilAttachmentDescriptor), "alignof mismatch for RenderPassDepthStencilAttachmentDescriptor"); - - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, attachment) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, attachment), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::attachment"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthLoadOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthLoadOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthLoadOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthStoreOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthStoreOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthStoreOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, clearDepth) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, clearDepth), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::clearDepth"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilLoadOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilLoadOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilLoadOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilStoreOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilStoreOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilStoreOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, clearStencil) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, clearStencil), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::clearStencil"); - - - static_assert(sizeof(SamplerDescriptor) == sizeof(WGPUSamplerDescriptor), "sizeof mismatch for SamplerDescriptor"); - static_assert(alignof(SamplerDescriptor) == alignof(WGPUSamplerDescriptor), "alignof mismatch for SamplerDescriptor"); - - static_assert(offsetof(SamplerDescriptor, nextInChain) == offsetof(WGPUSamplerDescriptor, nextInChain), - "offsetof mismatch for SamplerDescriptor::nextInChain"); - static_assert(offsetof(SamplerDescriptor, label) == offsetof(WGPUSamplerDescriptor, label), - "offsetof mismatch for SamplerDescriptor::label"); - static_assert(offsetof(SamplerDescriptor, addressModeU) == offsetof(WGPUSamplerDescriptor, addressModeU), - "offsetof mismatch for SamplerDescriptor::addressModeU"); - static_assert(offsetof(SamplerDescriptor, addressModeV) == offsetof(WGPUSamplerDescriptor, addressModeV), - "offsetof mismatch for SamplerDescriptor::addressModeV"); - static_assert(offsetof(SamplerDescriptor, addressModeW) == offsetof(WGPUSamplerDescriptor, addressModeW), - "offsetof mismatch for SamplerDescriptor::addressModeW"); - static_assert(offsetof(SamplerDescriptor, magFilter) == offsetof(WGPUSamplerDescriptor, magFilter), - "offsetof mismatch for SamplerDescriptor::magFilter"); - static_assert(offsetof(SamplerDescriptor, minFilter) == offsetof(WGPUSamplerDescriptor, minFilter), - "offsetof mismatch for SamplerDescriptor::minFilter"); - static_assert(offsetof(SamplerDescriptor, mipmapFilter) == offsetof(WGPUSamplerDescriptor, mipmapFilter), - "offsetof mismatch for SamplerDescriptor::mipmapFilter"); - static_assert(offsetof(SamplerDescriptor, lodMinClamp) == offsetof(WGPUSamplerDescriptor, lodMinClamp), - "offsetof mismatch for SamplerDescriptor::lodMinClamp"); - static_assert(offsetof(SamplerDescriptor, lodMaxClamp) == offsetof(WGPUSamplerDescriptor, lodMaxClamp), - "offsetof mismatch for SamplerDescriptor::lodMaxClamp"); - static_assert(offsetof(SamplerDescriptor, compare) == offsetof(WGPUSamplerDescriptor, compare), - "offsetof mismatch for SamplerDescriptor::compare"); - - - static_assert(sizeof(SamplerDescriptorDummyAnisotropicFiltering) == sizeof(WGPUSamplerDescriptorDummyAnisotropicFiltering), "sizeof mismatch for SamplerDescriptorDummyAnisotropicFiltering"); - static_assert(alignof(SamplerDescriptorDummyAnisotropicFiltering) == alignof(WGPUSamplerDescriptorDummyAnisotropicFiltering), "alignof mismatch for SamplerDescriptorDummyAnisotropicFiltering"); - - static_assert(offsetof(SamplerDescriptorDummyAnisotropicFiltering, maxAnisotropy) == offsetof(WGPUSamplerDescriptorDummyAnisotropicFiltering, maxAnisotropy), - "offsetof mismatch for SamplerDescriptorDummyAnisotropicFiltering::maxAnisotropy"); - - - static_assert(sizeof(ShaderModuleDescriptor) == sizeof(WGPUShaderModuleDescriptor), "sizeof mismatch for ShaderModuleDescriptor"); - static_assert(alignof(ShaderModuleDescriptor) == alignof(WGPUShaderModuleDescriptor), "alignof mismatch for ShaderModuleDescriptor"); - - static_assert(offsetof(ShaderModuleDescriptor, nextInChain) == offsetof(WGPUShaderModuleDescriptor, nextInChain), - "offsetof mismatch for ShaderModuleDescriptor::nextInChain"); - static_assert(offsetof(ShaderModuleDescriptor, label) == offsetof(WGPUShaderModuleDescriptor, label), - "offsetof mismatch for ShaderModuleDescriptor::label"); - - - static_assert(sizeof(ShaderModuleSPIRVDescriptor) == sizeof(WGPUShaderModuleSPIRVDescriptor), "sizeof mismatch for ShaderModuleSPIRVDescriptor"); - static_assert(alignof(ShaderModuleSPIRVDescriptor) == alignof(WGPUShaderModuleSPIRVDescriptor), "alignof mismatch for ShaderModuleSPIRVDescriptor"); - - static_assert(offsetof(ShaderModuleSPIRVDescriptor, codeSize) == offsetof(WGPUShaderModuleSPIRVDescriptor, codeSize), - "offsetof mismatch for ShaderModuleSPIRVDescriptor::codeSize"); - static_assert(offsetof(ShaderModuleSPIRVDescriptor, code) == offsetof(WGPUShaderModuleSPIRVDescriptor, code), - "offsetof mismatch for ShaderModuleSPIRVDescriptor::code"); - - - static_assert(sizeof(ShaderModuleWGSLDescriptor) == sizeof(WGPUShaderModuleWGSLDescriptor), "sizeof mismatch for ShaderModuleWGSLDescriptor"); - static_assert(alignof(ShaderModuleWGSLDescriptor) == alignof(WGPUShaderModuleWGSLDescriptor), "alignof mismatch for ShaderModuleWGSLDescriptor"); - - static_assert(offsetof(ShaderModuleWGSLDescriptor, source) == offsetof(WGPUShaderModuleWGSLDescriptor, source), - "offsetof mismatch for ShaderModuleWGSLDescriptor::source"); - - - static_assert(sizeof(StencilStateFaceDescriptor) == sizeof(WGPUStencilStateFaceDescriptor), "sizeof mismatch for StencilStateFaceDescriptor"); - static_assert(alignof(StencilStateFaceDescriptor) == alignof(WGPUStencilStateFaceDescriptor), "alignof mismatch for StencilStateFaceDescriptor"); - - static_assert(offsetof(StencilStateFaceDescriptor, compare) == offsetof(WGPUStencilStateFaceDescriptor, compare), - "offsetof mismatch for StencilStateFaceDescriptor::compare"); - static_assert(offsetof(StencilStateFaceDescriptor, failOp) == offsetof(WGPUStencilStateFaceDescriptor, failOp), - "offsetof mismatch for StencilStateFaceDescriptor::failOp"); - static_assert(offsetof(StencilStateFaceDescriptor, depthFailOp) == offsetof(WGPUStencilStateFaceDescriptor, depthFailOp), - "offsetof mismatch for StencilStateFaceDescriptor::depthFailOp"); - static_assert(offsetof(StencilStateFaceDescriptor, passOp) == offsetof(WGPUStencilStateFaceDescriptor, passOp), - "offsetof mismatch for StencilStateFaceDescriptor::passOp"); - - - static_assert(sizeof(SurfaceDescriptor) == sizeof(WGPUSurfaceDescriptor), "sizeof mismatch for SurfaceDescriptor"); - static_assert(alignof(SurfaceDescriptor) == alignof(WGPUSurfaceDescriptor), "alignof mismatch for SurfaceDescriptor"); - - static_assert(offsetof(SurfaceDescriptor, nextInChain) == offsetof(WGPUSurfaceDescriptor, nextInChain), - "offsetof mismatch for SurfaceDescriptor::nextInChain"); - static_assert(offsetof(SurfaceDescriptor, label) == offsetof(WGPUSurfaceDescriptor, label), - "offsetof mismatch for SurfaceDescriptor::label"); - - - static_assert(sizeof(SurfaceDescriptorFromHTMLCanvasId) == sizeof(WGPUSurfaceDescriptorFromHTMLCanvasId), "sizeof mismatch for SurfaceDescriptorFromHTMLCanvasId"); - static_assert(alignof(SurfaceDescriptorFromHTMLCanvasId) == alignof(WGPUSurfaceDescriptorFromHTMLCanvasId), "alignof mismatch for SurfaceDescriptorFromHTMLCanvasId"); - - static_assert(offsetof(SurfaceDescriptorFromHTMLCanvasId, id) == offsetof(WGPUSurfaceDescriptorFromHTMLCanvasId, id), - "offsetof mismatch for SurfaceDescriptorFromHTMLCanvasId::id"); - - - static_assert(sizeof(SurfaceDescriptorFromMetalLayer) == sizeof(WGPUSurfaceDescriptorFromMetalLayer), "sizeof mismatch for SurfaceDescriptorFromMetalLayer"); - static_assert(alignof(SurfaceDescriptorFromMetalLayer) == alignof(WGPUSurfaceDescriptorFromMetalLayer), "alignof mismatch for SurfaceDescriptorFromMetalLayer"); - - static_assert(offsetof(SurfaceDescriptorFromMetalLayer, layer) == offsetof(WGPUSurfaceDescriptorFromMetalLayer, layer), - "offsetof mismatch for SurfaceDescriptorFromMetalLayer::layer"); - - - static_assert(sizeof(SurfaceDescriptorFromWindowsHWND) == sizeof(WGPUSurfaceDescriptorFromWindowsHWND), "sizeof mismatch for SurfaceDescriptorFromWindowsHWND"); - static_assert(alignof(SurfaceDescriptorFromWindowsHWND) == alignof(WGPUSurfaceDescriptorFromWindowsHWND), "alignof mismatch for SurfaceDescriptorFromWindowsHWND"); - - static_assert(offsetof(SurfaceDescriptorFromWindowsHWND, hinstance) == offsetof(WGPUSurfaceDescriptorFromWindowsHWND, hinstance), - "offsetof mismatch for SurfaceDescriptorFromWindowsHWND::hinstance"); - static_assert(offsetof(SurfaceDescriptorFromWindowsHWND, hwnd) == offsetof(WGPUSurfaceDescriptorFromWindowsHWND, hwnd), - "offsetof mismatch for SurfaceDescriptorFromWindowsHWND::hwnd"); - - - static_assert(sizeof(SurfaceDescriptorFromXlib) == sizeof(WGPUSurfaceDescriptorFromXlib), "sizeof mismatch for SurfaceDescriptorFromXlib"); - static_assert(alignof(SurfaceDescriptorFromXlib) == alignof(WGPUSurfaceDescriptorFromXlib), "alignof mismatch for SurfaceDescriptorFromXlib"); - - static_assert(offsetof(SurfaceDescriptorFromXlib, display) == offsetof(WGPUSurfaceDescriptorFromXlib, display), - "offsetof mismatch for SurfaceDescriptorFromXlib::display"); - static_assert(offsetof(SurfaceDescriptorFromXlib, window) == offsetof(WGPUSurfaceDescriptorFromXlib, window), - "offsetof mismatch for SurfaceDescriptorFromXlib::window"); - - - static_assert(sizeof(SwapChainDescriptor) == sizeof(WGPUSwapChainDescriptor), "sizeof mismatch for SwapChainDescriptor"); - static_assert(alignof(SwapChainDescriptor) == alignof(WGPUSwapChainDescriptor), "alignof mismatch for SwapChainDescriptor"); - - static_assert(offsetof(SwapChainDescriptor, nextInChain) == offsetof(WGPUSwapChainDescriptor, nextInChain), - "offsetof mismatch for SwapChainDescriptor::nextInChain"); - static_assert(offsetof(SwapChainDescriptor, label) == offsetof(WGPUSwapChainDescriptor, label), - "offsetof mismatch for SwapChainDescriptor::label"); - static_assert(offsetof(SwapChainDescriptor, usage) == offsetof(WGPUSwapChainDescriptor, usage), - "offsetof mismatch for SwapChainDescriptor::usage"); - static_assert(offsetof(SwapChainDescriptor, format) == offsetof(WGPUSwapChainDescriptor, format), - "offsetof mismatch for SwapChainDescriptor::format"); - static_assert(offsetof(SwapChainDescriptor, width) == offsetof(WGPUSwapChainDescriptor, width), - "offsetof mismatch for SwapChainDescriptor::width"); - static_assert(offsetof(SwapChainDescriptor, height) == offsetof(WGPUSwapChainDescriptor, height), - "offsetof mismatch for SwapChainDescriptor::height"); - static_assert(offsetof(SwapChainDescriptor, presentMode) == offsetof(WGPUSwapChainDescriptor, presentMode), - "offsetof mismatch for SwapChainDescriptor::presentMode"); - static_assert(offsetof(SwapChainDescriptor, implementation) == offsetof(WGPUSwapChainDescriptor, implementation), - "offsetof mismatch for SwapChainDescriptor::implementation"); - - - static_assert(sizeof(TextureViewDescriptor) == sizeof(WGPUTextureViewDescriptor), "sizeof mismatch for TextureViewDescriptor"); - static_assert(alignof(TextureViewDescriptor) == alignof(WGPUTextureViewDescriptor), "alignof mismatch for TextureViewDescriptor"); - - static_assert(offsetof(TextureViewDescriptor, nextInChain) == offsetof(WGPUTextureViewDescriptor, nextInChain), - "offsetof mismatch for TextureViewDescriptor::nextInChain"); - static_assert(offsetof(TextureViewDescriptor, label) == offsetof(WGPUTextureViewDescriptor, label), - "offsetof mismatch for TextureViewDescriptor::label"); - static_assert(offsetof(TextureViewDescriptor, format) == offsetof(WGPUTextureViewDescriptor, format), - "offsetof mismatch for TextureViewDescriptor::format"); - static_assert(offsetof(TextureViewDescriptor, dimension) == offsetof(WGPUTextureViewDescriptor, dimension), - "offsetof mismatch for TextureViewDescriptor::dimension"); - static_assert(offsetof(TextureViewDescriptor, baseMipLevel) == offsetof(WGPUTextureViewDescriptor, baseMipLevel), - "offsetof mismatch for TextureViewDescriptor::baseMipLevel"); - static_assert(offsetof(TextureViewDescriptor, mipLevelCount) == offsetof(WGPUTextureViewDescriptor, mipLevelCount), - "offsetof mismatch for TextureViewDescriptor::mipLevelCount"); - static_assert(offsetof(TextureViewDescriptor, baseArrayLayer) == offsetof(WGPUTextureViewDescriptor, baseArrayLayer), - "offsetof mismatch for TextureViewDescriptor::baseArrayLayer"); - static_assert(offsetof(TextureViewDescriptor, arrayLayerCount) == offsetof(WGPUTextureViewDescriptor, arrayLayerCount), - "offsetof mismatch for TextureViewDescriptor::arrayLayerCount"); - static_assert(offsetof(TextureViewDescriptor, aspect) == offsetof(WGPUTextureViewDescriptor, aspect), - "offsetof mismatch for TextureViewDescriptor::aspect"); - - - static_assert(sizeof(VertexAttributeDescriptor) == sizeof(WGPUVertexAttributeDescriptor), "sizeof mismatch for VertexAttributeDescriptor"); - static_assert(alignof(VertexAttributeDescriptor) == alignof(WGPUVertexAttributeDescriptor), "alignof mismatch for VertexAttributeDescriptor"); - - static_assert(offsetof(VertexAttributeDescriptor, format) == offsetof(WGPUVertexAttributeDescriptor, format), - "offsetof mismatch for VertexAttributeDescriptor::format"); - static_assert(offsetof(VertexAttributeDescriptor, offset) == offsetof(WGPUVertexAttributeDescriptor, offset), - "offsetof mismatch for VertexAttributeDescriptor::offset"); - static_assert(offsetof(VertexAttributeDescriptor, shaderLocation) == offsetof(WGPUVertexAttributeDescriptor, shaderLocation), - "offsetof mismatch for VertexAttributeDescriptor::shaderLocation"); - - - static_assert(sizeof(BindGroupDescriptor) == sizeof(WGPUBindGroupDescriptor), "sizeof mismatch for BindGroupDescriptor"); - static_assert(alignof(BindGroupDescriptor) == alignof(WGPUBindGroupDescriptor), "alignof mismatch for BindGroupDescriptor"); - - static_assert(offsetof(BindGroupDescriptor, nextInChain) == offsetof(WGPUBindGroupDescriptor, nextInChain), - "offsetof mismatch for BindGroupDescriptor::nextInChain"); - static_assert(offsetof(BindGroupDescriptor, label) == offsetof(WGPUBindGroupDescriptor, label), - "offsetof mismatch for BindGroupDescriptor::label"); - static_assert(offsetof(BindGroupDescriptor, layout) == offsetof(WGPUBindGroupDescriptor, layout), - "offsetof mismatch for BindGroupDescriptor::layout"); - static_assert(offsetof(BindGroupDescriptor, entryCount) == offsetof(WGPUBindGroupDescriptor, entryCount), - "offsetof mismatch for BindGroupDescriptor::entryCount"); - static_assert(offsetof(BindGroupDescriptor, entries) == offsetof(WGPUBindGroupDescriptor, entries), - "offsetof mismatch for BindGroupDescriptor::entries"); - - - static_assert(sizeof(BindGroupLayoutDescriptor) == sizeof(WGPUBindGroupLayoutDescriptor), "sizeof mismatch for BindGroupLayoutDescriptor"); - static_assert(alignof(BindGroupLayoutDescriptor) == alignof(WGPUBindGroupLayoutDescriptor), "alignof mismatch for BindGroupLayoutDescriptor"); - - static_assert(offsetof(BindGroupLayoutDescriptor, nextInChain) == offsetof(WGPUBindGroupLayoutDescriptor, nextInChain), - "offsetof mismatch for BindGroupLayoutDescriptor::nextInChain"); - static_assert(offsetof(BindGroupLayoutDescriptor, label) == offsetof(WGPUBindGroupLayoutDescriptor, label), - "offsetof mismatch for BindGroupLayoutDescriptor::label"); - static_assert(offsetof(BindGroupLayoutDescriptor, entryCount) == offsetof(WGPUBindGroupLayoutDescriptor, entryCount), - "offsetof mismatch for BindGroupLayoutDescriptor::entryCount"); - static_assert(offsetof(BindGroupLayoutDescriptor, entries) == offsetof(WGPUBindGroupLayoutDescriptor, entries), - "offsetof mismatch for BindGroupLayoutDescriptor::entries"); - - - static_assert(sizeof(ColorStateDescriptor) == sizeof(WGPUColorStateDescriptor), "sizeof mismatch for ColorStateDescriptor"); - static_assert(alignof(ColorStateDescriptor) == alignof(WGPUColorStateDescriptor), "alignof mismatch for ColorStateDescriptor"); - - static_assert(offsetof(ColorStateDescriptor, nextInChain) == offsetof(WGPUColorStateDescriptor, nextInChain), - "offsetof mismatch for ColorStateDescriptor::nextInChain"); - static_assert(offsetof(ColorStateDescriptor, format) == offsetof(WGPUColorStateDescriptor, format), - "offsetof mismatch for ColorStateDescriptor::format"); - static_assert(offsetof(ColorStateDescriptor, alphaBlend) == offsetof(WGPUColorStateDescriptor, alphaBlend), - "offsetof mismatch for ColorStateDescriptor::alphaBlend"); - static_assert(offsetof(ColorStateDescriptor, colorBlend) == offsetof(WGPUColorStateDescriptor, colorBlend), - "offsetof mismatch for ColorStateDescriptor::colorBlend"); - static_assert(offsetof(ColorStateDescriptor, writeMask) == offsetof(WGPUColorStateDescriptor, writeMask), - "offsetof mismatch for ColorStateDescriptor::writeMask"); - - - static_assert(sizeof(ComputePipelineDescriptor) == sizeof(WGPUComputePipelineDescriptor), "sizeof mismatch for ComputePipelineDescriptor"); - static_assert(alignof(ComputePipelineDescriptor) == alignof(WGPUComputePipelineDescriptor), "alignof mismatch for ComputePipelineDescriptor"); - - static_assert(offsetof(ComputePipelineDescriptor, nextInChain) == offsetof(WGPUComputePipelineDescriptor, nextInChain), - "offsetof mismatch for ComputePipelineDescriptor::nextInChain"); - static_assert(offsetof(ComputePipelineDescriptor, label) == offsetof(WGPUComputePipelineDescriptor, label), - "offsetof mismatch for ComputePipelineDescriptor::label"); - static_assert(offsetof(ComputePipelineDescriptor, layout) == offsetof(WGPUComputePipelineDescriptor, layout), - "offsetof mismatch for ComputePipelineDescriptor::layout"); - static_assert(offsetof(ComputePipelineDescriptor, computeStage) == offsetof(WGPUComputePipelineDescriptor, computeStage), - "offsetof mismatch for ComputePipelineDescriptor::computeStage"); - - - static_assert(sizeof(DepthStencilStateDescriptor) == sizeof(WGPUDepthStencilStateDescriptor), "sizeof mismatch for DepthStencilStateDescriptor"); - static_assert(alignof(DepthStencilStateDescriptor) == alignof(WGPUDepthStencilStateDescriptor), "alignof mismatch for DepthStencilStateDescriptor"); - - static_assert(offsetof(DepthStencilStateDescriptor, nextInChain) == offsetof(WGPUDepthStencilStateDescriptor, nextInChain), - "offsetof mismatch for DepthStencilStateDescriptor::nextInChain"); - static_assert(offsetof(DepthStencilStateDescriptor, format) == offsetof(WGPUDepthStencilStateDescriptor, format), - "offsetof mismatch for DepthStencilStateDescriptor::format"); - static_assert(offsetof(DepthStencilStateDescriptor, depthWriteEnabled) == offsetof(WGPUDepthStencilStateDescriptor, depthWriteEnabled), - "offsetof mismatch for DepthStencilStateDescriptor::depthWriteEnabled"); - static_assert(offsetof(DepthStencilStateDescriptor, depthCompare) == offsetof(WGPUDepthStencilStateDescriptor, depthCompare), - "offsetof mismatch for DepthStencilStateDescriptor::depthCompare"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilFront) == offsetof(WGPUDepthStencilStateDescriptor, stencilFront), - "offsetof mismatch for DepthStencilStateDescriptor::stencilFront"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilBack) == offsetof(WGPUDepthStencilStateDescriptor, stencilBack), - "offsetof mismatch for DepthStencilStateDescriptor::stencilBack"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilReadMask) == offsetof(WGPUDepthStencilStateDescriptor, stencilReadMask), - "offsetof mismatch for DepthStencilStateDescriptor::stencilReadMask"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilWriteMask) == offsetof(WGPUDepthStencilStateDescriptor, stencilWriteMask), - "offsetof mismatch for DepthStencilStateDescriptor::stencilWriteMask"); - - - static_assert(sizeof(RenderPassColorAttachmentDescriptor) == sizeof(WGPURenderPassColorAttachmentDescriptor), "sizeof mismatch for RenderPassColorAttachmentDescriptor"); - static_assert(alignof(RenderPassColorAttachmentDescriptor) == alignof(WGPURenderPassColorAttachmentDescriptor), "alignof mismatch for RenderPassColorAttachmentDescriptor"); - - static_assert(offsetof(RenderPassColorAttachmentDescriptor, attachment) == offsetof(WGPURenderPassColorAttachmentDescriptor, attachment), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::attachment"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, resolveTarget) == offsetof(WGPURenderPassColorAttachmentDescriptor, resolveTarget), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::resolveTarget"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, loadOp) == offsetof(WGPURenderPassColorAttachmentDescriptor, loadOp), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::loadOp"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, storeOp) == offsetof(WGPURenderPassColorAttachmentDescriptor, storeOp), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::storeOp"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, clearColor) == offsetof(WGPURenderPassColorAttachmentDescriptor, clearColor), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::clearColor"); - - - static_assert(sizeof(RenderPipelineDescriptorDummyExtension) == sizeof(WGPURenderPipelineDescriptorDummyExtension), "sizeof mismatch for RenderPipelineDescriptorDummyExtension"); - static_assert(alignof(RenderPipelineDescriptorDummyExtension) == alignof(WGPURenderPipelineDescriptorDummyExtension), "alignof mismatch for RenderPipelineDescriptorDummyExtension"); - - static_assert(offsetof(RenderPipelineDescriptorDummyExtension, dummyStage) == offsetof(WGPURenderPipelineDescriptorDummyExtension, dummyStage), - "offsetof mismatch for RenderPipelineDescriptorDummyExtension::dummyStage"); - - - static_assert(sizeof(TextureCopyView) == sizeof(WGPUTextureCopyView), "sizeof mismatch for TextureCopyView"); - static_assert(alignof(TextureCopyView) == alignof(WGPUTextureCopyView), "alignof mismatch for TextureCopyView"); - - static_assert(offsetof(TextureCopyView, nextInChain) == offsetof(WGPUTextureCopyView, nextInChain), - "offsetof mismatch for TextureCopyView::nextInChain"); - static_assert(offsetof(TextureCopyView, texture) == offsetof(WGPUTextureCopyView, texture), - "offsetof mismatch for TextureCopyView::texture"); - static_assert(offsetof(TextureCopyView, mipLevel) == offsetof(WGPUTextureCopyView, mipLevel), - "offsetof mismatch for TextureCopyView::mipLevel"); - static_assert(offsetof(TextureCopyView, arrayLayer) == offsetof(WGPUTextureCopyView, arrayLayer), - "offsetof mismatch for TextureCopyView::arrayLayer"); - static_assert(offsetof(TextureCopyView, origin) == offsetof(WGPUTextureCopyView, origin), - "offsetof mismatch for TextureCopyView::origin"); - - - static_assert(sizeof(TextureDescriptor) == sizeof(WGPUTextureDescriptor), "sizeof mismatch for TextureDescriptor"); - static_assert(alignof(TextureDescriptor) == alignof(WGPUTextureDescriptor), "alignof mismatch for TextureDescriptor"); - - static_assert(offsetof(TextureDescriptor, nextInChain) == offsetof(WGPUTextureDescriptor, nextInChain), - "offsetof mismatch for TextureDescriptor::nextInChain"); - static_assert(offsetof(TextureDescriptor, label) == offsetof(WGPUTextureDescriptor, label), - "offsetof mismatch for TextureDescriptor::label"); - static_assert(offsetof(TextureDescriptor, usage) == offsetof(WGPUTextureDescriptor, usage), - "offsetof mismatch for TextureDescriptor::usage"); - static_assert(offsetof(TextureDescriptor, dimension) == offsetof(WGPUTextureDescriptor, dimension), - "offsetof mismatch for TextureDescriptor::dimension"); - static_assert(offsetof(TextureDescriptor, size) == offsetof(WGPUTextureDescriptor, size), - "offsetof mismatch for TextureDescriptor::size"); - static_assert(offsetof(TextureDescriptor, arrayLayerCount) == offsetof(WGPUTextureDescriptor, arrayLayerCount), - "offsetof mismatch for TextureDescriptor::arrayLayerCount"); - static_assert(offsetof(TextureDescriptor, format) == offsetof(WGPUTextureDescriptor, format), - "offsetof mismatch for TextureDescriptor::format"); - static_assert(offsetof(TextureDescriptor, mipLevelCount) == offsetof(WGPUTextureDescriptor, mipLevelCount), - "offsetof mismatch for TextureDescriptor::mipLevelCount"); - static_assert(offsetof(TextureDescriptor, sampleCount) == offsetof(WGPUTextureDescriptor, sampleCount), - "offsetof mismatch for TextureDescriptor::sampleCount"); - - - static_assert(sizeof(VertexBufferLayoutDescriptor) == sizeof(WGPUVertexBufferLayoutDescriptor), "sizeof mismatch for VertexBufferLayoutDescriptor"); - static_assert(alignof(VertexBufferLayoutDescriptor) == alignof(WGPUVertexBufferLayoutDescriptor), "alignof mismatch for VertexBufferLayoutDescriptor"); - - static_assert(offsetof(VertexBufferLayoutDescriptor, arrayStride) == offsetof(WGPUVertexBufferLayoutDescriptor, arrayStride), - "offsetof mismatch for VertexBufferLayoutDescriptor::arrayStride"); - static_assert(offsetof(VertexBufferLayoutDescriptor, stepMode) == offsetof(WGPUVertexBufferLayoutDescriptor, stepMode), - "offsetof mismatch for VertexBufferLayoutDescriptor::stepMode"); - static_assert(offsetof(VertexBufferLayoutDescriptor, attributeCount) == offsetof(WGPUVertexBufferLayoutDescriptor, attributeCount), - "offsetof mismatch for VertexBufferLayoutDescriptor::attributeCount"); - static_assert(offsetof(VertexBufferLayoutDescriptor, attributes) == offsetof(WGPUVertexBufferLayoutDescriptor, attributes), - "offsetof mismatch for VertexBufferLayoutDescriptor::attributes"); - - - static_assert(sizeof(RenderPassDescriptor) == sizeof(WGPURenderPassDescriptor), "sizeof mismatch for RenderPassDescriptor"); - static_assert(alignof(RenderPassDescriptor) == alignof(WGPURenderPassDescriptor), "alignof mismatch for RenderPassDescriptor"); - - static_assert(offsetof(RenderPassDescriptor, nextInChain) == offsetof(WGPURenderPassDescriptor, nextInChain), - "offsetof mismatch for RenderPassDescriptor::nextInChain"); - static_assert(offsetof(RenderPassDescriptor, label) == offsetof(WGPURenderPassDescriptor, label), - "offsetof mismatch for RenderPassDescriptor::label"); - static_assert(offsetof(RenderPassDescriptor, colorAttachmentCount) == offsetof(WGPURenderPassDescriptor, colorAttachmentCount), - "offsetof mismatch for RenderPassDescriptor::colorAttachmentCount"); - static_assert(offsetof(RenderPassDescriptor, colorAttachments) == offsetof(WGPURenderPassDescriptor, colorAttachments), - "offsetof mismatch for RenderPassDescriptor::colorAttachments"); - static_assert(offsetof(RenderPassDescriptor, depthStencilAttachment) == offsetof(WGPURenderPassDescriptor, depthStencilAttachment), - "offsetof mismatch for RenderPassDescriptor::depthStencilAttachment"); - - - static_assert(sizeof(VertexStateDescriptor) == sizeof(WGPUVertexStateDescriptor), "sizeof mismatch for VertexStateDescriptor"); - static_assert(alignof(VertexStateDescriptor) == alignof(WGPUVertexStateDescriptor), "alignof mismatch for VertexStateDescriptor"); - - static_assert(offsetof(VertexStateDescriptor, nextInChain) == offsetof(WGPUVertexStateDescriptor, nextInChain), - "offsetof mismatch for VertexStateDescriptor::nextInChain"); - static_assert(offsetof(VertexStateDescriptor, indexFormat) == offsetof(WGPUVertexStateDescriptor, indexFormat), - "offsetof mismatch for VertexStateDescriptor::indexFormat"); - static_assert(offsetof(VertexStateDescriptor, vertexBufferCount) == offsetof(WGPUVertexStateDescriptor, vertexBufferCount), - "offsetof mismatch for VertexStateDescriptor::vertexBufferCount"); - static_assert(offsetof(VertexStateDescriptor, vertexBuffers) == offsetof(WGPUVertexStateDescriptor, vertexBuffers), - "offsetof mismatch for VertexStateDescriptor::vertexBuffers"); - - - static_assert(sizeof(RenderPipelineDescriptor) == sizeof(WGPURenderPipelineDescriptor), "sizeof mismatch for RenderPipelineDescriptor"); - static_assert(alignof(RenderPipelineDescriptor) == alignof(WGPURenderPipelineDescriptor), "alignof mismatch for RenderPipelineDescriptor"); - - static_assert(offsetof(RenderPipelineDescriptor, nextInChain) == offsetof(WGPURenderPipelineDescriptor, nextInChain), - "offsetof mismatch for RenderPipelineDescriptor::nextInChain"); - static_assert(offsetof(RenderPipelineDescriptor, label) == offsetof(WGPURenderPipelineDescriptor, label), - "offsetof mismatch for RenderPipelineDescriptor::label"); - static_assert(offsetof(RenderPipelineDescriptor, layout) == offsetof(WGPURenderPipelineDescriptor, layout), - "offsetof mismatch for RenderPipelineDescriptor::layout"); - static_assert(offsetof(RenderPipelineDescriptor, vertexStage) == offsetof(WGPURenderPipelineDescriptor, vertexStage), - "offsetof mismatch for RenderPipelineDescriptor::vertexStage"); - static_assert(offsetof(RenderPipelineDescriptor, fragmentStage) == offsetof(WGPURenderPipelineDescriptor, fragmentStage), - "offsetof mismatch for RenderPipelineDescriptor::fragmentStage"); - static_assert(offsetof(RenderPipelineDescriptor, vertexState) == offsetof(WGPURenderPipelineDescriptor, vertexState), - "offsetof mismatch for RenderPipelineDescriptor::vertexState"); - static_assert(offsetof(RenderPipelineDescriptor, primitiveTopology) == offsetof(WGPURenderPipelineDescriptor, primitiveTopology), - "offsetof mismatch for RenderPipelineDescriptor::primitiveTopology"); - static_assert(offsetof(RenderPipelineDescriptor, rasterizationState) == offsetof(WGPURenderPipelineDescriptor, rasterizationState), - "offsetof mismatch for RenderPipelineDescriptor::rasterizationState"); - static_assert(offsetof(RenderPipelineDescriptor, sampleCount) == offsetof(WGPURenderPipelineDescriptor, sampleCount), - "offsetof mismatch for RenderPipelineDescriptor::sampleCount"); - static_assert(offsetof(RenderPipelineDescriptor, depthStencilState) == offsetof(WGPURenderPipelineDescriptor, depthStencilState), - "offsetof mismatch for RenderPipelineDescriptor::depthStencilState"); - static_assert(offsetof(RenderPipelineDescriptor, colorStateCount) == offsetof(WGPURenderPipelineDescriptor, colorStateCount), - "offsetof mismatch for RenderPipelineDescriptor::colorStateCount"); - static_assert(offsetof(RenderPipelineDescriptor, colorStates) == offsetof(WGPURenderPipelineDescriptor, colorStates), - "offsetof mismatch for RenderPipelineDescriptor::colorStates"); - static_assert(offsetof(RenderPipelineDescriptor, sampleMask) == offsetof(WGPURenderPipelineDescriptor, sampleMask), - "offsetof mismatch for RenderPipelineDescriptor::sampleMask"); - static_assert(offsetof(RenderPipelineDescriptor, alphaToCoverageEnabled) == offsetof(WGPURenderPipelineDescriptor, alphaToCoverageEnabled), - "offsetof mismatch for RenderPipelineDescriptor::alphaToCoverageEnabled"); - - - - static_assert(sizeof(BindGroup) == sizeof(WGPUBindGroup), "sizeof mismatch for BindGroup"); - static_assert(alignof(BindGroup) == alignof(WGPUBindGroup), "alignof mismatch for BindGroup"); - - - - void BindGroup::WGPUReference(WGPUBindGroup handle) { - if (handle != nullptr) { - wgpuBindGroupReference(handle); - } - } - void BindGroup::WGPURelease(WGPUBindGroup handle) { - if (handle != nullptr) { - wgpuBindGroupRelease(handle); - } - } - - - static_assert(sizeof(BindGroupLayout) == sizeof(WGPUBindGroupLayout), "sizeof mismatch for BindGroupLayout"); - static_assert(alignof(BindGroupLayout) == alignof(WGPUBindGroupLayout), "alignof mismatch for BindGroupLayout"); - - - - void BindGroupLayout::WGPUReference(WGPUBindGroupLayout handle) { - if (handle != nullptr) { - wgpuBindGroupLayoutReference(handle); - } - } - void BindGroupLayout::WGPURelease(WGPUBindGroupLayout handle) { - if (handle != nullptr) { - wgpuBindGroupLayoutRelease(handle); - } - } - - - static_assert(sizeof(Buffer) == sizeof(WGPUBuffer), "sizeof mismatch for Buffer"); - static_assert(alignof(Buffer) == alignof(WGPUBuffer), "alignof mismatch for Buffer"); - - - - void Buffer::Destroy() const { - wgpuBufferDestroy(Get()); - } - void Buffer::MapReadAsync(BufferMapReadCallback callback, void * userdata) const { - wgpuBufferMapReadAsync(Get(), callback, reinterpret_cast(userdata)); - } - void Buffer::MapWriteAsync(BufferMapWriteCallback callback, void * userdata) const { - wgpuBufferMapWriteAsync(Get(), callback, reinterpret_cast(userdata)); - } - void Buffer::SetSubData(uint64_t start, uint64_t count, void const * data) const { - wgpuBufferSetSubData(Get(), start, count, reinterpret_cast(data)); - } - void Buffer::Unmap() const { - wgpuBufferUnmap(Get()); - } - void Buffer::WGPUReference(WGPUBuffer handle) { - if (handle != nullptr) { - wgpuBufferReference(handle); - } - } - void Buffer::WGPURelease(WGPUBuffer handle) { - if (handle != nullptr) { - wgpuBufferRelease(handle); - } - } - - - static_assert(sizeof(CommandBuffer) == sizeof(WGPUCommandBuffer), "sizeof mismatch for CommandBuffer"); - static_assert(alignof(CommandBuffer) == alignof(WGPUCommandBuffer), "alignof mismatch for CommandBuffer"); - - - - void CommandBuffer::WGPUReference(WGPUCommandBuffer handle) { - if (handle != nullptr) { - wgpuCommandBufferReference(handle); - } - } - void CommandBuffer::WGPURelease(WGPUCommandBuffer handle) { - if (handle != nullptr) { - wgpuCommandBufferRelease(handle); - } - } - - - static_assert(sizeof(CommandEncoder) == sizeof(WGPUCommandEncoder), "sizeof mismatch for CommandEncoder"); - static_assert(alignof(CommandEncoder) == alignof(WGPUCommandEncoder), "alignof mismatch for CommandEncoder"); - - - - ComputePassEncoder CommandEncoder::BeginComputePass(ComputePassDescriptor const * descriptor) const { - auto result = wgpuCommandEncoderBeginComputePass(Get(), reinterpret_cast(descriptor)); - return ComputePassEncoder::Acquire(result); - } - RenderPassEncoder CommandEncoder::BeginRenderPass(RenderPassDescriptor const * descriptor) const { - auto result = wgpuCommandEncoderBeginRenderPass(Get(), reinterpret_cast(descriptor)); - return RenderPassEncoder::Acquire(result); - } - void CommandEncoder::CopyBufferToBuffer(Buffer const& source, uint64_t sourceOffset, Buffer const& destination, uint64_t destinationOffset, uint64_t size) const { - wgpuCommandEncoderCopyBufferToBuffer(Get(), source.Get(), sourceOffset, destination.Get(), destinationOffset, size); - } - void CommandEncoder::CopyBufferToTexture(BufferCopyView const * source, TextureCopyView const * destination, Extent3D const * copySize) const { - wgpuCommandEncoderCopyBufferToTexture(Get(), reinterpret_cast(source), reinterpret_cast(destination), reinterpret_cast(copySize)); - } - void CommandEncoder::CopyTextureToBuffer(TextureCopyView const * source, BufferCopyView const * destination, Extent3D const * copySize) const { - wgpuCommandEncoderCopyTextureToBuffer(Get(), reinterpret_cast(source), reinterpret_cast(destination), reinterpret_cast(copySize)); - } - void CommandEncoder::CopyTextureToTexture(TextureCopyView const * source, TextureCopyView const * destination, Extent3D const * copySize) const { - wgpuCommandEncoderCopyTextureToTexture(Get(), reinterpret_cast(source), reinterpret_cast(destination), reinterpret_cast(copySize)); - } - CommandBuffer CommandEncoder::Finish(CommandBufferDescriptor const * descriptor) const { - auto result = wgpuCommandEncoderFinish(Get(), reinterpret_cast(descriptor)); - return CommandBuffer::Acquire(result); - } - void CommandEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuCommandEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void CommandEncoder::PopDebugGroup() const { - wgpuCommandEncoderPopDebugGroup(Get()); - } - void CommandEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuCommandEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void CommandEncoder::WGPUReference(WGPUCommandEncoder handle) { - if (handle != nullptr) { - wgpuCommandEncoderReference(handle); - } - } - void CommandEncoder::WGPURelease(WGPUCommandEncoder handle) { - if (handle != nullptr) { - wgpuCommandEncoderRelease(handle); - } - } - - - static_assert(sizeof(ComputePassEncoder) == sizeof(WGPUComputePassEncoder), "sizeof mismatch for ComputePassEncoder"); - static_assert(alignof(ComputePassEncoder) == alignof(WGPUComputePassEncoder), "alignof mismatch for ComputePassEncoder"); - - - - void ComputePassEncoder::Dispatch(uint32_t x, uint32_t y, uint32_t z) const { - wgpuComputePassEncoderDispatch(Get(), x, y, z); - } - void ComputePassEncoder::DispatchIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuComputePassEncoderDispatchIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void ComputePassEncoder::EndPass() const { - wgpuComputePassEncoderEndPass(Get()); - } - void ComputePassEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuComputePassEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void ComputePassEncoder::PopDebugGroup() const { - wgpuComputePassEncoderPopDebugGroup(Get()); - } - void ComputePassEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuComputePassEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void ComputePassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const { - wgpuComputePassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast(dynamicOffsets)); - } - void ComputePassEncoder::SetPipeline(ComputePipeline const& pipeline) const { - wgpuComputePassEncoderSetPipeline(Get(), pipeline.Get()); - } - void ComputePassEncoder::WGPUReference(WGPUComputePassEncoder handle) { - if (handle != nullptr) { - wgpuComputePassEncoderReference(handle); - } - } - void ComputePassEncoder::WGPURelease(WGPUComputePassEncoder handle) { - if (handle != nullptr) { - wgpuComputePassEncoderRelease(handle); - } - } - - - static_assert(sizeof(ComputePipeline) == sizeof(WGPUComputePipeline), "sizeof mismatch for ComputePipeline"); - static_assert(alignof(ComputePipeline) == alignof(WGPUComputePipeline), "alignof mismatch for ComputePipeline"); - - - - BindGroupLayout ComputePipeline::GetBindGroupLayout(uint32_t groupIndex) const { - auto result = wgpuComputePipelineGetBindGroupLayout(Get(), groupIndex); - return BindGroupLayout::Acquire(result); - } - void ComputePipeline::WGPUReference(WGPUComputePipeline handle) { - if (handle != nullptr) { - wgpuComputePipelineReference(handle); - } - } - void ComputePipeline::WGPURelease(WGPUComputePipeline handle) { - if (handle != nullptr) { - wgpuComputePipelineRelease(handle); - } - } - - - static_assert(sizeof(Device) == sizeof(WGPUDevice), "sizeof mismatch for Device"); - static_assert(alignof(Device) == alignof(WGPUDevice), "alignof mismatch for Device"); - - - - BindGroup Device::CreateBindGroup(BindGroupDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBindGroup(Get(), reinterpret_cast(descriptor)); - return BindGroup::Acquire(result); - } - BindGroupLayout Device::CreateBindGroupLayout(BindGroupLayoutDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBindGroupLayout(Get(), reinterpret_cast(descriptor)); - return BindGroupLayout::Acquire(result); - } - Buffer Device::CreateBuffer(BufferDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBuffer(Get(), reinterpret_cast(descriptor)); - return Buffer::Acquire(result); - } - CreateBufferMappedResult Device::CreateBufferMapped(BufferDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBufferMapped(Get(), reinterpret_cast(descriptor)); - return CreateBufferMappedResult { - Buffer::Acquire(result.buffer), - result.dataLength, - result.data - }; - } - CommandEncoder Device::CreateCommandEncoder(CommandEncoderDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateCommandEncoder(Get(), reinterpret_cast(descriptor)); - return CommandEncoder::Acquire(result); - } - ComputePipeline Device::CreateComputePipeline(ComputePipelineDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateComputePipeline(Get(), reinterpret_cast(descriptor)); - return ComputePipeline::Acquire(result); - } - PipelineLayout Device::CreatePipelineLayout(PipelineLayoutDescriptor const * descriptor) const { - auto result = wgpuDeviceCreatePipelineLayout(Get(), reinterpret_cast(descriptor)); - return PipelineLayout::Acquire(result); - } - RenderBundleEncoder Device::CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateRenderBundleEncoder(Get(), reinterpret_cast(descriptor)); - return RenderBundleEncoder::Acquire(result); - } - RenderPipeline Device::CreateRenderPipeline(RenderPipelineDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateRenderPipeline(Get(), reinterpret_cast(descriptor)); - return RenderPipeline::Acquire(result); - } - Sampler Device::CreateSampler(SamplerDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateSampler(Get(), reinterpret_cast(descriptor)); - return Sampler::Acquire(result); - } - ShaderModule Device::CreateShaderModule(ShaderModuleDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateShaderModule(Get(), reinterpret_cast(descriptor)); - return ShaderModule::Acquire(result); - } - SwapChain Device::CreateSwapChain(Surface const& surface, SwapChainDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateSwapChain(Get(), surface.Get(), reinterpret_cast(descriptor)); - return SwapChain::Acquire(result); - } - Texture Device::CreateTexture(TextureDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateTexture(Get(), reinterpret_cast(descriptor)); - return Texture::Acquire(result); - } - Queue Device::GetDefaultQueue() const { - auto result = wgpuDeviceGetDefaultQueue(Get()); - return Queue::Acquire(result); - } - void Device::InjectError(ErrorType type, char const * message) const { - wgpuDeviceInjectError(Get(), static_cast(type), reinterpret_cast(message)); - } - void Device::LoseForTesting() const { - wgpuDeviceLoseForTesting(Get()); - } - bool Device::PopErrorScope(ErrorCallback callback, void * userdata) const { - auto result = wgpuDevicePopErrorScope(Get(), callback, reinterpret_cast(userdata)); - return result; - } - void Device::PushErrorScope(ErrorFilter filter) const { - wgpuDevicePushErrorScope(Get(), static_cast(filter)); - } - void Device::SetDeviceLostCallback(DeviceLostCallback callback, void * userdata) const { - wgpuDeviceSetDeviceLostCallback(Get(), callback, reinterpret_cast(userdata)); - } - void Device::SetUncapturedErrorCallback(ErrorCallback callback, void * userdata) const { - wgpuDeviceSetUncapturedErrorCallback(Get(), callback, reinterpret_cast(userdata)); - } - void Device::Tick() const { - wgpuDeviceTick(Get()); - } - void Device::WGPUReference(WGPUDevice handle) { - if (handle != nullptr) { - wgpuDeviceReference(handle); - } - } - void Device::WGPURelease(WGPUDevice handle) { - if (handle != nullptr) { - wgpuDeviceRelease(handle); - } - } - - - static_assert(sizeof(Fence) == sizeof(WGPUFence), "sizeof mismatch for Fence"); - static_assert(alignof(Fence) == alignof(WGPUFence), "alignof mismatch for Fence"); - - - - uint64_t Fence::GetCompletedValue() const { - auto result = wgpuFenceGetCompletedValue(Get()); - return result; - } - void Fence::OnCompletion(uint64_t value, FenceOnCompletionCallback callback, void * userdata) const { - wgpuFenceOnCompletion(Get(), value, callback, reinterpret_cast(userdata)); - } - void Fence::WGPUReference(WGPUFence handle) { - if (handle != nullptr) { - wgpuFenceReference(handle); - } - } - void Fence::WGPURelease(WGPUFence handle) { - if (handle != nullptr) { - wgpuFenceRelease(handle); - } - } - - - static_assert(sizeof(Instance) == sizeof(WGPUInstance), "sizeof mismatch for Instance"); - static_assert(alignof(Instance) == alignof(WGPUInstance), "alignof mismatch for Instance"); - - - - Surface Instance::CreateSurface(SurfaceDescriptor const * descriptor) const { - auto result = wgpuInstanceCreateSurface(Get(), reinterpret_cast(descriptor)); - return Surface::Acquire(result); - } - void Instance::WGPUReference(WGPUInstance handle) { - if (handle != nullptr) { - wgpuInstanceReference(handle); - } - } - void Instance::WGPURelease(WGPUInstance handle) { - if (handle != nullptr) { - wgpuInstanceRelease(handle); - } - } - - - static_assert(sizeof(PipelineLayout) == sizeof(WGPUPipelineLayout), "sizeof mismatch for PipelineLayout"); - static_assert(alignof(PipelineLayout) == alignof(WGPUPipelineLayout), "alignof mismatch for PipelineLayout"); - - - - void PipelineLayout::WGPUReference(WGPUPipelineLayout handle) { - if (handle != nullptr) { - wgpuPipelineLayoutReference(handle); - } - } - void PipelineLayout::WGPURelease(WGPUPipelineLayout handle) { - if (handle != nullptr) { - wgpuPipelineLayoutRelease(handle); - } - } - - - static_assert(sizeof(Queue) == sizeof(WGPUQueue), "sizeof mismatch for Queue"); - static_assert(alignof(Queue) == alignof(WGPUQueue), "alignof mismatch for Queue"); - - - - Fence Queue::CreateFence(FenceDescriptor const * descriptor) const { - auto result = wgpuQueueCreateFence(Get(), reinterpret_cast(descriptor)); - return Fence::Acquire(result); - } - void Queue::Signal(Fence const& fence, uint64_t signalValue) const { - wgpuQueueSignal(Get(), fence.Get(), signalValue); - } - void Queue::Submit(uint32_t commandCount, CommandBuffer const * commands) const { - wgpuQueueSubmit(Get(), commandCount, reinterpret_cast(commands)); - } - void Queue::WGPUReference(WGPUQueue handle) { - if (handle != nullptr) { - wgpuQueueReference(handle); - } - } - void Queue::WGPURelease(WGPUQueue handle) { - if (handle != nullptr) { - wgpuQueueRelease(handle); - } - } - - - static_assert(sizeof(RenderBundle) == sizeof(WGPURenderBundle), "sizeof mismatch for RenderBundle"); - static_assert(alignof(RenderBundle) == alignof(WGPURenderBundle), "alignof mismatch for RenderBundle"); - - - - void RenderBundle::WGPUReference(WGPURenderBundle handle) { - if (handle != nullptr) { - wgpuRenderBundleReference(handle); - } - } - void RenderBundle::WGPURelease(WGPURenderBundle handle) { - if (handle != nullptr) { - wgpuRenderBundleRelease(handle); - } - } - - - static_assert(sizeof(RenderBundleEncoder) == sizeof(WGPURenderBundleEncoder), "sizeof mismatch for RenderBundleEncoder"); - static_assert(alignof(RenderBundleEncoder) == alignof(WGPURenderBundleEncoder), "alignof mismatch for RenderBundleEncoder"); - - - - void RenderBundleEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const { - wgpuRenderBundleEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance); - } - void RenderBundleEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const { - wgpuRenderBundleEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance); - } - void RenderBundleEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderBundleEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void RenderBundleEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderBundleEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - RenderBundle RenderBundleEncoder::Finish(RenderBundleDescriptor const * descriptor) const { - auto result = wgpuRenderBundleEncoderFinish(Get(), reinterpret_cast(descriptor)); - return RenderBundle::Acquire(result); - } - void RenderBundleEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuRenderBundleEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void RenderBundleEncoder::PopDebugGroup() const { - wgpuRenderBundleEncoderPopDebugGroup(Get()); - } - void RenderBundleEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuRenderBundleEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void RenderBundleEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const { - wgpuRenderBundleEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast(dynamicOffsets)); - } - void RenderBundleEncoder::SetIndexBuffer(Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderBundleEncoderSetIndexBuffer(Get(), buffer.Get(), offset, size); - } - void RenderBundleEncoder::SetPipeline(RenderPipeline const& pipeline) const { - wgpuRenderBundleEncoderSetPipeline(Get(), pipeline.Get()); - } - void RenderBundleEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderBundleEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size); - } - void RenderBundleEncoder::WGPUReference(WGPURenderBundleEncoder handle) { - if (handle != nullptr) { - wgpuRenderBundleEncoderReference(handle); - } - } - void RenderBundleEncoder::WGPURelease(WGPURenderBundleEncoder handle) { - if (handle != nullptr) { - wgpuRenderBundleEncoderRelease(handle); - } - } - - - static_assert(sizeof(RenderPassEncoder) == sizeof(WGPURenderPassEncoder), "sizeof mismatch for RenderPassEncoder"); - static_assert(alignof(RenderPassEncoder) == alignof(WGPURenderPassEncoder), "alignof mismatch for RenderPassEncoder"); - - - - void RenderPassEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const { - wgpuRenderPassEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance); - } - void RenderPassEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const { - wgpuRenderPassEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance); - } - void RenderPassEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderPassEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void RenderPassEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderPassEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void RenderPassEncoder::EndPass() const { - wgpuRenderPassEncoderEndPass(Get()); - } - void RenderPassEncoder::ExecuteBundles(uint32_t bundlesCount, RenderBundle const * bundles) const { - wgpuRenderPassEncoderExecuteBundles(Get(), bundlesCount, reinterpret_cast(bundles)); - } - void RenderPassEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuRenderPassEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void RenderPassEncoder::PopDebugGroup() const { - wgpuRenderPassEncoderPopDebugGroup(Get()); - } - void RenderPassEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuRenderPassEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void RenderPassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const { - wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast(dynamicOffsets)); - } - void RenderPassEncoder::SetBlendColor(Color const * color) const { - wgpuRenderPassEncoderSetBlendColor(Get(), reinterpret_cast(color)); - } - void RenderPassEncoder::SetIndexBuffer(Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderPassEncoderSetIndexBuffer(Get(), buffer.Get(), offset, size); - } - void RenderPassEncoder::SetPipeline(RenderPipeline const& pipeline) const { - wgpuRenderPassEncoderSetPipeline(Get(), pipeline.Get()); - } - void RenderPassEncoder::SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const { - wgpuRenderPassEncoderSetScissorRect(Get(), x, y, width, height); - } - void RenderPassEncoder::SetStencilReference(uint32_t reference) const { - wgpuRenderPassEncoderSetStencilReference(Get(), reference); - } - void RenderPassEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderPassEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size); - } - void RenderPassEncoder::SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const { - wgpuRenderPassEncoderSetViewport(Get(), x, y, width, height, minDepth, maxDepth); - } - void RenderPassEncoder::WGPUReference(WGPURenderPassEncoder handle) { - if (handle != nullptr) { - wgpuRenderPassEncoderReference(handle); - } - } - void RenderPassEncoder::WGPURelease(WGPURenderPassEncoder handle) { - if (handle != nullptr) { - wgpuRenderPassEncoderRelease(handle); - } - } - - - static_assert(sizeof(RenderPipeline) == sizeof(WGPURenderPipeline), "sizeof mismatch for RenderPipeline"); - static_assert(alignof(RenderPipeline) == alignof(WGPURenderPipeline), "alignof mismatch for RenderPipeline"); - - - - BindGroupLayout RenderPipeline::GetBindGroupLayout(uint32_t groupIndex) const { - auto result = wgpuRenderPipelineGetBindGroupLayout(Get(), groupIndex); - return BindGroupLayout::Acquire(result); - } - void RenderPipeline::WGPUReference(WGPURenderPipeline handle) { - if (handle != nullptr) { - wgpuRenderPipelineReference(handle); - } - } - void RenderPipeline::WGPURelease(WGPURenderPipeline handle) { - if (handle != nullptr) { - wgpuRenderPipelineRelease(handle); - } - } - - - static_assert(sizeof(Sampler) == sizeof(WGPUSampler), "sizeof mismatch for Sampler"); - static_assert(alignof(Sampler) == alignof(WGPUSampler), "alignof mismatch for Sampler"); - - - - void Sampler::WGPUReference(WGPUSampler handle) { - if (handle != nullptr) { - wgpuSamplerReference(handle); - } - } - void Sampler::WGPURelease(WGPUSampler handle) { - if (handle != nullptr) { - wgpuSamplerRelease(handle); - } - } - - - static_assert(sizeof(ShaderModule) == sizeof(WGPUShaderModule), "sizeof mismatch for ShaderModule"); - static_assert(alignof(ShaderModule) == alignof(WGPUShaderModule), "alignof mismatch for ShaderModule"); - - - - void ShaderModule::WGPUReference(WGPUShaderModule handle) { - if (handle != nullptr) { - wgpuShaderModuleReference(handle); - } - } - void ShaderModule::WGPURelease(WGPUShaderModule handle) { - if (handle != nullptr) { - wgpuShaderModuleRelease(handle); - } - } - - - static_assert(sizeof(Surface) == sizeof(WGPUSurface), "sizeof mismatch for Surface"); - static_assert(alignof(Surface) == alignof(WGPUSurface), "alignof mismatch for Surface"); - - - - void Surface::WGPUReference(WGPUSurface handle) { - if (handle != nullptr) { - wgpuSurfaceReference(handle); - } - } - void Surface::WGPURelease(WGPUSurface handle) { - if (handle != nullptr) { - wgpuSurfaceRelease(handle); - } - } - - - static_assert(sizeof(SwapChain) == sizeof(WGPUSwapChain), "sizeof mismatch for SwapChain"); - static_assert(alignof(SwapChain) == alignof(WGPUSwapChain), "alignof mismatch for SwapChain"); - - - - void SwapChain::Configure(TextureFormat format, TextureUsage allowedUsage, uint32_t width, uint32_t height) const { - wgpuSwapChainConfigure(Get(), static_cast(format), static_cast(allowedUsage), width, height); - } - TextureView SwapChain::GetCurrentTextureView() const { - auto result = wgpuSwapChainGetCurrentTextureView(Get()); - return TextureView::Acquire(result); - } - void SwapChain::Present() const { - wgpuSwapChainPresent(Get()); - } - void SwapChain::WGPUReference(WGPUSwapChain handle) { - if (handle != nullptr) { - wgpuSwapChainReference(handle); - } - } - void SwapChain::WGPURelease(WGPUSwapChain handle) { - if (handle != nullptr) { - wgpuSwapChainRelease(handle); - } - } - - - static_assert(sizeof(Texture) == sizeof(WGPUTexture), "sizeof mismatch for Texture"); - static_assert(alignof(Texture) == alignof(WGPUTexture), "alignof mismatch for Texture"); - - - - TextureView Texture::CreateView(TextureViewDescriptor const * descriptor) const { - auto result = wgpuTextureCreateView(Get(), reinterpret_cast(descriptor)); - return TextureView::Acquire(result); - } - void Texture::Destroy() const { - wgpuTextureDestroy(Get()); - } - void Texture::WGPUReference(WGPUTexture handle) { - if (handle != nullptr) { - wgpuTextureReference(handle); - } - } - void Texture::WGPURelease(WGPUTexture handle) { - if (handle != nullptr) { - wgpuTextureRelease(handle); - } - } - - - static_assert(sizeof(TextureView) == sizeof(WGPUTextureView), "sizeof mismatch for TextureView"); - static_assert(alignof(TextureView) == alignof(WGPUTextureView), "alignof mismatch for TextureView"); - - - - void TextureView::WGPUReference(WGPUTextureView handle) { - if (handle != nullptr) { - wgpuTextureViewReference(handle); - } - } - void TextureView::WGPURelease(WGPUTextureView handle) { - if (handle != nullptr) { - wgpuTextureViewRelease(handle); - } - } - - - Instance CreateInstance(const InstanceDescriptor* descriptor) { - const WGPUInstanceDescriptor* cDescriptor = - reinterpret_cast(descriptor); - return Instance::Acquire(wgpuCreateInstance(cDescriptor)); - } - - Proc GetProcAddress(Device const& device, const char* procName) { - return reinterpret_cast(wgpuGetProcAddress(device.Get(), procName)); - } - -} diff --git a/3rdparty/include/webgpu/lib/libshaderc.so b/3rdparty/include/webgpu/lib/libshaderc.so deleted file mode 100755 index 956a15386775..000000000000 Binary files a/3rdparty/include/webgpu/lib/libshaderc.so and /dev/null differ diff --git a/3rdparty/include/webgpu/lib/webgpu_cpp.cpp b/3rdparty/include/webgpu/lib/webgpu_cpp.cpp deleted file mode 100644 index fd324184007c..000000000000 --- a/3rdparty/include/webgpu/lib/webgpu_cpp.cpp +++ /dev/null @@ -1,1746 +0,0 @@ - -#include "dawn/webgpu_cpp.h" - -namespace wgpu { - - - static_assert(sizeof(AdapterType) == sizeof(WGPUAdapterType), "sizeof mismatch for AdapterType"); - static_assert(alignof(AdapterType) == alignof(WGPUAdapterType), "alignof mismatch for AdapterType"); - - static_assert(static_cast(AdapterType::DiscreteGPU) == WGPUAdapterType_DiscreteGPU, "value mismatch for AdapterType::DiscreteGPU"); - static_assert(static_cast(AdapterType::IntegratedGPU) == WGPUAdapterType_IntegratedGPU, "value mismatch for AdapterType::IntegratedGPU"); - static_assert(static_cast(AdapterType::CPU) == WGPUAdapterType_CPU, "value mismatch for AdapterType::CPU"); - static_assert(static_cast(AdapterType::Unknown) == WGPUAdapterType_Unknown, "value mismatch for AdapterType::Unknown"); - - - static_assert(sizeof(AddressMode) == sizeof(WGPUAddressMode), "sizeof mismatch for AddressMode"); - static_assert(alignof(AddressMode) == alignof(WGPUAddressMode), "alignof mismatch for AddressMode"); - - static_assert(static_cast(AddressMode::Repeat) == WGPUAddressMode_Repeat, "value mismatch for AddressMode::Repeat"); - static_assert(static_cast(AddressMode::MirrorRepeat) == WGPUAddressMode_MirrorRepeat, "value mismatch for AddressMode::MirrorRepeat"); - static_assert(static_cast(AddressMode::ClampToEdge) == WGPUAddressMode_ClampToEdge, "value mismatch for AddressMode::ClampToEdge"); - - - static_assert(sizeof(BackendType) == sizeof(WGPUBackendType), "sizeof mismatch for BackendType"); - static_assert(alignof(BackendType) == alignof(WGPUBackendType), "alignof mismatch for BackendType"); - - static_assert(static_cast(BackendType::Null) == WGPUBackendType_Null, "value mismatch for BackendType::Null"); - static_assert(static_cast(BackendType::D3D11) == WGPUBackendType_D3D11, "value mismatch for BackendType::D3D11"); - static_assert(static_cast(BackendType::D3D12) == WGPUBackendType_D3D12, "value mismatch for BackendType::D3D12"); - static_assert(static_cast(BackendType::Metal) == WGPUBackendType_Metal, "value mismatch for BackendType::Metal"); - static_assert(static_cast(BackendType::Vulkan) == WGPUBackendType_Vulkan, "value mismatch for BackendType::Vulkan"); - static_assert(static_cast(BackendType::OpenGL) == WGPUBackendType_OpenGL, "value mismatch for BackendType::OpenGL"); - static_assert(static_cast(BackendType::OpenGLES) == WGPUBackendType_OpenGLES, "value mismatch for BackendType::OpenGLES"); - - - static_assert(sizeof(BindingType) == sizeof(WGPUBindingType), "sizeof mismatch for BindingType"); - static_assert(alignof(BindingType) == alignof(WGPUBindingType), "alignof mismatch for BindingType"); - - static_assert(static_cast(BindingType::UniformBuffer) == WGPUBindingType_UniformBuffer, "value mismatch for BindingType::UniformBuffer"); - static_assert(static_cast(BindingType::StorageBuffer) == WGPUBindingType_StorageBuffer, "value mismatch for BindingType::StorageBuffer"); - static_assert(static_cast(BindingType::ReadonlyStorageBuffer) == WGPUBindingType_ReadonlyStorageBuffer, "value mismatch for BindingType::ReadonlyStorageBuffer"); - static_assert(static_cast(BindingType::Sampler) == WGPUBindingType_Sampler, "value mismatch for BindingType::Sampler"); - static_assert(static_cast(BindingType::ComparisonSampler) == WGPUBindingType_ComparisonSampler, "value mismatch for BindingType::ComparisonSampler"); - static_assert(static_cast(BindingType::SampledTexture) == WGPUBindingType_SampledTexture, "value mismatch for BindingType::SampledTexture"); - static_assert(static_cast(BindingType::StorageTexture) == WGPUBindingType_StorageTexture, "value mismatch for BindingType::StorageTexture"); - static_assert(static_cast(BindingType::ReadonlyStorageTexture) == WGPUBindingType_ReadonlyStorageTexture, "value mismatch for BindingType::ReadonlyStorageTexture"); - static_assert(static_cast(BindingType::WriteonlyStorageTexture) == WGPUBindingType_WriteonlyStorageTexture, "value mismatch for BindingType::WriteonlyStorageTexture"); - - - static_assert(sizeof(BlendFactor) == sizeof(WGPUBlendFactor), "sizeof mismatch for BlendFactor"); - static_assert(alignof(BlendFactor) == alignof(WGPUBlendFactor), "alignof mismatch for BlendFactor"); - - static_assert(static_cast(BlendFactor::Zero) == WGPUBlendFactor_Zero, "value mismatch for BlendFactor::Zero"); - static_assert(static_cast(BlendFactor::One) == WGPUBlendFactor_One, "value mismatch for BlendFactor::One"); - static_assert(static_cast(BlendFactor::SrcColor) == WGPUBlendFactor_SrcColor, "value mismatch for BlendFactor::SrcColor"); - static_assert(static_cast(BlendFactor::OneMinusSrcColor) == WGPUBlendFactor_OneMinusSrcColor, "value mismatch for BlendFactor::OneMinusSrcColor"); - static_assert(static_cast(BlendFactor::SrcAlpha) == WGPUBlendFactor_SrcAlpha, "value mismatch for BlendFactor::SrcAlpha"); - static_assert(static_cast(BlendFactor::OneMinusSrcAlpha) == WGPUBlendFactor_OneMinusSrcAlpha, "value mismatch for BlendFactor::OneMinusSrcAlpha"); - static_assert(static_cast(BlendFactor::DstColor) == WGPUBlendFactor_DstColor, "value mismatch for BlendFactor::DstColor"); - static_assert(static_cast(BlendFactor::OneMinusDstColor) == WGPUBlendFactor_OneMinusDstColor, "value mismatch for BlendFactor::OneMinusDstColor"); - static_assert(static_cast(BlendFactor::DstAlpha) == WGPUBlendFactor_DstAlpha, "value mismatch for BlendFactor::DstAlpha"); - static_assert(static_cast(BlendFactor::OneMinusDstAlpha) == WGPUBlendFactor_OneMinusDstAlpha, "value mismatch for BlendFactor::OneMinusDstAlpha"); - static_assert(static_cast(BlendFactor::SrcAlphaSaturated) == WGPUBlendFactor_SrcAlphaSaturated, "value mismatch for BlendFactor::SrcAlphaSaturated"); - static_assert(static_cast(BlendFactor::BlendColor) == WGPUBlendFactor_BlendColor, "value mismatch for BlendFactor::BlendColor"); - static_assert(static_cast(BlendFactor::OneMinusBlendColor) == WGPUBlendFactor_OneMinusBlendColor, "value mismatch for BlendFactor::OneMinusBlendColor"); - - - static_assert(sizeof(BlendOperation) == sizeof(WGPUBlendOperation), "sizeof mismatch for BlendOperation"); - static_assert(alignof(BlendOperation) == alignof(WGPUBlendOperation), "alignof mismatch for BlendOperation"); - - static_assert(static_cast(BlendOperation::Add) == WGPUBlendOperation_Add, "value mismatch for BlendOperation::Add"); - static_assert(static_cast(BlendOperation::Subtract) == WGPUBlendOperation_Subtract, "value mismatch for BlendOperation::Subtract"); - static_assert(static_cast(BlendOperation::ReverseSubtract) == WGPUBlendOperation_ReverseSubtract, "value mismatch for BlendOperation::ReverseSubtract"); - static_assert(static_cast(BlendOperation::Min) == WGPUBlendOperation_Min, "value mismatch for BlendOperation::Min"); - static_assert(static_cast(BlendOperation::Max) == WGPUBlendOperation_Max, "value mismatch for BlendOperation::Max"); - - - static_assert(sizeof(BufferMapAsyncStatus) == sizeof(WGPUBufferMapAsyncStatus), "sizeof mismatch for BufferMapAsyncStatus"); - static_assert(alignof(BufferMapAsyncStatus) == alignof(WGPUBufferMapAsyncStatus), "alignof mismatch for BufferMapAsyncStatus"); - - static_assert(static_cast(BufferMapAsyncStatus::Success) == WGPUBufferMapAsyncStatus_Success, "value mismatch for BufferMapAsyncStatus::Success"); - static_assert(static_cast(BufferMapAsyncStatus::Error) == WGPUBufferMapAsyncStatus_Error, "value mismatch for BufferMapAsyncStatus::Error"); - static_assert(static_cast(BufferMapAsyncStatus::Unknown) == WGPUBufferMapAsyncStatus_Unknown, "value mismatch for BufferMapAsyncStatus::Unknown"); - static_assert(static_cast(BufferMapAsyncStatus::DeviceLost) == WGPUBufferMapAsyncStatus_DeviceLost, "value mismatch for BufferMapAsyncStatus::DeviceLost"); - - - static_assert(sizeof(CompareFunction) == sizeof(WGPUCompareFunction), "sizeof mismatch for CompareFunction"); - static_assert(alignof(CompareFunction) == alignof(WGPUCompareFunction), "alignof mismatch for CompareFunction"); - - static_assert(static_cast(CompareFunction::Undefined) == WGPUCompareFunction_Undefined, "value mismatch for CompareFunction::Undefined"); - static_assert(static_cast(CompareFunction::Never) == WGPUCompareFunction_Never, "value mismatch for CompareFunction::Never"); - static_assert(static_cast(CompareFunction::Less) == WGPUCompareFunction_Less, "value mismatch for CompareFunction::Less"); - static_assert(static_cast(CompareFunction::LessEqual) == WGPUCompareFunction_LessEqual, "value mismatch for CompareFunction::LessEqual"); - static_assert(static_cast(CompareFunction::Greater) == WGPUCompareFunction_Greater, "value mismatch for CompareFunction::Greater"); - static_assert(static_cast(CompareFunction::GreaterEqual) == WGPUCompareFunction_GreaterEqual, "value mismatch for CompareFunction::GreaterEqual"); - static_assert(static_cast(CompareFunction::Equal) == WGPUCompareFunction_Equal, "value mismatch for CompareFunction::Equal"); - static_assert(static_cast(CompareFunction::NotEqual) == WGPUCompareFunction_NotEqual, "value mismatch for CompareFunction::NotEqual"); - static_assert(static_cast(CompareFunction::Always) == WGPUCompareFunction_Always, "value mismatch for CompareFunction::Always"); - - - static_assert(sizeof(CullMode) == sizeof(WGPUCullMode), "sizeof mismatch for CullMode"); - static_assert(alignof(CullMode) == alignof(WGPUCullMode), "alignof mismatch for CullMode"); - - static_assert(static_cast(CullMode::None) == WGPUCullMode_None, "value mismatch for CullMode::None"); - static_assert(static_cast(CullMode::Front) == WGPUCullMode_Front, "value mismatch for CullMode::Front"); - static_assert(static_cast(CullMode::Back) == WGPUCullMode_Back, "value mismatch for CullMode::Back"); - - - static_assert(sizeof(ErrorFilter) == sizeof(WGPUErrorFilter), "sizeof mismatch for ErrorFilter"); - static_assert(alignof(ErrorFilter) == alignof(WGPUErrorFilter), "alignof mismatch for ErrorFilter"); - - static_assert(static_cast(ErrorFilter::None) == WGPUErrorFilter_None, "value mismatch for ErrorFilter::None"); - static_assert(static_cast(ErrorFilter::Validation) == WGPUErrorFilter_Validation, "value mismatch for ErrorFilter::Validation"); - static_assert(static_cast(ErrorFilter::OutOfMemory) == WGPUErrorFilter_OutOfMemory, "value mismatch for ErrorFilter::OutOfMemory"); - - - static_assert(sizeof(ErrorType) == sizeof(WGPUErrorType), "sizeof mismatch for ErrorType"); - static_assert(alignof(ErrorType) == alignof(WGPUErrorType), "alignof mismatch for ErrorType"); - - static_assert(static_cast(ErrorType::NoError) == WGPUErrorType_NoError, "value mismatch for ErrorType::NoError"); - static_assert(static_cast(ErrorType::Validation) == WGPUErrorType_Validation, "value mismatch for ErrorType::Validation"); - static_assert(static_cast(ErrorType::OutOfMemory) == WGPUErrorType_OutOfMemory, "value mismatch for ErrorType::OutOfMemory"); - static_assert(static_cast(ErrorType::Unknown) == WGPUErrorType_Unknown, "value mismatch for ErrorType::Unknown"); - static_assert(static_cast(ErrorType::DeviceLost) == WGPUErrorType_DeviceLost, "value mismatch for ErrorType::DeviceLost"); - - - static_assert(sizeof(FenceCompletionStatus) == sizeof(WGPUFenceCompletionStatus), "sizeof mismatch for FenceCompletionStatus"); - static_assert(alignof(FenceCompletionStatus) == alignof(WGPUFenceCompletionStatus), "alignof mismatch for FenceCompletionStatus"); - - static_assert(static_cast(FenceCompletionStatus::Success) == WGPUFenceCompletionStatus_Success, "value mismatch for FenceCompletionStatus::Success"); - static_assert(static_cast(FenceCompletionStatus::Error) == WGPUFenceCompletionStatus_Error, "value mismatch for FenceCompletionStatus::Error"); - static_assert(static_cast(FenceCompletionStatus::Unknown) == WGPUFenceCompletionStatus_Unknown, "value mismatch for FenceCompletionStatus::Unknown"); - static_assert(static_cast(FenceCompletionStatus::DeviceLost) == WGPUFenceCompletionStatus_DeviceLost, "value mismatch for FenceCompletionStatus::DeviceLost"); - - - static_assert(sizeof(FilterMode) == sizeof(WGPUFilterMode), "sizeof mismatch for FilterMode"); - static_assert(alignof(FilterMode) == alignof(WGPUFilterMode), "alignof mismatch for FilterMode"); - - static_assert(static_cast(FilterMode::Nearest) == WGPUFilterMode_Nearest, "value mismatch for FilterMode::Nearest"); - static_assert(static_cast(FilterMode::Linear) == WGPUFilterMode_Linear, "value mismatch for FilterMode::Linear"); - - - static_assert(sizeof(FrontFace) == sizeof(WGPUFrontFace), "sizeof mismatch for FrontFace"); - static_assert(alignof(FrontFace) == alignof(WGPUFrontFace), "alignof mismatch for FrontFace"); - - static_assert(static_cast(FrontFace::CCW) == WGPUFrontFace_CCW, "value mismatch for FrontFace::CCW"); - static_assert(static_cast(FrontFace::CW) == WGPUFrontFace_CW, "value mismatch for FrontFace::CW"); - - - static_assert(sizeof(IndexFormat) == sizeof(WGPUIndexFormat), "sizeof mismatch for IndexFormat"); - static_assert(alignof(IndexFormat) == alignof(WGPUIndexFormat), "alignof mismatch for IndexFormat"); - - static_assert(static_cast(IndexFormat::Uint16) == WGPUIndexFormat_Uint16, "value mismatch for IndexFormat::Uint16"); - static_assert(static_cast(IndexFormat::Uint32) == WGPUIndexFormat_Uint32, "value mismatch for IndexFormat::Uint32"); - - - static_assert(sizeof(InputStepMode) == sizeof(WGPUInputStepMode), "sizeof mismatch for InputStepMode"); - static_assert(alignof(InputStepMode) == alignof(WGPUInputStepMode), "alignof mismatch for InputStepMode"); - - static_assert(static_cast(InputStepMode::Vertex) == WGPUInputStepMode_Vertex, "value mismatch for InputStepMode::Vertex"); - static_assert(static_cast(InputStepMode::Instance) == WGPUInputStepMode_Instance, "value mismatch for InputStepMode::Instance"); - - - static_assert(sizeof(LoadOp) == sizeof(WGPULoadOp), "sizeof mismatch for LoadOp"); - static_assert(alignof(LoadOp) == alignof(WGPULoadOp), "alignof mismatch for LoadOp"); - - static_assert(static_cast(LoadOp::Clear) == WGPULoadOp_Clear, "value mismatch for LoadOp::Clear"); - static_assert(static_cast(LoadOp::Load) == WGPULoadOp_Load, "value mismatch for LoadOp::Load"); - - - static_assert(sizeof(PresentMode) == sizeof(WGPUPresentMode), "sizeof mismatch for PresentMode"); - static_assert(alignof(PresentMode) == alignof(WGPUPresentMode), "alignof mismatch for PresentMode"); - - static_assert(static_cast(PresentMode::Immediate) == WGPUPresentMode_Immediate, "value mismatch for PresentMode::Immediate"); - static_assert(static_cast(PresentMode::Mailbox) == WGPUPresentMode_Mailbox, "value mismatch for PresentMode::Mailbox"); - static_assert(static_cast(PresentMode::Fifo) == WGPUPresentMode_Fifo, "value mismatch for PresentMode::Fifo"); - - - static_assert(sizeof(PrimitiveTopology) == sizeof(WGPUPrimitiveTopology), "sizeof mismatch for PrimitiveTopology"); - static_assert(alignof(PrimitiveTopology) == alignof(WGPUPrimitiveTopology), "alignof mismatch for PrimitiveTopology"); - - static_assert(static_cast(PrimitiveTopology::PointList) == WGPUPrimitiveTopology_PointList, "value mismatch for PrimitiveTopology::PointList"); - static_assert(static_cast(PrimitiveTopology::LineList) == WGPUPrimitiveTopology_LineList, "value mismatch for PrimitiveTopology::LineList"); - static_assert(static_cast(PrimitiveTopology::LineStrip) == WGPUPrimitiveTopology_LineStrip, "value mismatch for PrimitiveTopology::LineStrip"); - static_assert(static_cast(PrimitiveTopology::TriangleList) == WGPUPrimitiveTopology_TriangleList, "value mismatch for PrimitiveTopology::TriangleList"); - static_assert(static_cast(PrimitiveTopology::TriangleStrip) == WGPUPrimitiveTopology_TriangleStrip, "value mismatch for PrimitiveTopology::TriangleStrip"); - - - static_assert(sizeof(SType) == sizeof(WGPUSType), "sizeof mismatch for SType"); - static_assert(alignof(SType) == alignof(WGPUSType), "alignof mismatch for SType"); - - static_assert(static_cast(SType::Invalid) == WGPUSType_Invalid, "value mismatch for SType::Invalid"); - static_assert(static_cast(SType::SurfaceDescriptorFromMetalLayer) == WGPUSType_SurfaceDescriptorFromMetalLayer, "value mismatch for SType::SurfaceDescriptorFromMetalLayer"); - static_assert(static_cast(SType::SurfaceDescriptorFromWindowsHWND) == WGPUSType_SurfaceDescriptorFromWindowsHWND, "value mismatch for SType::SurfaceDescriptorFromWindowsHWND"); - static_assert(static_cast(SType::SurfaceDescriptorFromXlib) == WGPUSType_SurfaceDescriptorFromXlib, "value mismatch for SType::SurfaceDescriptorFromXlib"); - static_assert(static_cast(SType::SurfaceDescriptorFromHTMLCanvasId) == WGPUSType_SurfaceDescriptorFromHTMLCanvasId, "value mismatch for SType::SurfaceDescriptorFromHTMLCanvasId"); - static_assert(static_cast(SType::ShaderModuleSPIRVDescriptor) == WGPUSType_ShaderModuleSPIRVDescriptor, "value mismatch for SType::ShaderModuleSPIRVDescriptor"); - static_assert(static_cast(SType::ShaderModuleWGSLDescriptor) == WGPUSType_ShaderModuleWGSLDescriptor, "value mismatch for SType::ShaderModuleWGSLDescriptor"); - static_assert(static_cast(SType::SamplerDescriptorDummyAnisotropicFiltering) == WGPUSType_SamplerDescriptorDummyAnisotropicFiltering, "value mismatch for SType::SamplerDescriptorDummyAnisotropicFiltering"); - static_assert(static_cast(SType::RenderPipelineDescriptorDummyExtension) == WGPUSType_RenderPipelineDescriptorDummyExtension, "value mismatch for SType::RenderPipelineDescriptorDummyExtension"); - - - static_assert(sizeof(StencilOperation) == sizeof(WGPUStencilOperation), "sizeof mismatch for StencilOperation"); - static_assert(alignof(StencilOperation) == alignof(WGPUStencilOperation), "alignof mismatch for StencilOperation"); - - static_assert(static_cast(StencilOperation::Keep) == WGPUStencilOperation_Keep, "value mismatch for StencilOperation::Keep"); - static_assert(static_cast(StencilOperation::Zero) == WGPUStencilOperation_Zero, "value mismatch for StencilOperation::Zero"); - static_assert(static_cast(StencilOperation::Replace) == WGPUStencilOperation_Replace, "value mismatch for StencilOperation::Replace"); - static_assert(static_cast(StencilOperation::Invert) == WGPUStencilOperation_Invert, "value mismatch for StencilOperation::Invert"); - static_assert(static_cast(StencilOperation::IncrementClamp) == WGPUStencilOperation_IncrementClamp, "value mismatch for StencilOperation::IncrementClamp"); - static_assert(static_cast(StencilOperation::DecrementClamp) == WGPUStencilOperation_DecrementClamp, "value mismatch for StencilOperation::DecrementClamp"); - static_assert(static_cast(StencilOperation::IncrementWrap) == WGPUStencilOperation_IncrementWrap, "value mismatch for StencilOperation::IncrementWrap"); - static_assert(static_cast(StencilOperation::DecrementWrap) == WGPUStencilOperation_DecrementWrap, "value mismatch for StencilOperation::DecrementWrap"); - - - static_assert(sizeof(StoreOp) == sizeof(WGPUStoreOp), "sizeof mismatch for StoreOp"); - static_assert(alignof(StoreOp) == alignof(WGPUStoreOp), "alignof mismatch for StoreOp"); - - static_assert(static_cast(StoreOp::Store) == WGPUStoreOp_Store, "value mismatch for StoreOp::Store"); - static_assert(static_cast(StoreOp::Clear) == WGPUStoreOp_Clear, "value mismatch for StoreOp::Clear"); - - - static_assert(sizeof(TextureAspect) == sizeof(WGPUTextureAspect), "sizeof mismatch for TextureAspect"); - static_assert(alignof(TextureAspect) == alignof(WGPUTextureAspect), "alignof mismatch for TextureAspect"); - - static_assert(static_cast(TextureAspect::All) == WGPUTextureAspect_All, "value mismatch for TextureAspect::All"); - static_assert(static_cast(TextureAspect::StencilOnly) == WGPUTextureAspect_StencilOnly, "value mismatch for TextureAspect::StencilOnly"); - static_assert(static_cast(TextureAspect::DepthOnly) == WGPUTextureAspect_DepthOnly, "value mismatch for TextureAspect::DepthOnly"); - - - static_assert(sizeof(TextureComponentType) == sizeof(WGPUTextureComponentType), "sizeof mismatch for TextureComponentType"); - static_assert(alignof(TextureComponentType) == alignof(WGPUTextureComponentType), "alignof mismatch for TextureComponentType"); - - static_assert(static_cast(TextureComponentType::Float) == WGPUTextureComponentType_Float, "value mismatch for TextureComponentType::Float"); - static_assert(static_cast(TextureComponentType::Sint) == WGPUTextureComponentType_Sint, "value mismatch for TextureComponentType::Sint"); - static_assert(static_cast(TextureComponentType::Uint) == WGPUTextureComponentType_Uint, "value mismatch for TextureComponentType::Uint"); - - - static_assert(sizeof(TextureDimension) == sizeof(WGPUTextureDimension), "sizeof mismatch for TextureDimension"); - static_assert(alignof(TextureDimension) == alignof(WGPUTextureDimension), "alignof mismatch for TextureDimension"); - - static_assert(static_cast(TextureDimension::e1D) == WGPUTextureDimension_1D, "value mismatch for TextureDimension::e1D"); - static_assert(static_cast(TextureDimension::e2D) == WGPUTextureDimension_2D, "value mismatch for TextureDimension::e2D"); - static_assert(static_cast(TextureDimension::e3D) == WGPUTextureDimension_3D, "value mismatch for TextureDimension::e3D"); - - - static_assert(sizeof(TextureFormat) == sizeof(WGPUTextureFormat), "sizeof mismatch for TextureFormat"); - static_assert(alignof(TextureFormat) == alignof(WGPUTextureFormat), "alignof mismatch for TextureFormat"); - - static_assert(static_cast(TextureFormat::Undefined) == WGPUTextureFormat_Undefined, "value mismatch for TextureFormat::Undefined"); - static_assert(static_cast(TextureFormat::R8Unorm) == WGPUTextureFormat_R8Unorm, "value mismatch for TextureFormat::R8Unorm"); - static_assert(static_cast(TextureFormat::R8Snorm) == WGPUTextureFormat_R8Snorm, "value mismatch for TextureFormat::R8Snorm"); - static_assert(static_cast(TextureFormat::R8Uint) == WGPUTextureFormat_R8Uint, "value mismatch for TextureFormat::R8Uint"); - static_assert(static_cast(TextureFormat::R8Sint) == WGPUTextureFormat_R8Sint, "value mismatch for TextureFormat::R8Sint"); - static_assert(static_cast(TextureFormat::R16Uint) == WGPUTextureFormat_R16Uint, "value mismatch for TextureFormat::R16Uint"); - static_assert(static_cast(TextureFormat::R16Sint) == WGPUTextureFormat_R16Sint, "value mismatch for TextureFormat::R16Sint"); - static_assert(static_cast(TextureFormat::R16Float) == WGPUTextureFormat_R16Float, "value mismatch for TextureFormat::R16Float"); - static_assert(static_cast(TextureFormat::RG8Unorm) == WGPUTextureFormat_RG8Unorm, "value mismatch for TextureFormat::RG8Unorm"); - static_assert(static_cast(TextureFormat::RG8Snorm) == WGPUTextureFormat_RG8Snorm, "value mismatch for TextureFormat::RG8Snorm"); - static_assert(static_cast(TextureFormat::RG8Uint) == WGPUTextureFormat_RG8Uint, "value mismatch for TextureFormat::RG8Uint"); - static_assert(static_cast(TextureFormat::RG8Sint) == WGPUTextureFormat_RG8Sint, "value mismatch for TextureFormat::RG8Sint"); - static_assert(static_cast(TextureFormat::R32Float) == WGPUTextureFormat_R32Float, "value mismatch for TextureFormat::R32Float"); - static_assert(static_cast(TextureFormat::R32Uint) == WGPUTextureFormat_R32Uint, "value mismatch for TextureFormat::R32Uint"); - static_assert(static_cast(TextureFormat::R32Sint) == WGPUTextureFormat_R32Sint, "value mismatch for TextureFormat::R32Sint"); - static_assert(static_cast(TextureFormat::RG16Uint) == WGPUTextureFormat_RG16Uint, "value mismatch for TextureFormat::RG16Uint"); - static_assert(static_cast(TextureFormat::RG16Sint) == WGPUTextureFormat_RG16Sint, "value mismatch for TextureFormat::RG16Sint"); - static_assert(static_cast(TextureFormat::RG16Float) == WGPUTextureFormat_RG16Float, "value mismatch for TextureFormat::RG16Float"); - static_assert(static_cast(TextureFormat::RGBA8Unorm) == WGPUTextureFormat_RGBA8Unorm, "value mismatch for TextureFormat::RGBA8Unorm"); - static_assert(static_cast(TextureFormat::RGBA8UnormSrgb) == WGPUTextureFormat_RGBA8UnormSrgb, "value mismatch for TextureFormat::RGBA8UnormSrgb"); - static_assert(static_cast(TextureFormat::RGBA8Snorm) == WGPUTextureFormat_RGBA8Snorm, "value mismatch for TextureFormat::RGBA8Snorm"); - static_assert(static_cast(TextureFormat::RGBA8Uint) == WGPUTextureFormat_RGBA8Uint, "value mismatch for TextureFormat::RGBA8Uint"); - static_assert(static_cast(TextureFormat::RGBA8Sint) == WGPUTextureFormat_RGBA8Sint, "value mismatch for TextureFormat::RGBA8Sint"); - static_assert(static_cast(TextureFormat::BGRA8Unorm) == WGPUTextureFormat_BGRA8Unorm, "value mismatch for TextureFormat::BGRA8Unorm"); - static_assert(static_cast(TextureFormat::BGRA8UnormSrgb) == WGPUTextureFormat_BGRA8UnormSrgb, "value mismatch for TextureFormat::BGRA8UnormSrgb"); - static_assert(static_cast(TextureFormat::RGB10A2Unorm) == WGPUTextureFormat_RGB10A2Unorm, "value mismatch for TextureFormat::RGB10A2Unorm"); - static_assert(static_cast(TextureFormat::RG11B10Float) == WGPUTextureFormat_RG11B10Float, "value mismatch for TextureFormat::RG11B10Float"); - static_assert(static_cast(TextureFormat::RG32Float) == WGPUTextureFormat_RG32Float, "value mismatch for TextureFormat::RG32Float"); - static_assert(static_cast(TextureFormat::RG32Uint) == WGPUTextureFormat_RG32Uint, "value mismatch for TextureFormat::RG32Uint"); - static_assert(static_cast(TextureFormat::RG32Sint) == WGPUTextureFormat_RG32Sint, "value mismatch for TextureFormat::RG32Sint"); - static_assert(static_cast(TextureFormat::RGBA16Uint) == WGPUTextureFormat_RGBA16Uint, "value mismatch for TextureFormat::RGBA16Uint"); - static_assert(static_cast(TextureFormat::RGBA16Sint) == WGPUTextureFormat_RGBA16Sint, "value mismatch for TextureFormat::RGBA16Sint"); - static_assert(static_cast(TextureFormat::RGBA16Float) == WGPUTextureFormat_RGBA16Float, "value mismatch for TextureFormat::RGBA16Float"); - static_assert(static_cast(TextureFormat::RGBA32Float) == WGPUTextureFormat_RGBA32Float, "value mismatch for TextureFormat::RGBA32Float"); - static_assert(static_cast(TextureFormat::RGBA32Uint) == WGPUTextureFormat_RGBA32Uint, "value mismatch for TextureFormat::RGBA32Uint"); - static_assert(static_cast(TextureFormat::RGBA32Sint) == WGPUTextureFormat_RGBA32Sint, "value mismatch for TextureFormat::RGBA32Sint"); - static_assert(static_cast(TextureFormat::Depth32Float) == WGPUTextureFormat_Depth32Float, "value mismatch for TextureFormat::Depth32Float"); - static_assert(static_cast(TextureFormat::Depth24Plus) == WGPUTextureFormat_Depth24Plus, "value mismatch for TextureFormat::Depth24Plus"); - static_assert(static_cast(TextureFormat::Depth24PlusStencil8) == WGPUTextureFormat_Depth24PlusStencil8, "value mismatch for TextureFormat::Depth24PlusStencil8"); - static_assert(static_cast(TextureFormat::BC1RGBAUnorm) == WGPUTextureFormat_BC1RGBAUnorm, "value mismatch for TextureFormat::BC1RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC1RGBAUnormSrgb) == WGPUTextureFormat_BC1RGBAUnormSrgb, "value mismatch for TextureFormat::BC1RGBAUnormSrgb"); - static_assert(static_cast(TextureFormat::BC2RGBAUnorm) == WGPUTextureFormat_BC2RGBAUnorm, "value mismatch for TextureFormat::BC2RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC2RGBAUnormSrgb) == WGPUTextureFormat_BC2RGBAUnormSrgb, "value mismatch for TextureFormat::BC2RGBAUnormSrgb"); - static_assert(static_cast(TextureFormat::BC3RGBAUnorm) == WGPUTextureFormat_BC3RGBAUnorm, "value mismatch for TextureFormat::BC3RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC3RGBAUnormSrgb) == WGPUTextureFormat_BC3RGBAUnormSrgb, "value mismatch for TextureFormat::BC3RGBAUnormSrgb"); - static_assert(static_cast(TextureFormat::BC4RUnorm) == WGPUTextureFormat_BC4RUnorm, "value mismatch for TextureFormat::BC4RUnorm"); - static_assert(static_cast(TextureFormat::BC4RSnorm) == WGPUTextureFormat_BC4RSnorm, "value mismatch for TextureFormat::BC4RSnorm"); - static_assert(static_cast(TextureFormat::BC5RGUnorm) == WGPUTextureFormat_BC5RGUnorm, "value mismatch for TextureFormat::BC5RGUnorm"); - static_assert(static_cast(TextureFormat::BC5RGSnorm) == WGPUTextureFormat_BC5RGSnorm, "value mismatch for TextureFormat::BC5RGSnorm"); - static_assert(static_cast(TextureFormat::BC6HRGBUfloat) == WGPUTextureFormat_BC6HRGBUfloat, "value mismatch for TextureFormat::BC6HRGBUfloat"); - static_assert(static_cast(TextureFormat::BC6HRGBSfloat) == WGPUTextureFormat_BC6HRGBSfloat, "value mismatch for TextureFormat::BC6HRGBSfloat"); - static_assert(static_cast(TextureFormat::BC7RGBAUnorm) == WGPUTextureFormat_BC7RGBAUnorm, "value mismatch for TextureFormat::BC7RGBAUnorm"); - static_assert(static_cast(TextureFormat::BC7RGBAUnormSrgb) == WGPUTextureFormat_BC7RGBAUnormSrgb, "value mismatch for TextureFormat::BC7RGBAUnormSrgb"); - - - static_assert(sizeof(TextureViewDimension) == sizeof(WGPUTextureViewDimension), "sizeof mismatch for TextureViewDimension"); - static_assert(alignof(TextureViewDimension) == alignof(WGPUTextureViewDimension), "alignof mismatch for TextureViewDimension"); - - static_assert(static_cast(TextureViewDimension::Undefined) == WGPUTextureViewDimension_Undefined, "value mismatch for TextureViewDimension::Undefined"); - static_assert(static_cast(TextureViewDimension::e1D) == WGPUTextureViewDimension_1D, "value mismatch for TextureViewDimension::e1D"); - static_assert(static_cast(TextureViewDimension::e2D) == WGPUTextureViewDimension_2D, "value mismatch for TextureViewDimension::e2D"); - static_assert(static_cast(TextureViewDimension::e2DArray) == WGPUTextureViewDimension_2DArray, "value mismatch for TextureViewDimension::e2DArray"); - static_assert(static_cast(TextureViewDimension::Cube) == WGPUTextureViewDimension_Cube, "value mismatch for TextureViewDimension::Cube"); - static_assert(static_cast(TextureViewDimension::CubeArray) == WGPUTextureViewDimension_CubeArray, "value mismatch for TextureViewDimension::CubeArray"); - static_assert(static_cast(TextureViewDimension::e3D) == WGPUTextureViewDimension_3D, "value mismatch for TextureViewDimension::e3D"); - - - static_assert(sizeof(VertexFormat) == sizeof(WGPUVertexFormat), "sizeof mismatch for VertexFormat"); - static_assert(alignof(VertexFormat) == alignof(WGPUVertexFormat), "alignof mismatch for VertexFormat"); - - static_assert(static_cast(VertexFormat::UChar2) == WGPUVertexFormat_UChar2, "value mismatch for VertexFormat::UChar2"); - static_assert(static_cast(VertexFormat::UChar4) == WGPUVertexFormat_UChar4, "value mismatch for VertexFormat::UChar4"); - static_assert(static_cast(VertexFormat::Char2) == WGPUVertexFormat_Char2, "value mismatch for VertexFormat::Char2"); - static_assert(static_cast(VertexFormat::Char4) == WGPUVertexFormat_Char4, "value mismatch for VertexFormat::Char4"); - static_assert(static_cast(VertexFormat::UChar2Norm) == WGPUVertexFormat_UChar2Norm, "value mismatch for VertexFormat::UChar2Norm"); - static_assert(static_cast(VertexFormat::UChar4Norm) == WGPUVertexFormat_UChar4Norm, "value mismatch for VertexFormat::UChar4Norm"); - static_assert(static_cast(VertexFormat::Char2Norm) == WGPUVertexFormat_Char2Norm, "value mismatch for VertexFormat::Char2Norm"); - static_assert(static_cast(VertexFormat::Char4Norm) == WGPUVertexFormat_Char4Norm, "value mismatch for VertexFormat::Char4Norm"); - static_assert(static_cast(VertexFormat::UShort2) == WGPUVertexFormat_UShort2, "value mismatch for VertexFormat::UShort2"); - static_assert(static_cast(VertexFormat::UShort4) == WGPUVertexFormat_UShort4, "value mismatch for VertexFormat::UShort4"); - static_assert(static_cast(VertexFormat::Short2) == WGPUVertexFormat_Short2, "value mismatch for VertexFormat::Short2"); - static_assert(static_cast(VertexFormat::Short4) == WGPUVertexFormat_Short4, "value mismatch for VertexFormat::Short4"); - static_assert(static_cast(VertexFormat::UShort2Norm) == WGPUVertexFormat_UShort2Norm, "value mismatch for VertexFormat::UShort2Norm"); - static_assert(static_cast(VertexFormat::UShort4Norm) == WGPUVertexFormat_UShort4Norm, "value mismatch for VertexFormat::UShort4Norm"); - static_assert(static_cast(VertexFormat::Short2Norm) == WGPUVertexFormat_Short2Norm, "value mismatch for VertexFormat::Short2Norm"); - static_assert(static_cast(VertexFormat::Short4Norm) == WGPUVertexFormat_Short4Norm, "value mismatch for VertexFormat::Short4Norm"); - static_assert(static_cast(VertexFormat::Half2) == WGPUVertexFormat_Half2, "value mismatch for VertexFormat::Half2"); - static_assert(static_cast(VertexFormat::Half4) == WGPUVertexFormat_Half4, "value mismatch for VertexFormat::Half4"); - static_assert(static_cast(VertexFormat::Float) == WGPUVertexFormat_Float, "value mismatch for VertexFormat::Float"); - static_assert(static_cast(VertexFormat::Float2) == WGPUVertexFormat_Float2, "value mismatch for VertexFormat::Float2"); - static_assert(static_cast(VertexFormat::Float3) == WGPUVertexFormat_Float3, "value mismatch for VertexFormat::Float3"); - static_assert(static_cast(VertexFormat::Float4) == WGPUVertexFormat_Float4, "value mismatch for VertexFormat::Float4"); - static_assert(static_cast(VertexFormat::UInt) == WGPUVertexFormat_UInt, "value mismatch for VertexFormat::UInt"); - static_assert(static_cast(VertexFormat::UInt2) == WGPUVertexFormat_UInt2, "value mismatch for VertexFormat::UInt2"); - static_assert(static_cast(VertexFormat::UInt3) == WGPUVertexFormat_UInt3, "value mismatch for VertexFormat::UInt3"); - static_assert(static_cast(VertexFormat::UInt4) == WGPUVertexFormat_UInt4, "value mismatch for VertexFormat::UInt4"); - static_assert(static_cast(VertexFormat::Int) == WGPUVertexFormat_Int, "value mismatch for VertexFormat::Int"); - static_assert(static_cast(VertexFormat::Int2) == WGPUVertexFormat_Int2, "value mismatch for VertexFormat::Int2"); - static_assert(static_cast(VertexFormat::Int3) == WGPUVertexFormat_Int3, "value mismatch for VertexFormat::Int3"); - static_assert(static_cast(VertexFormat::Int4) == WGPUVertexFormat_Int4, "value mismatch for VertexFormat::Int4"); - - - - static_assert(sizeof(BufferUsage) == sizeof(WGPUBufferUsageFlags), "sizeof mismatch for BufferUsage"); - static_assert(alignof(BufferUsage) == alignof(WGPUBufferUsageFlags), "alignof mismatch for BufferUsage"); - - static_assert(static_cast(BufferUsage::None) == WGPUBufferUsage_None, "value mismatch for BufferUsage::None"); - static_assert(static_cast(BufferUsage::MapRead) == WGPUBufferUsage_MapRead, "value mismatch for BufferUsage::MapRead"); - static_assert(static_cast(BufferUsage::MapWrite) == WGPUBufferUsage_MapWrite, "value mismatch for BufferUsage::MapWrite"); - static_assert(static_cast(BufferUsage::CopySrc) == WGPUBufferUsage_CopySrc, "value mismatch for BufferUsage::CopySrc"); - static_assert(static_cast(BufferUsage::CopyDst) == WGPUBufferUsage_CopyDst, "value mismatch for BufferUsage::CopyDst"); - static_assert(static_cast(BufferUsage::Index) == WGPUBufferUsage_Index, "value mismatch for BufferUsage::Index"); - static_assert(static_cast(BufferUsage::Vertex) == WGPUBufferUsage_Vertex, "value mismatch for BufferUsage::Vertex"); - static_assert(static_cast(BufferUsage::Uniform) == WGPUBufferUsage_Uniform, "value mismatch for BufferUsage::Uniform"); - static_assert(static_cast(BufferUsage::Storage) == WGPUBufferUsage_Storage, "value mismatch for BufferUsage::Storage"); - static_assert(static_cast(BufferUsage::Indirect) == WGPUBufferUsage_Indirect, "value mismatch for BufferUsage::Indirect"); - - - static_assert(sizeof(ColorWriteMask) == sizeof(WGPUColorWriteMaskFlags), "sizeof mismatch for ColorWriteMask"); - static_assert(alignof(ColorWriteMask) == alignof(WGPUColorWriteMaskFlags), "alignof mismatch for ColorWriteMask"); - - static_assert(static_cast(ColorWriteMask::None) == WGPUColorWriteMask_None, "value mismatch for ColorWriteMask::None"); - static_assert(static_cast(ColorWriteMask::Red) == WGPUColorWriteMask_Red, "value mismatch for ColorWriteMask::Red"); - static_assert(static_cast(ColorWriteMask::Green) == WGPUColorWriteMask_Green, "value mismatch for ColorWriteMask::Green"); - static_assert(static_cast(ColorWriteMask::Blue) == WGPUColorWriteMask_Blue, "value mismatch for ColorWriteMask::Blue"); - static_assert(static_cast(ColorWriteMask::Alpha) == WGPUColorWriteMask_Alpha, "value mismatch for ColorWriteMask::Alpha"); - static_assert(static_cast(ColorWriteMask::All) == WGPUColorWriteMask_All, "value mismatch for ColorWriteMask::All"); - - - static_assert(sizeof(ShaderStage) == sizeof(WGPUShaderStageFlags), "sizeof mismatch for ShaderStage"); - static_assert(alignof(ShaderStage) == alignof(WGPUShaderStageFlags), "alignof mismatch for ShaderStage"); - - static_assert(static_cast(ShaderStage::None) == WGPUShaderStage_None, "value mismatch for ShaderStage::None"); - static_assert(static_cast(ShaderStage::Vertex) == WGPUShaderStage_Vertex, "value mismatch for ShaderStage::Vertex"); - static_assert(static_cast(ShaderStage::Fragment) == WGPUShaderStage_Fragment, "value mismatch for ShaderStage::Fragment"); - static_assert(static_cast(ShaderStage::Compute) == WGPUShaderStage_Compute, "value mismatch for ShaderStage::Compute"); - - - static_assert(sizeof(TextureUsage) == sizeof(WGPUTextureUsageFlags), "sizeof mismatch for TextureUsage"); - static_assert(alignof(TextureUsage) == alignof(WGPUTextureUsageFlags), "alignof mismatch for TextureUsage"); - - static_assert(static_cast(TextureUsage::None) == WGPUTextureUsage_None, "value mismatch for TextureUsage::None"); - static_assert(static_cast(TextureUsage::CopySrc) == WGPUTextureUsage_CopySrc, "value mismatch for TextureUsage::CopySrc"); - static_assert(static_cast(TextureUsage::CopyDst) == WGPUTextureUsage_CopyDst, "value mismatch for TextureUsage::CopyDst"); - static_assert(static_cast(TextureUsage::Sampled) == WGPUTextureUsage_Sampled, "value mismatch for TextureUsage::Sampled"); - static_assert(static_cast(TextureUsage::Storage) == WGPUTextureUsage_Storage, "value mismatch for TextureUsage::Storage"); - static_assert(static_cast(TextureUsage::OutputAttachment) == WGPUTextureUsage_OutputAttachment, "value mismatch for TextureUsage::OutputAttachment"); - static_assert(static_cast(TextureUsage::Present) == WGPUTextureUsage_Present, "value mismatch for TextureUsage::Present"); - - - static_assert(sizeof(ChainedStruct) == sizeof(WGPUChainedStruct), - "sizeof mismatch for ChainedStruct"); - static_assert(alignof(ChainedStruct) == alignof(WGPUChainedStruct), - "alignof mismatch for ChainedStruct"); - static_assert(offsetof(ChainedStruct, nextInChain) == offsetof(WGPUChainedStruct, next), - "offsetof mismatch for ChainedStruct::nextInChain"); - static_assert(offsetof(ChainedStruct, sType) == offsetof(WGPUChainedStruct, sType), - "offsetof mismatch for ChainedStruct::sType"); - - - static_assert(sizeof(AdapterProperties) == sizeof(WGPUAdapterProperties), "sizeof mismatch for AdapterProperties"); - static_assert(alignof(AdapterProperties) == alignof(WGPUAdapterProperties), "alignof mismatch for AdapterProperties"); - - static_assert(offsetof(AdapterProperties, nextInChain) == offsetof(WGPUAdapterProperties, nextInChain), - "offsetof mismatch for AdapterProperties::nextInChain"); - static_assert(offsetof(AdapterProperties, deviceID) == offsetof(WGPUAdapterProperties, deviceID), - "offsetof mismatch for AdapterProperties::deviceID"); - static_assert(offsetof(AdapterProperties, vendorID) == offsetof(WGPUAdapterProperties, vendorID), - "offsetof mismatch for AdapterProperties::vendorID"); - static_assert(offsetof(AdapterProperties, name) == offsetof(WGPUAdapterProperties, name), - "offsetof mismatch for AdapterProperties::name"); - static_assert(offsetof(AdapterProperties, adapterType) == offsetof(WGPUAdapterProperties, adapterType), - "offsetof mismatch for AdapterProperties::adapterType"); - static_assert(offsetof(AdapterProperties, backendType) == offsetof(WGPUAdapterProperties, backendType), - "offsetof mismatch for AdapterProperties::backendType"); - - - static_assert(sizeof(BindGroupEntry) == sizeof(WGPUBindGroupEntry), "sizeof mismatch for BindGroupEntry"); - static_assert(alignof(BindGroupEntry) == alignof(WGPUBindGroupEntry), "alignof mismatch for BindGroupEntry"); - - static_assert(offsetof(BindGroupEntry, binding) == offsetof(WGPUBindGroupEntry, binding), - "offsetof mismatch for BindGroupEntry::binding"); - static_assert(offsetof(BindGroupEntry, buffer) == offsetof(WGPUBindGroupEntry, buffer), - "offsetof mismatch for BindGroupEntry::buffer"); - static_assert(offsetof(BindGroupEntry, offset) == offsetof(WGPUBindGroupEntry, offset), - "offsetof mismatch for BindGroupEntry::offset"); - static_assert(offsetof(BindGroupEntry, size) == offsetof(WGPUBindGroupEntry, size), - "offsetof mismatch for BindGroupEntry::size"); - static_assert(offsetof(BindGroupEntry, sampler) == offsetof(WGPUBindGroupEntry, sampler), - "offsetof mismatch for BindGroupEntry::sampler"); - static_assert(offsetof(BindGroupEntry, textureView) == offsetof(WGPUBindGroupEntry, textureView), - "offsetof mismatch for BindGroupEntry::textureView"); - - - static_assert(sizeof(BindGroupLayoutEntry) == sizeof(WGPUBindGroupLayoutEntry), "sizeof mismatch for BindGroupLayoutEntry"); - static_assert(alignof(BindGroupLayoutEntry) == alignof(WGPUBindGroupLayoutEntry), "alignof mismatch for BindGroupLayoutEntry"); - - static_assert(offsetof(BindGroupLayoutEntry, binding) == offsetof(WGPUBindGroupLayoutEntry, binding), - "offsetof mismatch for BindGroupLayoutEntry::binding"); - static_assert(offsetof(BindGroupLayoutEntry, visibility) == offsetof(WGPUBindGroupLayoutEntry, visibility), - "offsetof mismatch for BindGroupLayoutEntry::visibility"); - static_assert(offsetof(BindGroupLayoutEntry, type) == offsetof(WGPUBindGroupLayoutEntry, type), - "offsetof mismatch for BindGroupLayoutEntry::type"); - static_assert(offsetof(BindGroupLayoutEntry, hasDynamicOffset) == offsetof(WGPUBindGroupLayoutEntry, hasDynamicOffset), - "offsetof mismatch for BindGroupLayoutEntry::hasDynamicOffset"); - static_assert(offsetof(BindGroupLayoutEntry, multisampled) == offsetof(WGPUBindGroupLayoutEntry, multisampled), - "offsetof mismatch for BindGroupLayoutEntry::multisampled"); - static_assert(offsetof(BindGroupLayoutEntry, viewDimension) == offsetof(WGPUBindGroupLayoutEntry, viewDimension), - "offsetof mismatch for BindGroupLayoutEntry::viewDimension"); - static_assert(offsetof(BindGroupLayoutEntry, textureComponentType) == offsetof(WGPUBindGroupLayoutEntry, textureComponentType), - "offsetof mismatch for BindGroupLayoutEntry::textureComponentType"); - static_assert(offsetof(BindGroupLayoutEntry, storageTextureFormat) == offsetof(WGPUBindGroupLayoutEntry, storageTextureFormat), - "offsetof mismatch for BindGroupLayoutEntry::storageTextureFormat"); - - - static_assert(sizeof(BlendDescriptor) == sizeof(WGPUBlendDescriptor), "sizeof mismatch for BlendDescriptor"); - static_assert(alignof(BlendDescriptor) == alignof(WGPUBlendDescriptor), "alignof mismatch for BlendDescriptor"); - - static_assert(offsetof(BlendDescriptor, operation) == offsetof(WGPUBlendDescriptor, operation), - "offsetof mismatch for BlendDescriptor::operation"); - static_assert(offsetof(BlendDescriptor, srcFactor) == offsetof(WGPUBlendDescriptor, srcFactor), - "offsetof mismatch for BlendDescriptor::srcFactor"); - static_assert(offsetof(BlendDescriptor, dstFactor) == offsetof(WGPUBlendDescriptor, dstFactor), - "offsetof mismatch for BlendDescriptor::dstFactor"); - - - static_assert(sizeof(BufferCopyView) == sizeof(WGPUBufferCopyView), "sizeof mismatch for BufferCopyView"); - static_assert(alignof(BufferCopyView) == alignof(WGPUBufferCopyView), "alignof mismatch for BufferCopyView"); - - static_assert(offsetof(BufferCopyView, nextInChain) == offsetof(WGPUBufferCopyView, nextInChain), - "offsetof mismatch for BufferCopyView::nextInChain"); - static_assert(offsetof(BufferCopyView, buffer) == offsetof(WGPUBufferCopyView, buffer), - "offsetof mismatch for BufferCopyView::buffer"); - static_assert(offsetof(BufferCopyView, offset) == offsetof(WGPUBufferCopyView, offset), - "offsetof mismatch for BufferCopyView::offset"); - static_assert(offsetof(BufferCopyView, bytesPerRow) == offsetof(WGPUBufferCopyView, bytesPerRow), - "offsetof mismatch for BufferCopyView::bytesPerRow"); - static_assert(offsetof(BufferCopyView, rowsPerImage) == offsetof(WGPUBufferCopyView, rowsPerImage), - "offsetof mismatch for BufferCopyView::rowsPerImage"); - - - static_assert(sizeof(BufferDescriptor) == sizeof(WGPUBufferDescriptor), "sizeof mismatch for BufferDescriptor"); - static_assert(alignof(BufferDescriptor) == alignof(WGPUBufferDescriptor), "alignof mismatch for BufferDescriptor"); - - static_assert(offsetof(BufferDescriptor, nextInChain) == offsetof(WGPUBufferDescriptor, nextInChain), - "offsetof mismatch for BufferDescriptor::nextInChain"); - static_assert(offsetof(BufferDescriptor, label) == offsetof(WGPUBufferDescriptor, label), - "offsetof mismatch for BufferDescriptor::label"); - static_assert(offsetof(BufferDescriptor, usage) == offsetof(WGPUBufferDescriptor, usage), - "offsetof mismatch for BufferDescriptor::usage"); - static_assert(offsetof(BufferDescriptor, size) == offsetof(WGPUBufferDescriptor, size), - "offsetof mismatch for BufferDescriptor::size"); - - - static_assert(sizeof(Color) == sizeof(WGPUColor), "sizeof mismatch for Color"); - static_assert(alignof(Color) == alignof(WGPUColor), "alignof mismatch for Color"); - - static_assert(offsetof(Color, r) == offsetof(WGPUColor, r), - "offsetof mismatch for Color::r"); - static_assert(offsetof(Color, g) == offsetof(WGPUColor, g), - "offsetof mismatch for Color::g"); - static_assert(offsetof(Color, b) == offsetof(WGPUColor, b), - "offsetof mismatch for Color::b"); - static_assert(offsetof(Color, a) == offsetof(WGPUColor, a), - "offsetof mismatch for Color::a"); - - - static_assert(sizeof(CommandBufferDescriptor) == sizeof(WGPUCommandBufferDescriptor), "sizeof mismatch for CommandBufferDescriptor"); - static_assert(alignof(CommandBufferDescriptor) == alignof(WGPUCommandBufferDescriptor), "alignof mismatch for CommandBufferDescriptor"); - - static_assert(offsetof(CommandBufferDescriptor, nextInChain) == offsetof(WGPUCommandBufferDescriptor, nextInChain), - "offsetof mismatch for CommandBufferDescriptor::nextInChain"); - static_assert(offsetof(CommandBufferDescriptor, label) == offsetof(WGPUCommandBufferDescriptor, label), - "offsetof mismatch for CommandBufferDescriptor::label"); - - - static_assert(sizeof(CommandEncoderDescriptor) == sizeof(WGPUCommandEncoderDescriptor), "sizeof mismatch for CommandEncoderDescriptor"); - static_assert(alignof(CommandEncoderDescriptor) == alignof(WGPUCommandEncoderDescriptor), "alignof mismatch for CommandEncoderDescriptor"); - - static_assert(offsetof(CommandEncoderDescriptor, nextInChain) == offsetof(WGPUCommandEncoderDescriptor, nextInChain), - "offsetof mismatch for CommandEncoderDescriptor::nextInChain"); - static_assert(offsetof(CommandEncoderDescriptor, label) == offsetof(WGPUCommandEncoderDescriptor, label), - "offsetof mismatch for CommandEncoderDescriptor::label"); - - - static_assert(sizeof(ComputePassDescriptor) == sizeof(WGPUComputePassDescriptor), "sizeof mismatch for ComputePassDescriptor"); - static_assert(alignof(ComputePassDescriptor) == alignof(WGPUComputePassDescriptor), "alignof mismatch for ComputePassDescriptor"); - - static_assert(offsetof(ComputePassDescriptor, nextInChain) == offsetof(WGPUComputePassDescriptor, nextInChain), - "offsetof mismatch for ComputePassDescriptor::nextInChain"); - static_assert(offsetof(ComputePassDescriptor, label) == offsetof(WGPUComputePassDescriptor, label), - "offsetof mismatch for ComputePassDescriptor::label"); - - - static_assert(sizeof(CreateBufferMappedResult) == sizeof(WGPUCreateBufferMappedResult), "sizeof mismatch for CreateBufferMappedResult"); - static_assert(alignof(CreateBufferMappedResult) == alignof(WGPUCreateBufferMappedResult), "alignof mismatch for CreateBufferMappedResult"); - - static_assert(offsetof(CreateBufferMappedResult, buffer) == offsetof(WGPUCreateBufferMappedResult, buffer), - "offsetof mismatch for CreateBufferMappedResult::buffer"); - static_assert(offsetof(CreateBufferMappedResult, dataLength) == offsetof(WGPUCreateBufferMappedResult, dataLength), - "offsetof mismatch for CreateBufferMappedResult::dataLength"); - static_assert(offsetof(CreateBufferMappedResult, data) == offsetof(WGPUCreateBufferMappedResult, data), - "offsetof mismatch for CreateBufferMappedResult::data"); - - - static_assert(sizeof(DeviceProperties) == sizeof(WGPUDeviceProperties), "sizeof mismatch for DeviceProperties"); - static_assert(alignof(DeviceProperties) == alignof(WGPUDeviceProperties), "alignof mismatch for DeviceProperties"); - - static_assert(offsetof(DeviceProperties, textureCompressionBC) == offsetof(WGPUDeviceProperties, textureCompressionBC), - "offsetof mismatch for DeviceProperties::textureCompressionBC"); - static_assert(offsetof(DeviceProperties, shaderFloat16) == offsetof(WGPUDeviceProperties, shaderFloat16), - "offsetof mismatch for DeviceProperties::shaderFloat16"); - static_assert(offsetof(DeviceProperties, pipelineStatisticsQuery) == offsetof(WGPUDeviceProperties, pipelineStatisticsQuery), - "offsetof mismatch for DeviceProperties::pipelineStatisticsQuery"); - static_assert(offsetof(DeviceProperties, timestampQuery) == offsetof(WGPUDeviceProperties, timestampQuery), - "offsetof mismatch for DeviceProperties::timestampQuery"); - - - static_assert(sizeof(Extent3D) == sizeof(WGPUExtent3D), "sizeof mismatch for Extent3D"); - static_assert(alignof(Extent3D) == alignof(WGPUExtent3D), "alignof mismatch for Extent3D"); - - static_assert(offsetof(Extent3D, width) == offsetof(WGPUExtent3D, width), - "offsetof mismatch for Extent3D::width"); - static_assert(offsetof(Extent3D, height) == offsetof(WGPUExtent3D, height), - "offsetof mismatch for Extent3D::height"); - static_assert(offsetof(Extent3D, depth) == offsetof(WGPUExtent3D, depth), - "offsetof mismatch for Extent3D::depth"); - - - static_assert(sizeof(FenceDescriptor) == sizeof(WGPUFenceDescriptor), "sizeof mismatch for FenceDescriptor"); - static_assert(alignof(FenceDescriptor) == alignof(WGPUFenceDescriptor), "alignof mismatch for FenceDescriptor"); - - static_assert(offsetof(FenceDescriptor, nextInChain) == offsetof(WGPUFenceDescriptor, nextInChain), - "offsetof mismatch for FenceDescriptor::nextInChain"); - static_assert(offsetof(FenceDescriptor, label) == offsetof(WGPUFenceDescriptor, label), - "offsetof mismatch for FenceDescriptor::label"); - static_assert(offsetof(FenceDescriptor, initialValue) == offsetof(WGPUFenceDescriptor, initialValue), - "offsetof mismatch for FenceDescriptor::initialValue"); - - - static_assert(sizeof(InstanceDescriptor) == sizeof(WGPUInstanceDescriptor), "sizeof mismatch for InstanceDescriptor"); - static_assert(alignof(InstanceDescriptor) == alignof(WGPUInstanceDescriptor), "alignof mismatch for InstanceDescriptor"); - - static_assert(offsetof(InstanceDescriptor, nextInChain) == offsetof(WGPUInstanceDescriptor, nextInChain), - "offsetof mismatch for InstanceDescriptor::nextInChain"); - - - static_assert(sizeof(Origin3D) == sizeof(WGPUOrigin3D), "sizeof mismatch for Origin3D"); - static_assert(alignof(Origin3D) == alignof(WGPUOrigin3D), "alignof mismatch for Origin3D"); - - static_assert(offsetof(Origin3D, x) == offsetof(WGPUOrigin3D, x), - "offsetof mismatch for Origin3D::x"); - static_assert(offsetof(Origin3D, y) == offsetof(WGPUOrigin3D, y), - "offsetof mismatch for Origin3D::y"); - static_assert(offsetof(Origin3D, z) == offsetof(WGPUOrigin3D, z), - "offsetof mismatch for Origin3D::z"); - - - static_assert(sizeof(PipelineLayoutDescriptor) == sizeof(WGPUPipelineLayoutDescriptor), "sizeof mismatch for PipelineLayoutDescriptor"); - static_assert(alignof(PipelineLayoutDescriptor) == alignof(WGPUPipelineLayoutDescriptor), "alignof mismatch for PipelineLayoutDescriptor"); - - static_assert(offsetof(PipelineLayoutDescriptor, nextInChain) == offsetof(WGPUPipelineLayoutDescriptor, nextInChain), - "offsetof mismatch for PipelineLayoutDescriptor::nextInChain"); - static_assert(offsetof(PipelineLayoutDescriptor, label) == offsetof(WGPUPipelineLayoutDescriptor, label), - "offsetof mismatch for PipelineLayoutDescriptor::label"); - static_assert(offsetof(PipelineLayoutDescriptor, bindGroupLayoutCount) == offsetof(WGPUPipelineLayoutDescriptor, bindGroupLayoutCount), - "offsetof mismatch for PipelineLayoutDescriptor::bindGroupLayoutCount"); - static_assert(offsetof(PipelineLayoutDescriptor, bindGroupLayouts) == offsetof(WGPUPipelineLayoutDescriptor, bindGroupLayouts), - "offsetof mismatch for PipelineLayoutDescriptor::bindGroupLayouts"); - - - static_assert(sizeof(ProgrammableStageDescriptor) == sizeof(WGPUProgrammableStageDescriptor), "sizeof mismatch for ProgrammableStageDescriptor"); - static_assert(alignof(ProgrammableStageDescriptor) == alignof(WGPUProgrammableStageDescriptor), "alignof mismatch for ProgrammableStageDescriptor"); - - static_assert(offsetof(ProgrammableStageDescriptor, nextInChain) == offsetof(WGPUProgrammableStageDescriptor, nextInChain), - "offsetof mismatch for ProgrammableStageDescriptor::nextInChain"); - static_assert(offsetof(ProgrammableStageDescriptor, module) == offsetof(WGPUProgrammableStageDescriptor, module), - "offsetof mismatch for ProgrammableStageDescriptor::module"); - static_assert(offsetof(ProgrammableStageDescriptor, entryPoint) == offsetof(WGPUProgrammableStageDescriptor, entryPoint), - "offsetof mismatch for ProgrammableStageDescriptor::entryPoint"); - - - static_assert(sizeof(RasterizationStateDescriptor) == sizeof(WGPURasterizationStateDescriptor), "sizeof mismatch for RasterizationStateDescriptor"); - static_assert(alignof(RasterizationStateDescriptor) == alignof(WGPURasterizationStateDescriptor), "alignof mismatch for RasterizationStateDescriptor"); - - static_assert(offsetof(RasterizationStateDescriptor, nextInChain) == offsetof(WGPURasterizationStateDescriptor, nextInChain), - "offsetof mismatch for RasterizationStateDescriptor::nextInChain"); - static_assert(offsetof(RasterizationStateDescriptor, frontFace) == offsetof(WGPURasterizationStateDescriptor, frontFace), - "offsetof mismatch for RasterizationStateDescriptor::frontFace"); - static_assert(offsetof(RasterizationStateDescriptor, cullMode) == offsetof(WGPURasterizationStateDescriptor, cullMode), - "offsetof mismatch for RasterizationStateDescriptor::cullMode"); - static_assert(offsetof(RasterizationStateDescriptor, depthBias) == offsetof(WGPURasterizationStateDescriptor, depthBias), - "offsetof mismatch for RasterizationStateDescriptor::depthBias"); - static_assert(offsetof(RasterizationStateDescriptor, depthBiasSlopeScale) == offsetof(WGPURasterizationStateDescriptor, depthBiasSlopeScale), - "offsetof mismatch for RasterizationStateDescriptor::depthBiasSlopeScale"); - static_assert(offsetof(RasterizationStateDescriptor, depthBiasClamp) == offsetof(WGPURasterizationStateDescriptor, depthBiasClamp), - "offsetof mismatch for RasterizationStateDescriptor::depthBiasClamp"); - - - static_assert(sizeof(RenderBundleDescriptor) == sizeof(WGPURenderBundleDescriptor), "sizeof mismatch for RenderBundleDescriptor"); - static_assert(alignof(RenderBundleDescriptor) == alignof(WGPURenderBundleDescriptor), "alignof mismatch for RenderBundleDescriptor"); - - static_assert(offsetof(RenderBundleDescriptor, nextInChain) == offsetof(WGPURenderBundleDescriptor, nextInChain), - "offsetof mismatch for RenderBundleDescriptor::nextInChain"); - static_assert(offsetof(RenderBundleDescriptor, label) == offsetof(WGPURenderBundleDescriptor, label), - "offsetof mismatch for RenderBundleDescriptor::label"); - - - static_assert(sizeof(RenderBundleEncoderDescriptor) == sizeof(WGPURenderBundleEncoderDescriptor), "sizeof mismatch for RenderBundleEncoderDescriptor"); - static_assert(alignof(RenderBundleEncoderDescriptor) == alignof(WGPURenderBundleEncoderDescriptor), "alignof mismatch for RenderBundleEncoderDescriptor"); - - static_assert(offsetof(RenderBundleEncoderDescriptor, nextInChain) == offsetof(WGPURenderBundleEncoderDescriptor, nextInChain), - "offsetof mismatch for RenderBundleEncoderDescriptor::nextInChain"); - static_assert(offsetof(RenderBundleEncoderDescriptor, label) == offsetof(WGPURenderBundleEncoderDescriptor, label), - "offsetof mismatch for RenderBundleEncoderDescriptor::label"); - static_assert(offsetof(RenderBundleEncoderDescriptor, colorFormatsCount) == offsetof(WGPURenderBundleEncoderDescriptor, colorFormatsCount), - "offsetof mismatch for RenderBundleEncoderDescriptor::colorFormatsCount"); - static_assert(offsetof(RenderBundleEncoderDescriptor, colorFormats) == offsetof(WGPURenderBundleEncoderDescriptor, colorFormats), - "offsetof mismatch for RenderBundleEncoderDescriptor::colorFormats"); - static_assert(offsetof(RenderBundleEncoderDescriptor, depthStencilFormat) == offsetof(WGPURenderBundleEncoderDescriptor, depthStencilFormat), - "offsetof mismatch for RenderBundleEncoderDescriptor::depthStencilFormat"); - static_assert(offsetof(RenderBundleEncoderDescriptor, sampleCount) == offsetof(WGPURenderBundleEncoderDescriptor, sampleCount), - "offsetof mismatch for RenderBundleEncoderDescriptor::sampleCount"); - - - static_assert(sizeof(RenderPassDepthStencilAttachmentDescriptor) == sizeof(WGPURenderPassDepthStencilAttachmentDescriptor), "sizeof mismatch for RenderPassDepthStencilAttachmentDescriptor"); - static_assert(alignof(RenderPassDepthStencilAttachmentDescriptor) == alignof(WGPURenderPassDepthStencilAttachmentDescriptor), "alignof mismatch for RenderPassDepthStencilAttachmentDescriptor"); - - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, attachment) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, attachment), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::attachment"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthLoadOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthLoadOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthLoadOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthStoreOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthStoreOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthStoreOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, clearDepth) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, clearDepth), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::clearDepth"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilLoadOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilLoadOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilLoadOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilStoreOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilStoreOp), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilStoreOp"); - static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, clearStencil) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, clearStencil), - "offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::clearStencil"); - - - static_assert(sizeof(SamplerDescriptor) == sizeof(WGPUSamplerDescriptor), "sizeof mismatch for SamplerDescriptor"); - static_assert(alignof(SamplerDescriptor) == alignof(WGPUSamplerDescriptor), "alignof mismatch for SamplerDescriptor"); - - static_assert(offsetof(SamplerDescriptor, nextInChain) == offsetof(WGPUSamplerDescriptor, nextInChain), - "offsetof mismatch for SamplerDescriptor::nextInChain"); - static_assert(offsetof(SamplerDescriptor, label) == offsetof(WGPUSamplerDescriptor, label), - "offsetof mismatch for SamplerDescriptor::label"); - static_assert(offsetof(SamplerDescriptor, addressModeU) == offsetof(WGPUSamplerDescriptor, addressModeU), - "offsetof mismatch for SamplerDescriptor::addressModeU"); - static_assert(offsetof(SamplerDescriptor, addressModeV) == offsetof(WGPUSamplerDescriptor, addressModeV), - "offsetof mismatch for SamplerDescriptor::addressModeV"); - static_assert(offsetof(SamplerDescriptor, addressModeW) == offsetof(WGPUSamplerDescriptor, addressModeW), - "offsetof mismatch for SamplerDescriptor::addressModeW"); - static_assert(offsetof(SamplerDescriptor, magFilter) == offsetof(WGPUSamplerDescriptor, magFilter), - "offsetof mismatch for SamplerDescriptor::magFilter"); - static_assert(offsetof(SamplerDescriptor, minFilter) == offsetof(WGPUSamplerDescriptor, minFilter), - "offsetof mismatch for SamplerDescriptor::minFilter"); - static_assert(offsetof(SamplerDescriptor, mipmapFilter) == offsetof(WGPUSamplerDescriptor, mipmapFilter), - "offsetof mismatch for SamplerDescriptor::mipmapFilter"); - static_assert(offsetof(SamplerDescriptor, lodMinClamp) == offsetof(WGPUSamplerDescriptor, lodMinClamp), - "offsetof mismatch for SamplerDescriptor::lodMinClamp"); - static_assert(offsetof(SamplerDescriptor, lodMaxClamp) == offsetof(WGPUSamplerDescriptor, lodMaxClamp), - "offsetof mismatch for SamplerDescriptor::lodMaxClamp"); - static_assert(offsetof(SamplerDescriptor, compare) == offsetof(WGPUSamplerDescriptor, compare), - "offsetof mismatch for SamplerDescriptor::compare"); - - - static_assert(sizeof(SamplerDescriptorDummyAnisotropicFiltering) == sizeof(WGPUSamplerDescriptorDummyAnisotropicFiltering), "sizeof mismatch for SamplerDescriptorDummyAnisotropicFiltering"); - static_assert(alignof(SamplerDescriptorDummyAnisotropicFiltering) == alignof(WGPUSamplerDescriptorDummyAnisotropicFiltering), "alignof mismatch for SamplerDescriptorDummyAnisotropicFiltering"); - - static_assert(offsetof(SamplerDescriptorDummyAnisotropicFiltering, maxAnisotropy) == offsetof(WGPUSamplerDescriptorDummyAnisotropicFiltering, maxAnisotropy), - "offsetof mismatch for SamplerDescriptorDummyAnisotropicFiltering::maxAnisotropy"); - - - static_assert(sizeof(ShaderModuleDescriptor) == sizeof(WGPUShaderModuleDescriptor), "sizeof mismatch for ShaderModuleDescriptor"); - static_assert(alignof(ShaderModuleDescriptor) == alignof(WGPUShaderModuleDescriptor), "alignof mismatch for ShaderModuleDescriptor"); - - static_assert(offsetof(ShaderModuleDescriptor, nextInChain) == offsetof(WGPUShaderModuleDescriptor, nextInChain), - "offsetof mismatch for ShaderModuleDescriptor::nextInChain"); - static_assert(offsetof(ShaderModuleDescriptor, label) == offsetof(WGPUShaderModuleDescriptor, label), - "offsetof mismatch for ShaderModuleDescriptor::label"); - - - static_assert(sizeof(ShaderModuleSPIRVDescriptor) == sizeof(WGPUShaderModuleSPIRVDescriptor), "sizeof mismatch for ShaderModuleSPIRVDescriptor"); - static_assert(alignof(ShaderModuleSPIRVDescriptor) == alignof(WGPUShaderModuleSPIRVDescriptor), "alignof mismatch for ShaderModuleSPIRVDescriptor"); - - static_assert(offsetof(ShaderModuleSPIRVDescriptor, codeSize) == offsetof(WGPUShaderModuleSPIRVDescriptor, codeSize), - "offsetof mismatch for ShaderModuleSPIRVDescriptor::codeSize"); - static_assert(offsetof(ShaderModuleSPIRVDescriptor, code) == offsetof(WGPUShaderModuleSPIRVDescriptor, code), - "offsetof mismatch for ShaderModuleSPIRVDescriptor::code"); - - - static_assert(sizeof(ShaderModuleWGSLDescriptor) == sizeof(WGPUShaderModuleWGSLDescriptor), "sizeof mismatch for ShaderModuleWGSLDescriptor"); - static_assert(alignof(ShaderModuleWGSLDescriptor) == alignof(WGPUShaderModuleWGSLDescriptor), "alignof mismatch for ShaderModuleWGSLDescriptor"); - - static_assert(offsetof(ShaderModuleWGSLDescriptor, source) == offsetof(WGPUShaderModuleWGSLDescriptor, source), - "offsetof mismatch for ShaderModuleWGSLDescriptor::source"); - - - static_assert(sizeof(StencilStateFaceDescriptor) == sizeof(WGPUStencilStateFaceDescriptor), "sizeof mismatch for StencilStateFaceDescriptor"); - static_assert(alignof(StencilStateFaceDescriptor) == alignof(WGPUStencilStateFaceDescriptor), "alignof mismatch for StencilStateFaceDescriptor"); - - static_assert(offsetof(StencilStateFaceDescriptor, compare) == offsetof(WGPUStencilStateFaceDescriptor, compare), - "offsetof mismatch for StencilStateFaceDescriptor::compare"); - static_assert(offsetof(StencilStateFaceDescriptor, failOp) == offsetof(WGPUStencilStateFaceDescriptor, failOp), - "offsetof mismatch for StencilStateFaceDescriptor::failOp"); - static_assert(offsetof(StencilStateFaceDescriptor, depthFailOp) == offsetof(WGPUStencilStateFaceDescriptor, depthFailOp), - "offsetof mismatch for StencilStateFaceDescriptor::depthFailOp"); - static_assert(offsetof(StencilStateFaceDescriptor, passOp) == offsetof(WGPUStencilStateFaceDescriptor, passOp), - "offsetof mismatch for StencilStateFaceDescriptor::passOp"); - - - static_assert(sizeof(SurfaceDescriptor) == sizeof(WGPUSurfaceDescriptor), "sizeof mismatch for SurfaceDescriptor"); - static_assert(alignof(SurfaceDescriptor) == alignof(WGPUSurfaceDescriptor), "alignof mismatch for SurfaceDescriptor"); - - static_assert(offsetof(SurfaceDescriptor, nextInChain) == offsetof(WGPUSurfaceDescriptor, nextInChain), - "offsetof mismatch for SurfaceDescriptor::nextInChain"); - static_assert(offsetof(SurfaceDescriptor, label) == offsetof(WGPUSurfaceDescriptor, label), - "offsetof mismatch for SurfaceDescriptor::label"); - - - static_assert(sizeof(SurfaceDescriptorFromHTMLCanvasId) == sizeof(WGPUSurfaceDescriptorFromHTMLCanvasId), "sizeof mismatch for SurfaceDescriptorFromHTMLCanvasId"); - static_assert(alignof(SurfaceDescriptorFromHTMLCanvasId) == alignof(WGPUSurfaceDescriptorFromHTMLCanvasId), "alignof mismatch for SurfaceDescriptorFromHTMLCanvasId"); - - static_assert(offsetof(SurfaceDescriptorFromHTMLCanvasId, id) == offsetof(WGPUSurfaceDescriptorFromHTMLCanvasId, id), - "offsetof mismatch for SurfaceDescriptorFromHTMLCanvasId::id"); - - - static_assert(sizeof(SurfaceDescriptorFromMetalLayer) == sizeof(WGPUSurfaceDescriptorFromMetalLayer), "sizeof mismatch for SurfaceDescriptorFromMetalLayer"); - static_assert(alignof(SurfaceDescriptorFromMetalLayer) == alignof(WGPUSurfaceDescriptorFromMetalLayer), "alignof mismatch for SurfaceDescriptorFromMetalLayer"); - - static_assert(offsetof(SurfaceDescriptorFromMetalLayer, layer) == offsetof(WGPUSurfaceDescriptorFromMetalLayer, layer), - "offsetof mismatch for SurfaceDescriptorFromMetalLayer::layer"); - - - static_assert(sizeof(SurfaceDescriptorFromWindowsHWND) == sizeof(WGPUSurfaceDescriptorFromWindowsHWND), "sizeof mismatch for SurfaceDescriptorFromWindowsHWND"); - static_assert(alignof(SurfaceDescriptorFromWindowsHWND) == alignof(WGPUSurfaceDescriptorFromWindowsHWND), "alignof mismatch for SurfaceDescriptorFromWindowsHWND"); - - static_assert(offsetof(SurfaceDescriptorFromWindowsHWND, hinstance) == offsetof(WGPUSurfaceDescriptorFromWindowsHWND, hinstance), - "offsetof mismatch for SurfaceDescriptorFromWindowsHWND::hinstance"); - static_assert(offsetof(SurfaceDescriptorFromWindowsHWND, hwnd) == offsetof(WGPUSurfaceDescriptorFromWindowsHWND, hwnd), - "offsetof mismatch for SurfaceDescriptorFromWindowsHWND::hwnd"); - - - static_assert(sizeof(SurfaceDescriptorFromXlib) == sizeof(WGPUSurfaceDescriptorFromXlib), "sizeof mismatch for SurfaceDescriptorFromXlib"); - static_assert(alignof(SurfaceDescriptorFromXlib) == alignof(WGPUSurfaceDescriptorFromXlib), "alignof mismatch for SurfaceDescriptorFromXlib"); - - static_assert(offsetof(SurfaceDescriptorFromXlib, display) == offsetof(WGPUSurfaceDescriptorFromXlib, display), - "offsetof mismatch for SurfaceDescriptorFromXlib::display"); - static_assert(offsetof(SurfaceDescriptorFromXlib, window) == offsetof(WGPUSurfaceDescriptorFromXlib, window), - "offsetof mismatch for SurfaceDescriptorFromXlib::window"); - - - static_assert(sizeof(SwapChainDescriptor) == sizeof(WGPUSwapChainDescriptor), "sizeof mismatch for SwapChainDescriptor"); - static_assert(alignof(SwapChainDescriptor) == alignof(WGPUSwapChainDescriptor), "alignof mismatch for SwapChainDescriptor"); - - static_assert(offsetof(SwapChainDescriptor, nextInChain) == offsetof(WGPUSwapChainDescriptor, nextInChain), - "offsetof mismatch for SwapChainDescriptor::nextInChain"); - static_assert(offsetof(SwapChainDescriptor, label) == offsetof(WGPUSwapChainDescriptor, label), - "offsetof mismatch for SwapChainDescriptor::label"); - static_assert(offsetof(SwapChainDescriptor, usage) == offsetof(WGPUSwapChainDescriptor, usage), - "offsetof mismatch for SwapChainDescriptor::usage"); - static_assert(offsetof(SwapChainDescriptor, format) == offsetof(WGPUSwapChainDescriptor, format), - "offsetof mismatch for SwapChainDescriptor::format"); - static_assert(offsetof(SwapChainDescriptor, width) == offsetof(WGPUSwapChainDescriptor, width), - "offsetof mismatch for SwapChainDescriptor::width"); - static_assert(offsetof(SwapChainDescriptor, height) == offsetof(WGPUSwapChainDescriptor, height), - "offsetof mismatch for SwapChainDescriptor::height"); - static_assert(offsetof(SwapChainDescriptor, presentMode) == offsetof(WGPUSwapChainDescriptor, presentMode), - "offsetof mismatch for SwapChainDescriptor::presentMode"); - static_assert(offsetof(SwapChainDescriptor, implementation) == offsetof(WGPUSwapChainDescriptor, implementation), - "offsetof mismatch for SwapChainDescriptor::implementation"); - - - static_assert(sizeof(TextureViewDescriptor) == sizeof(WGPUTextureViewDescriptor), "sizeof mismatch for TextureViewDescriptor"); - static_assert(alignof(TextureViewDescriptor) == alignof(WGPUTextureViewDescriptor), "alignof mismatch for TextureViewDescriptor"); - - static_assert(offsetof(TextureViewDescriptor, nextInChain) == offsetof(WGPUTextureViewDescriptor, nextInChain), - "offsetof mismatch for TextureViewDescriptor::nextInChain"); - static_assert(offsetof(TextureViewDescriptor, label) == offsetof(WGPUTextureViewDescriptor, label), - "offsetof mismatch for TextureViewDescriptor::label"); - static_assert(offsetof(TextureViewDescriptor, format) == offsetof(WGPUTextureViewDescriptor, format), - "offsetof mismatch for TextureViewDescriptor::format"); - static_assert(offsetof(TextureViewDescriptor, dimension) == offsetof(WGPUTextureViewDescriptor, dimension), - "offsetof mismatch for TextureViewDescriptor::dimension"); - static_assert(offsetof(TextureViewDescriptor, baseMipLevel) == offsetof(WGPUTextureViewDescriptor, baseMipLevel), - "offsetof mismatch for TextureViewDescriptor::baseMipLevel"); - static_assert(offsetof(TextureViewDescriptor, mipLevelCount) == offsetof(WGPUTextureViewDescriptor, mipLevelCount), - "offsetof mismatch for TextureViewDescriptor::mipLevelCount"); - static_assert(offsetof(TextureViewDescriptor, baseArrayLayer) == offsetof(WGPUTextureViewDescriptor, baseArrayLayer), - "offsetof mismatch for TextureViewDescriptor::baseArrayLayer"); - static_assert(offsetof(TextureViewDescriptor, arrayLayerCount) == offsetof(WGPUTextureViewDescriptor, arrayLayerCount), - "offsetof mismatch for TextureViewDescriptor::arrayLayerCount"); - static_assert(offsetof(TextureViewDescriptor, aspect) == offsetof(WGPUTextureViewDescriptor, aspect), - "offsetof mismatch for TextureViewDescriptor::aspect"); - - - static_assert(sizeof(VertexAttributeDescriptor) == sizeof(WGPUVertexAttributeDescriptor), "sizeof mismatch for VertexAttributeDescriptor"); - static_assert(alignof(VertexAttributeDescriptor) == alignof(WGPUVertexAttributeDescriptor), "alignof mismatch for VertexAttributeDescriptor"); - - static_assert(offsetof(VertexAttributeDescriptor, format) == offsetof(WGPUVertexAttributeDescriptor, format), - "offsetof mismatch for VertexAttributeDescriptor::format"); - static_assert(offsetof(VertexAttributeDescriptor, offset) == offsetof(WGPUVertexAttributeDescriptor, offset), - "offsetof mismatch for VertexAttributeDescriptor::offset"); - static_assert(offsetof(VertexAttributeDescriptor, shaderLocation) == offsetof(WGPUVertexAttributeDescriptor, shaderLocation), - "offsetof mismatch for VertexAttributeDescriptor::shaderLocation"); - - - static_assert(sizeof(BindGroupDescriptor) == sizeof(WGPUBindGroupDescriptor), "sizeof mismatch for BindGroupDescriptor"); - static_assert(alignof(BindGroupDescriptor) == alignof(WGPUBindGroupDescriptor), "alignof mismatch for BindGroupDescriptor"); - - static_assert(offsetof(BindGroupDescriptor, nextInChain) == offsetof(WGPUBindGroupDescriptor, nextInChain), - "offsetof mismatch for BindGroupDescriptor::nextInChain"); - static_assert(offsetof(BindGroupDescriptor, label) == offsetof(WGPUBindGroupDescriptor, label), - "offsetof mismatch for BindGroupDescriptor::label"); - static_assert(offsetof(BindGroupDescriptor, layout) == offsetof(WGPUBindGroupDescriptor, layout), - "offsetof mismatch for BindGroupDescriptor::layout"); - static_assert(offsetof(BindGroupDescriptor, entryCount) == offsetof(WGPUBindGroupDescriptor, entryCount), - "offsetof mismatch for BindGroupDescriptor::entryCount"); - static_assert(offsetof(BindGroupDescriptor, entries) == offsetof(WGPUBindGroupDescriptor, entries), - "offsetof mismatch for BindGroupDescriptor::entries"); - - - static_assert(sizeof(BindGroupLayoutDescriptor) == sizeof(WGPUBindGroupLayoutDescriptor), "sizeof mismatch for BindGroupLayoutDescriptor"); - static_assert(alignof(BindGroupLayoutDescriptor) == alignof(WGPUBindGroupLayoutDescriptor), "alignof mismatch for BindGroupLayoutDescriptor"); - - static_assert(offsetof(BindGroupLayoutDescriptor, nextInChain) == offsetof(WGPUBindGroupLayoutDescriptor, nextInChain), - "offsetof mismatch for BindGroupLayoutDescriptor::nextInChain"); - static_assert(offsetof(BindGroupLayoutDescriptor, label) == offsetof(WGPUBindGroupLayoutDescriptor, label), - "offsetof mismatch for BindGroupLayoutDescriptor::label"); - static_assert(offsetof(BindGroupLayoutDescriptor, entryCount) == offsetof(WGPUBindGroupLayoutDescriptor, entryCount), - "offsetof mismatch for BindGroupLayoutDescriptor::entryCount"); - static_assert(offsetof(BindGroupLayoutDescriptor, entries) == offsetof(WGPUBindGroupLayoutDescriptor, entries), - "offsetof mismatch for BindGroupLayoutDescriptor::entries"); - - - static_assert(sizeof(ColorStateDescriptor) == sizeof(WGPUColorStateDescriptor), "sizeof mismatch for ColorStateDescriptor"); - static_assert(alignof(ColorStateDescriptor) == alignof(WGPUColorStateDescriptor), "alignof mismatch for ColorStateDescriptor"); - - static_assert(offsetof(ColorStateDescriptor, nextInChain) == offsetof(WGPUColorStateDescriptor, nextInChain), - "offsetof mismatch for ColorStateDescriptor::nextInChain"); - static_assert(offsetof(ColorStateDescriptor, format) == offsetof(WGPUColorStateDescriptor, format), - "offsetof mismatch for ColorStateDescriptor::format"); - static_assert(offsetof(ColorStateDescriptor, alphaBlend) == offsetof(WGPUColorStateDescriptor, alphaBlend), - "offsetof mismatch for ColorStateDescriptor::alphaBlend"); - static_assert(offsetof(ColorStateDescriptor, colorBlend) == offsetof(WGPUColorStateDescriptor, colorBlend), - "offsetof mismatch for ColorStateDescriptor::colorBlend"); - static_assert(offsetof(ColorStateDescriptor, writeMask) == offsetof(WGPUColorStateDescriptor, writeMask), - "offsetof mismatch for ColorStateDescriptor::writeMask"); - - - static_assert(sizeof(ComputePipelineDescriptor) == sizeof(WGPUComputePipelineDescriptor), "sizeof mismatch for ComputePipelineDescriptor"); - static_assert(alignof(ComputePipelineDescriptor) == alignof(WGPUComputePipelineDescriptor), "alignof mismatch for ComputePipelineDescriptor"); - - static_assert(offsetof(ComputePipelineDescriptor, nextInChain) == offsetof(WGPUComputePipelineDescriptor, nextInChain), - "offsetof mismatch for ComputePipelineDescriptor::nextInChain"); - static_assert(offsetof(ComputePipelineDescriptor, label) == offsetof(WGPUComputePipelineDescriptor, label), - "offsetof mismatch for ComputePipelineDescriptor::label"); - static_assert(offsetof(ComputePipelineDescriptor, layout) == offsetof(WGPUComputePipelineDescriptor, layout), - "offsetof mismatch for ComputePipelineDescriptor::layout"); - static_assert(offsetof(ComputePipelineDescriptor, computeStage) == offsetof(WGPUComputePipelineDescriptor, computeStage), - "offsetof mismatch for ComputePipelineDescriptor::computeStage"); - - - static_assert(sizeof(DepthStencilStateDescriptor) == sizeof(WGPUDepthStencilStateDescriptor), "sizeof mismatch for DepthStencilStateDescriptor"); - static_assert(alignof(DepthStencilStateDescriptor) == alignof(WGPUDepthStencilStateDescriptor), "alignof mismatch for DepthStencilStateDescriptor"); - - static_assert(offsetof(DepthStencilStateDescriptor, nextInChain) == offsetof(WGPUDepthStencilStateDescriptor, nextInChain), - "offsetof mismatch for DepthStencilStateDescriptor::nextInChain"); - static_assert(offsetof(DepthStencilStateDescriptor, format) == offsetof(WGPUDepthStencilStateDescriptor, format), - "offsetof mismatch for DepthStencilStateDescriptor::format"); - static_assert(offsetof(DepthStencilStateDescriptor, depthWriteEnabled) == offsetof(WGPUDepthStencilStateDescriptor, depthWriteEnabled), - "offsetof mismatch for DepthStencilStateDescriptor::depthWriteEnabled"); - static_assert(offsetof(DepthStencilStateDescriptor, depthCompare) == offsetof(WGPUDepthStencilStateDescriptor, depthCompare), - "offsetof mismatch for DepthStencilStateDescriptor::depthCompare"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilFront) == offsetof(WGPUDepthStencilStateDescriptor, stencilFront), - "offsetof mismatch for DepthStencilStateDescriptor::stencilFront"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilBack) == offsetof(WGPUDepthStencilStateDescriptor, stencilBack), - "offsetof mismatch for DepthStencilStateDescriptor::stencilBack"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilReadMask) == offsetof(WGPUDepthStencilStateDescriptor, stencilReadMask), - "offsetof mismatch for DepthStencilStateDescriptor::stencilReadMask"); - static_assert(offsetof(DepthStencilStateDescriptor, stencilWriteMask) == offsetof(WGPUDepthStencilStateDescriptor, stencilWriteMask), - "offsetof mismatch for DepthStencilStateDescriptor::stencilWriteMask"); - - - static_assert(sizeof(RenderPassColorAttachmentDescriptor) == sizeof(WGPURenderPassColorAttachmentDescriptor), "sizeof mismatch for RenderPassColorAttachmentDescriptor"); - static_assert(alignof(RenderPassColorAttachmentDescriptor) == alignof(WGPURenderPassColorAttachmentDescriptor), "alignof mismatch for RenderPassColorAttachmentDescriptor"); - - static_assert(offsetof(RenderPassColorAttachmentDescriptor, attachment) == offsetof(WGPURenderPassColorAttachmentDescriptor, attachment), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::attachment"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, resolveTarget) == offsetof(WGPURenderPassColorAttachmentDescriptor, resolveTarget), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::resolveTarget"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, loadOp) == offsetof(WGPURenderPassColorAttachmentDescriptor, loadOp), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::loadOp"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, storeOp) == offsetof(WGPURenderPassColorAttachmentDescriptor, storeOp), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::storeOp"); - static_assert(offsetof(RenderPassColorAttachmentDescriptor, clearColor) == offsetof(WGPURenderPassColorAttachmentDescriptor, clearColor), - "offsetof mismatch for RenderPassColorAttachmentDescriptor::clearColor"); - - - static_assert(sizeof(RenderPipelineDescriptorDummyExtension) == sizeof(WGPURenderPipelineDescriptorDummyExtension), "sizeof mismatch for RenderPipelineDescriptorDummyExtension"); - static_assert(alignof(RenderPipelineDescriptorDummyExtension) == alignof(WGPURenderPipelineDescriptorDummyExtension), "alignof mismatch for RenderPipelineDescriptorDummyExtension"); - - static_assert(offsetof(RenderPipelineDescriptorDummyExtension, dummyStage) == offsetof(WGPURenderPipelineDescriptorDummyExtension, dummyStage), - "offsetof mismatch for RenderPipelineDescriptorDummyExtension::dummyStage"); - - - static_assert(sizeof(TextureCopyView) == sizeof(WGPUTextureCopyView), "sizeof mismatch for TextureCopyView"); - static_assert(alignof(TextureCopyView) == alignof(WGPUTextureCopyView), "alignof mismatch for TextureCopyView"); - - static_assert(offsetof(TextureCopyView, nextInChain) == offsetof(WGPUTextureCopyView, nextInChain), - "offsetof mismatch for TextureCopyView::nextInChain"); - static_assert(offsetof(TextureCopyView, texture) == offsetof(WGPUTextureCopyView, texture), - "offsetof mismatch for TextureCopyView::texture"); - static_assert(offsetof(TextureCopyView, mipLevel) == offsetof(WGPUTextureCopyView, mipLevel), - "offsetof mismatch for TextureCopyView::mipLevel"); - static_assert(offsetof(TextureCopyView, arrayLayer) == offsetof(WGPUTextureCopyView, arrayLayer), - "offsetof mismatch for TextureCopyView::arrayLayer"); - static_assert(offsetof(TextureCopyView, origin) == offsetof(WGPUTextureCopyView, origin), - "offsetof mismatch for TextureCopyView::origin"); - - - static_assert(sizeof(TextureDescriptor) == sizeof(WGPUTextureDescriptor), "sizeof mismatch for TextureDescriptor"); - static_assert(alignof(TextureDescriptor) == alignof(WGPUTextureDescriptor), "alignof mismatch for TextureDescriptor"); - - static_assert(offsetof(TextureDescriptor, nextInChain) == offsetof(WGPUTextureDescriptor, nextInChain), - "offsetof mismatch for TextureDescriptor::nextInChain"); - static_assert(offsetof(TextureDescriptor, label) == offsetof(WGPUTextureDescriptor, label), - "offsetof mismatch for TextureDescriptor::label"); - static_assert(offsetof(TextureDescriptor, usage) == offsetof(WGPUTextureDescriptor, usage), - "offsetof mismatch for TextureDescriptor::usage"); - static_assert(offsetof(TextureDescriptor, dimension) == offsetof(WGPUTextureDescriptor, dimension), - "offsetof mismatch for TextureDescriptor::dimension"); - static_assert(offsetof(TextureDescriptor, size) == offsetof(WGPUTextureDescriptor, size), - "offsetof mismatch for TextureDescriptor::size"); - static_assert(offsetof(TextureDescriptor, arrayLayerCount) == offsetof(WGPUTextureDescriptor, arrayLayerCount), - "offsetof mismatch for TextureDescriptor::arrayLayerCount"); - static_assert(offsetof(TextureDescriptor, format) == offsetof(WGPUTextureDescriptor, format), - "offsetof mismatch for TextureDescriptor::format"); - static_assert(offsetof(TextureDescriptor, mipLevelCount) == offsetof(WGPUTextureDescriptor, mipLevelCount), - "offsetof mismatch for TextureDescriptor::mipLevelCount"); - static_assert(offsetof(TextureDescriptor, sampleCount) == offsetof(WGPUTextureDescriptor, sampleCount), - "offsetof mismatch for TextureDescriptor::sampleCount"); - - - static_assert(sizeof(VertexBufferLayoutDescriptor) == sizeof(WGPUVertexBufferLayoutDescriptor), "sizeof mismatch for VertexBufferLayoutDescriptor"); - static_assert(alignof(VertexBufferLayoutDescriptor) == alignof(WGPUVertexBufferLayoutDescriptor), "alignof mismatch for VertexBufferLayoutDescriptor"); - - static_assert(offsetof(VertexBufferLayoutDescriptor, arrayStride) == offsetof(WGPUVertexBufferLayoutDescriptor, arrayStride), - "offsetof mismatch for VertexBufferLayoutDescriptor::arrayStride"); - static_assert(offsetof(VertexBufferLayoutDescriptor, stepMode) == offsetof(WGPUVertexBufferLayoutDescriptor, stepMode), - "offsetof mismatch for VertexBufferLayoutDescriptor::stepMode"); - static_assert(offsetof(VertexBufferLayoutDescriptor, attributeCount) == offsetof(WGPUVertexBufferLayoutDescriptor, attributeCount), - "offsetof mismatch for VertexBufferLayoutDescriptor::attributeCount"); - static_assert(offsetof(VertexBufferLayoutDescriptor, attributes) == offsetof(WGPUVertexBufferLayoutDescriptor, attributes), - "offsetof mismatch for VertexBufferLayoutDescriptor::attributes"); - - - static_assert(sizeof(RenderPassDescriptor) == sizeof(WGPURenderPassDescriptor), "sizeof mismatch for RenderPassDescriptor"); - static_assert(alignof(RenderPassDescriptor) == alignof(WGPURenderPassDescriptor), "alignof mismatch for RenderPassDescriptor"); - - static_assert(offsetof(RenderPassDescriptor, nextInChain) == offsetof(WGPURenderPassDescriptor, nextInChain), - "offsetof mismatch for RenderPassDescriptor::nextInChain"); - static_assert(offsetof(RenderPassDescriptor, label) == offsetof(WGPURenderPassDescriptor, label), - "offsetof mismatch for RenderPassDescriptor::label"); - static_assert(offsetof(RenderPassDescriptor, colorAttachmentCount) == offsetof(WGPURenderPassDescriptor, colorAttachmentCount), - "offsetof mismatch for RenderPassDescriptor::colorAttachmentCount"); - static_assert(offsetof(RenderPassDescriptor, colorAttachments) == offsetof(WGPURenderPassDescriptor, colorAttachments), - "offsetof mismatch for RenderPassDescriptor::colorAttachments"); - static_assert(offsetof(RenderPassDescriptor, depthStencilAttachment) == offsetof(WGPURenderPassDescriptor, depthStencilAttachment), - "offsetof mismatch for RenderPassDescriptor::depthStencilAttachment"); - - - static_assert(sizeof(VertexStateDescriptor) == sizeof(WGPUVertexStateDescriptor), "sizeof mismatch for VertexStateDescriptor"); - static_assert(alignof(VertexStateDescriptor) == alignof(WGPUVertexStateDescriptor), "alignof mismatch for VertexStateDescriptor"); - - static_assert(offsetof(VertexStateDescriptor, nextInChain) == offsetof(WGPUVertexStateDescriptor, nextInChain), - "offsetof mismatch for VertexStateDescriptor::nextInChain"); - static_assert(offsetof(VertexStateDescriptor, indexFormat) == offsetof(WGPUVertexStateDescriptor, indexFormat), - "offsetof mismatch for VertexStateDescriptor::indexFormat"); - static_assert(offsetof(VertexStateDescriptor, vertexBufferCount) == offsetof(WGPUVertexStateDescriptor, vertexBufferCount), - "offsetof mismatch for VertexStateDescriptor::vertexBufferCount"); - static_assert(offsetof(VertexStateDescriptor, vertexBuffers) == offsetof(WGPUVertexStateDescriptor, vertexBuffers), - "offsetof mismatch for VertexStateDescriptor::vertexBuffers"); - - - static_assert(sizeof(RenderPipelineDescriptor) == sizeof(WGPURenderPipelineDescriptor), "sizeof mismatch for RenderPipelineDescriptor"); - static_assert(alignof(RenderPipelineDescriptor) == alignof(WGPURenderPipelineDescriptor), "alignof mismatch for RenderPipelineDescriptor"); - - static_assert(offsetof(RenderPipelineDescriptor, nextInChain) == offsetof(WGPURenderPipelineDescriptor, nextInChain), - "offsetof mismatch for RenderPipelineDescriptor::nextInChain"); - static_assert(offsetof(RenderPipelineDescriptor, label) == offsetof(WGPURenderPipelineDescriptor, label), - "offsetof mismatch for RenderPipelineDescriptor::label"); - static_assert(offsetof(RenderPipelineDescriptor, layout) == offsetof(WGPURenderPipelineDescriptor, layout), - "offsetof mismatch for RenderPipelineDescriptor::layout"); - static_assert(offsetof(RenderPipelineDescriptor, vertexStage) == offsetof(WGPURenderPipelineDescriptor, vertexStage), - "offsetof mismatch for RenderPipelineDescriptor::vertexStage"); - static_assert(offsetof(RenderPipelineDescriptor, fragmentStage) == offsetof(WGPURenderPipelineDescriptor, fragmentStage), - "offsetof mismatch for RenderPipelineDescriptor::fragmentStage"); - static_assert(offsetof(RenderPipelineDescriptor, vertexState) == offsetof(WGPURenderPipelineDescriptor, vertexState), - "offsetof mismatch for RenderPipelineDescriptor::vertexState"); - static_assert(offsetof(RenderPipelineDescriptor, primitiveTopology) == offsetof(WGPURenderPipelineDescriptor, primitiveTopology), - "offsetof mismatch for RenderPipelineDescriptor::primitiveTopology"); - static_assert(offsetof(RenderPipelineDescriptor, rasterizationState) == offsetof(WGPURenderPipelineDescriptor, rasterizationState), - "offsetof mismatch for RenderPipelineDescriptor::rasterizationState"); - static_assert(offsetof(RenderPipelineDescriptor, sampleCount) == offsetof(WGPURenderPipelineDescriptor, sampleCount), - "offsetof mismatch for RenderPipelineDescriptor::sampleCount"); - static_assert(offsetof(RenderPipelineDescriptor, depthStencilState) == offsetof(WGPURenderPipelineDescriptor, depthStencilState), - "offsetof mismatch for RenderPipelineDescriptor::depthStencilState"); - static_assert(offsetof(RenderPipelineDescriptor, colorStateCount) == offsetof(WGPURenderPipelineDescriptor, colorStateCount), - "offsetof mismatch for RenderPipelineDescriptor::colorStateCount"); - static_assert(offsetof(RenderPipelineDescriptor, colorStates) == offsetof(WGPURenderPipelineDescriptor, colorStates), - "offsetof mismatch for RenderPipelineDescriptor::colorStates"); - static_assert(offsetof(RenderPipelineDescriptor, sampleMask) == offsetof(WGPURenderPipelineDescriptor, sampleMask), - "offsetof mismatch for RenderPipelineDescriptor::sampleMask"); - static_assert(offsetof(RenderPipelineDescriptor, alphaToCoverageEnabled) == offsetof(WGPURenderPipelineDescriptor, alphaToCoverageEnabled), - "offsetof mismatch for RenderPipelineDescriptor::alphaToCoverageEnabled"); - - - - static_assert(sizeof(BindGroup) == sizeof(WGPUBindGroup), "sizeof mismatch for BindGroup"); - static_assert(alignof(BindGroup) == alignof(WGPUBindGroup), "alignof mismatch for BindGroup"); - - - - void BindGroup::WGPUReference(WGPUBindGroup handle) { - if (handle != nullptr) { - wgpuBindGroupReference(handle); - } - } - void BindGroup::WGPURelease(WGPUBindGroup handle) { - if (handle != nullptr) { - wgpuBindGroupRelease(handle); - } - } - - - static_assert(sizeof(BindGroupLayout) == sizeof(WGPUBindGroupLayout), "sizeof mismatch for BindGroupLayout"); - static_assert(alignof(BindGroupLayout) == alignof(WGPUBindGroupLayout), "alignof mismatch for BindGroupLayout"); - - - - void BindGroupLayout::WGPUReference(WGPUBindGroupLayout handle) { - if (handle != nullptr) { - wgpuBindGroupLayoutReference(handle); - } - } - void BindGroupLayout::WGPURelease(WGPUBindGroupLayout handle) { - if (handle != nullptr) { - wgpuBindGroupLayoutRelease(handle); - } - } - - - static_assert(sizeof(Buffer) == sizeof(WGPUBuffer), "sizeof mismatch for Buffer"); - static_assert(alignof(Buffer) == alignof(WGPUBuffer), "alignof mismatch for Buffer"); - - - - void Buffer::Destroy() const { - wgpuBufferDestroy(Get()); - } - void Buffer::MapReadAsync(BufferMapReadCallback callback, void * userdata) const { - wgpuBufferMapReadAsync(Get(), callback, reinterpret_cast(userdata)); - } - void Buffer::MapWriteAsync(BufferMapWriteCallback callback, void * userdata) const { - wgpuBufferMapWriteAsync(Get(), callback, reinterpret_cast(userdata)); - } - void Buffer::SetSubData(uint64_t start, uint64_t count, void const * data) const { - wgpuBufferSetSubData(Get(), start, count, reinterpret_cast(data)); - } - void Buffer::Unmap() const { - wgpuBufferUnmap(Get()); - } - void Buffer::WGPUReference(WGPUBuffer handle) { - if (handle != nullptr) { - wgpuBufferReference(handle); - } - } - void Buffer::WGPURelease(WGPUBuffer handle) { - if (handle != nullptr) { - wgpuBufferRelease(handle); - } - } - - - static_assert(sizeof(CommandBuffer) == sizeof(WGPUCommandBuffer), "sizeof mismatch for CommandBuffer"); - static_assert(alignof(CommandBuffer) == alignof(WGPUCommandBuffer), "alignof mismatch for CommandBuffer"); - - - - void CommandBuffer::WGPUReference(WGPUCommandBuffer handle) { - if (handle != nullptr) { - wgpuCommandBufferReference(handle); - } - } - void CommandBuffer::WGPURelease(WGPUCommandBuffer handle) { - if (handle != nullptr) { - wgpuCommandBufferRelease(handle); - } - } - - - static_assert(sizeof(CommandEncoder) == sizeof(WGPUCommandEncoder), "sizeof mismatch for CommandEncoder"); - static_assert(alignof(CommandEncoder) == alignof(WGPUCommandEncoder), "alignof mismatch for CommandEncoder"); - - - - ComputePassEncoder CommandEncoder::BeginComputePass(ComputePassDescriptor const * descriptor) const { - auto result = wgpuCommandEncoderBeginComputePass(Get(), reinterpret_cast(descriptor)); - return ComputePassEncoder::Acquire(result); - } - RenderPassEncoder CommandEncoder::BeginRenderPass(RenderPassDescriptor const * descriptor) const { - auto result = wgpuCommandEncoderBeginRenderPass(Get(), reinterpret_cast(descriptor)); - return RenderPassEncoder::Acquire(result); - } - void CommandEncoder::CopyBufferToBuffer(Buffer const& source, uint64_t sourceOffset, Buffer const& destination, uint64_t destinationOffset, uint64_t size) const { - wgpuCommandEncoderCopyBufferToBuffer(Get(), source.Get(), sourceOffset, destination.Get(), destinationOffset, size); - } - void CommandEncoder::CopyBufferToTexture(BufferCopyView const * source, TextureCopyView const * destination, Extent3D const * copySize) const { - wgpuCommandEncoderCopyBufferToTexture(Get(), reinterpret_cast(source), reinterpret_cast(destination), reinterpret_cast(copySize)); - } - void CommandEncoder::CopyTextureToBuffer(TextureCopyView const * source, BufferCopyView const * destination, Extent3D const * copySize) const { - wgpuCommandEncoderCopyTextureToBuffer(Get(), reinterpret_cast(source), reinterpret_cast(destination), reinterpret_cast(copySize)); - } - void CommandEncoder::CopyTextureToTexture(TextureCopyView const * source, TextureCopyView const * destination, Extent3D const * copySize) const { - wgpuCommandEncoderCopyTextureToTexture(Get(), reinterpret_cast(source), reinterpret_cast(destination), reinterpret_cast(copySize)); - } - CommandBuffer CommandEncoder::Finish(CommandBufferDescriptor const * descriptor) const { - auto result = wgpuCommandEncoderFinish(Get(), reinterpret_cast(descriptor)); - return CommandBuffer::Acquire(result); - } - void CommandEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuCommandEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void CommandEncoder::PopDebugGroup() const { - wgpuCommandEncoderPopDebugGroup(Get()); - } - void CommandEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuCommandEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void CommandEncoder::WGPUReference(WGPUCommandEncoder handle) { - if (handle != nullptr) { - wgpuCommandEncoderReference(handle); - } - } - void CommandEncoder::WGPURelease(WGPUCommandEncoder handle) { - if (handle != nullptr) { - wgpuCommandEncoderRelease(handle); - } - } - - - static_assert(sizeof(ComputePassEncoder) == sizeof(WGPUComputePassEncoder), "sizeof mismatch for ComputePassEncoder"); - static_assert(alignof(ComputePassEncoder) == alignof(WGPUComputePassEncoder), "alignof mismatch for ComputePassEncoder"); - - - - void ComputePassEncoder::Dispatch(uint32_t x, uint32_t y, uint32_t z) const { - wgpuComputePassEncoderDispatch(Get(), x, y, z); - } - void ComputePassEncoder::DispatchIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuComputePassEncoderDispatchIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void ComputePassEncoder::EndPass() const { - wgpuComputePassEncoderEndPass(Get()); - } - void ComputePassEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuComputePassEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void ComputePassEncoder::PopDebugGroup() const { - wgpuComputePassEncoderPopDebugGroup(Get()); - } - void ComputePassEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuComputePassEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void ComputePassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const { - wgpuComputePassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast(dynamicOffsets)); - } - void ComputePassEncoder::SetPipeline(ComputePipeline const& pipeline) const { - wgpuComputePassEncoderSetPipeline(Get(), pipeline.Get()); - } - void ComputePassEncoder::WGPUReference(WGPUComputePassEncoder handle) { - if (handle != nullptr) { - wgpuComputePassEncoderReference(handle); - } - } - void ComputePassEncoder::WGPURelease(WGPUComputePassEncoder handle) { - if (handle != nullptr) { - wgpuComputePassEncoderRelease(handle); - } - } - - - static_assert(sizeof(ComputePipeline) == sizeof(WGPUComputePipeline), "sizeof mismatch for ComputePipeline"); - static_assert(alignof(ComputePipeline) == alignof(WGPUComputePipeline), "alignof mismatch for ComputePipeline"); - - - - BindGroupLayout ComputePipeline::GetBindGroupLayout(uint32_t groupIndex) const { - auto result = wgpuComputePipelineGetBindGroupLayout(Get(), groupIndex); - return BindGroupLayout::Acquire(result); - } - void ComputePipeline::WGPUReference(WGPUComputePipeline handle) { - if (handle != nullptr) { - wgpuComputePipelineReference(handle); - } - } - void ComputePipeline::WGPURelease(WGPUComputePipeline handle) { - if (handle != nullptr) { - wgpuComputePipelineRelease(handle); - } - } - - - static_assert(sizeof(Device) == sizeof(WGPUDevice), "sizeof mismatch for Device"); - static_assert(alignof(Device) == alignof(WGPUDevice), "alignof mismatch for Device"); - - - - BindGroup Device::CreateBindGroup(BindGroupDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBindGroup(Get(), reinterpret_cast(descriptor)); - return BindGroup::Acquire(result); - } - BindGroupLayout Device::CreateBindGroupLayout(BindGroupLayoutDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBindGroupLayout(Get(), reinterpret_cast(descriptor)); - return BindGroupLayout::Acquire(result); - } - Buffer Device::CreateBuffer(BufferDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBuffer(Get(), reinterpret_cast(descriptor)); - return Buffer::Acquire(result); - } - CreateBufferMappedResult Device::CreateBufferMapped(BufferDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateBufferMapped(Get(), reinterpret_cast(descriptor)); - return CreateBufferMappedResult { - Buffer::Acquire(result.buffer), - result.dataLength, - result.data - }; - } - CommandEncoder Device::CreateCommandEncoder(CommandEncoderDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateCommandEncoder(Get(), reinterpret_cast(descriptor)); - return CommandEncoder::Acquire(result); - } - ComputePipeline Device::CreateComputePipeline(ComputePipelineDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateComputePipeline(Get(), reinterpret_cast(descriptor)); - return ComputePipeline::Acquire(result); - } - PipelineLayout Device::CreatePipelineLayout(PipelineLayoutDescriptor const * descriptor) const { - auto result = wgpuDeviceCreatePipelineLayout(Get(), reinterpret_cast(descriptor)); - return PipelineLayout::Acquire(result); - } - RenderBundleEncoder Device::CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateRenderBundleEncoder(Get(), reinterpret_cast(descriptor)); - return RenderBundleEncoder::Acquire(result); - } - RenderPipeline Device::CreateRenderPipeline(RenderPipelineDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateRenderPipeline(Get(), reinterpret_cast(descriptor)); - return RenderPipeline::Acquire(result); - } - Sampler Device::CreateSampler(SamplerDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateSampler(Get(), reinterpret_cast(descriptor)); - return Sampler::Acquire(result); - } - ShaderModule Device::CreateShaderModule(ShaderModuleDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateShaderModule(Get(), reinterpret_cast(descriptor)); - return ShaderModule::Acquire(result); - } - SwapChain Device::CreateSwapChain(Surface const& surface, SwapChainDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateSwapChain(Get(), surface.Get(), reinterpret_cast(descriptor)); - return SwapChain::Acquire(result); - } - Texture Device::CreateTexture(TextureDescriptor const * descriptor) const { - auto result = wgpuDeviceCreateTexture(Get(), reinterpret_cast(descriptor)); - return Texture::Acquire(result); - } - Queue Device::GetDefaultQueue() const { - auto result = wgpuDeviceGetDefaultQueue(Get()); - return Queue::Acquire(result); - } - void Device::InjectError(ErrorType type, char const * message) const { - wgpuDeviceInjectError(Get(), static_cast(type), reinterpret_cast(message)); - } - void Device::LoseForTesting() const { - wgpuDeviceLoseForTesting(Get()); - } - bool Device::PopErrorScope(ErrorCallback callback, void * userdata) const { - auto result = wgpuDevicePopErrorScope(Get(), callback, reinterpret_cast(userdata)); - return result; - } - void Device::PushErrorScope(ErrorFilter filter) const { - wgpuDevicePushErrorScope(Get(), static_cast(filter)); - } - void Device::SetDeviceLostCallback(DeviceLostCallback callback, void * userdata) const { - wgpuDeviceSetDeviceLostCallback(Get(), callback, reinterpret_cast(userdata)); - } - void Device::SetUncapturedErrorCallback(ErrorCallback callback, void * userdata) const { - wgpuDeviceSetUncapturedErrorCallback(Get(), callback, reinterpret_cast(userdata)); - } - void Device::Tick() const { - wgpuDeviceTick(Get()); - } - void Device::WGPUReference(WGPUDevice handle) { - if (handle != nullptr) { - wgpuDeviceReference(handle); - } - } - void Device::WGPURelease(WGPUDevice handle) { - if (handle != nullptr) { - wgpuDeviceRelease(handle); - } - } - - - static_assert(sizeof(Fence) == sizeof(WGPUFence), "sizeof mismatch for Fence"); - static_assert(alignof(Fence) == alignof(WGPUFence), "alignof mismatch for Fence"); - - - - uint64_t Fence::GetCompletedValue() const { - auto result = wgpuFenceGetCompletedValue(Get()); - return result; - } - void Fence::OnCompletion(uint64_t value, FenceOnCompletionCallback callback, void * userdata) const { - wgpuFenceOnCompletion(Get(), value, callback, reinterpret_cast(userdata)); - } - void Fence::WGPUReference(WGPUFence handle) { - if (handle != nullptr) { - wgpuFenceReference(handle); - } - } - void Fence::WGPURelease(WGPUFence handle) { - if (handle != nullptr) { - wgpuFenceRelease(handle); - } - } - - - static_assert(sizeof(Instance) == sizeof(WGPUInstance), "sizeof mismatch for Instance"); - static_assert(alignof(Instance) == alignof(WGPUInstance), "alignof mismatch for Instance"); - - - - Surface Instance::CreateSurface(SurfaceDescriptor const * descriptor) const { - auto result = wgpuInstanceCreateSurface(Get(), reinterpret_cast(descriptor)); - return Surface::Acquire(result); - } - void Instance::WGPUReference(WGPUInstance handle) { - if (handle != nullptr) { - wgpuInstanceReference(handle); - } - } - void Instance::WGPURelease(WGPUInstance handle) { - if (handle != nullptr) { - wgpuInstanceRelease(handle); - } - } - - - static_assert(sizeof(PipelineLayout) == sizeof(WGPUPipelineLayout), "sizeof mismatch for PipelineLayout"); - static_assert(alignof(PipelineLayout) == alignof(WGPUPipelineLayout), "alignof mismatch for PipelineLayout"); - - - - void PipelineLayout::WGPUReference(WGPUPipelineLayout handle) { - if (handle != nullptr) { - wgpuPipelineLayoutReference(handle); - } - } - void PipelineLayout::WGPURelease(WGPUPipelineLayout handle) { - if (handle != nullptr) { - wgpuPipelineLayoutRelease(handle); - } - } - - - static_assert(sizeof(Queue) == sizeof(WGPUQueue), "sizeof mismatch for Queue"); - static_assert(alignof(Queue) == alignof(WGPUQueue), "alignof mismatch for Queue"); - - - - Fence Queue::CreateFence(FenceDescriptor const * descriptor) const { - auto result = wgpuQueueCreateFence(Get(), reinterpret_cast(descriptor)); - return Fence::Acquire(result); - } - void Queue::Signal(Fence const& fence, uint64_t signalValue) const { - wgpuQueueSignal(Get(), fence.Get(), signalValue); - } - void Queue::Submit(uint32_t commandCount, CommandBuffer const * commands) const { - wgpuQueueSubmit(Get(), commandCount, reinterpret_cast(commands)); - } - void Queue::WGPUReference(WGPUQueue handle) { - if (handle != nullptr) { - wgpuQueueReference(handle); - } - } - void Queue::WGPURelease(WGPUQueue handle) { - if (handle != nullptr) { - wgpuQueueRelease(handle); - } - } - - - static_assert(sizeof(RenderBundle) == sizeof(WGPURenderBundle), "sizeof mismatch for RenderBundle"); - static_assert(alignof(RenderBundle) == alignof(WGPURenderBundle), "alignof mismatch for RenderBundle"); - - - - void RenderBundle::WGPUReference(WGPURenderBundle handle) { - if (handle != nullptr) { - wgpuRenderBundleReference(handle); - } - } - void RenderBundle::WGPURelease(WGPURenderBundle handle) { - if (handle != nullptr) { - wgpuRenderBundleRelease(handle); - } - } - - - static_assert(sizeof(RenderBundleEncoder) == sizeof(WGPURenderBundleEncoder), "sizeof mismatch for RenderBundleEncoder"); - static_assert(alignof(RenderBundleEncoder) == alignof(WGPURenderBundleEncoder), "alignof mismatch for RenderBundleEncoder"); - - - - void RenderBundleEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const { - wgpuRenderBundleEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance); - } - void RenderBundleEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const { - wgpuRenderBundleEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance); - } - void RenderBundleEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderBundleEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void RenderBundleEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderBundleEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - RenderBundle RenderBundleEncoder::Finish(RenderBundleDescriptor const * descriptor) const { - auto result = wgpuRenderBundleEncoderFinish(Get(), reinterpret_cast(descriptor)); - return RenderBundle::Acquire(result); - } - void RenderBundleEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuRenderBundleEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void RenderBundleEncoder::PopDebugGroup() const { - wgpuRenderBundleEncoderPopDebugGroup(Get()); - } - void RenderBundleEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuRenderBundleEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void RenderBundleEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const { - wgpuRenderBundleEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast(dynamicOffsets)); - } - void RenderBundleEncoder::SetIndexBuffer(Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderBundleEncoderSetIndexBuffer(Get(), buffer.Get(), offset, size); - } - void RenderBundleEncoder::SetPipeline(RenderPipeline const& pipeline) const { - wgpuRenderBundleEncoderSetPipeline(Get(), pipeline.Get()); - } - void RenderBundleEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderBundleEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size); - } - void RenderBundleEncoder::WGPUReference(WGPURenderBundleEncoder handle) { - if (handle != nullptr) { - wgpuRenderBundleEncoderReference(handle); - } - } - void RenderBundleEncoder::WGPURelease(WGPURenderBundleEncoder handle) { - if (handle != nullptr) { - wgpuRenderBundleEncoderRelease(handle); - } - } - - - static_assert(sizeof(RenderPassEncoder) == sizeof(WGPURenderPassEncoder), "sizeof mismatch for RenderPassEncoder"); - static_assert(alignof(RenderPassEncoder) == alignof(WGPURenderPassEncoder), "alignof mismatch for RenderPassEncoder"); - - - - void RenderPassEncoder::Draw(uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const { - wgpuRenderPassEncoderDraw(Get(), vertexCount, instanceCount, firstVertex, firstInstance); - } - void RenderPassEncoder::DrawIndexed(uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) const { - wgpuRenderPassEncoderDrawIndexed(Get(), indexCount, instanceCount, firstIndex, baseVertex, firstInstance); - } - void RenderPassEncoder::DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderPassEncoderDrawIndexedIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void RenderPassEncoder::DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const { - wgpuRenderPassEncoderDrawIndirect(Get(), indirectBuffer.Get(), indirectOffset); - } - void RenderPassEncoder::EndPass() const { - wgpuRenderPassEncoderEndPass(Get()); - } - void RenderPassEncoder::ExecuteBundles(uint32_t bundlesCount, RenderBundle const * bundles) const { - wgpuRenderPassEncoderExecuteBundles(Get(), bundlesCount, reinterpret_cast(bundles)); - } - void RenderPassEncoder::InsertDebugMarker(char const * groupLabel) const { - wgpuRenderPassEncoderInsertDebugMarker(Get(), reinterpret_cast(groupLabel)); - } - void RenderPassEncoder::PopDebugGroup() const { - wgpuRenderPassEncoderPopDebugGroup(Get()); - } - void RenderPassEncoder::PushDebugGroup(char const * groupLabel) const { - wgpuRenderPassEncoderPushDebugGroup(Get(), reinterpret_cast(groupLabel)); - } - void RenderPassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const { - wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast(dynamicOffsets)); - } - void RenderPassEncoder::SetBlendColor(Color const * color) const { - wgpuRenderPassEncoderSetBlendColor(Get(), reinterpret_cast(color)); - } - void RenderPassEncoder::SetIndexBuffer(Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderPassEncoderSetIndexBuffer(Get(), buffer.Get(), offset, size); - } - void RenderPassEncoder::SetPipeline(RenderPipeline const& pipeline) const { - wgpuRenderPassEncoderSetPipeline(Get(), pipeline.Get()); - } - void RenderPassEncoder::SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const { - wgpuRenderPassEncoderSetScissorRect(Get(), x, y, width, height); - } - void RenderPassEncoder::SetStencilReference(uint32_t reference) const { - wgpuRenderPassEncoderSetStencilReference(Get(), reference); - } - void RenderPassEncoder::SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset, uint64_t size) const { - wgpuRenderPassEncoderSetVertexBuffer(Get(), slot, buffer.Get(), offset, size); - } - void RenderPassEncoder::SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const { - wgpuRenderPassEncoderSetViewport(Get(), x, y, width, height, minDepth, maxDepth); - } - void RenderPassEncoder::WGPUReference(WGPURenderPassEncoder handle) { - if (handle != nullptr) { - wgpuRenderPassEncoderReference(handle); - } - } - void RenderPassEncoder::WGPURelease(WGPURenderPassEncoder handle) { - if (handle != nullptr) { - wgpuRenderPassEncoderRelease(handle); - } - } - - - static_assert(sizeof(RenderPipeline) == sizeof(WGPURenderPipeline), "sizeof mismatch for RenderPipeline"); - static_assert(alignof(RenderPipeline) == alignof(WGPURenderPipeline), "alignof mismatch for RenderPipeline"); - - - - BindGroupLayout RenderPipeline::GetBindGroupLayout(uint32_t groupIndex) const { - auto result = wgpuRenderPipelineGetBindGroupLayout(Get(), groupIndex); - return BindGroupLayout::Acquire(result); - } - void RenderPipeline::WGPUReference(WGPURenderPipeline handle) { - if (handle != nullptr) { - wgpuRenderPipelineReference(handle); - } - } - void RenderPipeline::WGPURelease(WGPURenderPipeline handle) { - if (handle != nullptr) { - wgpuRenderPipelineRelease(handle); - } - } - - - static_assert(sizeof(Sampler) == sizeof(WGPUSampler), "sizeof mismatch for Sampler"); - static_assert(alignof(Sampler) == alignof(WGPUSampler), "alignof mismatch for Sampler"); - - - - void Sampler::WGPUReference(WGPUSampler handle) { - if (handle != nullptr) { - wgpuSamplerReference(handle); - } - } - void Sampler::WGPURelease(WGPUSampler handle) { - if (handle != nullptr) { - wgpuSamplerRelease(handle); - } - } - - - static_assert(sizeof(ShaderModule) == sizeof(WGPUShaderModule), "sizeof mismatch for ShaderModule"); - static_assert(alignof(ShaderModule) == alignof(WGPUShaderModule), "alignof mismatch for ShaderModule"); - - - - void ShaderModule::WGPUReference(WGPUShaderModule handle) { - if (handle != nullptr) { - wgpuShaderModuleReference(handle); - } - } - void ShaderModule::WGPURelease(WGPUShaderModule handle) { - if (handle != nullptr) { - wgpuShaderModuleRelease(handle); - } - } - - - static_assert(sizeof(Surface) == sizeof(WGPUSurface), "sizeof mismatch for Surface"); - static_assert(alignof(Surface) == alignof(WGPUSurface), "alignof mismatch for Surface"); - - - - void Surface::WGPUReference(WGPUSurface handle) { - if (handle != nullptr) { - wgpuSurfaceReference(handle); - } - } - void Surface::WGPURelease(WGPUSurface handle) { - if (handle != nullptr) { - wgpuSurfaceRelease(handle); - } - } - - - static_assert(sizeof(SwapChain) == sizeof(WGPUSwapChain), "sizeof mismatch for SwapChain"); - static_assert(alignof(SwapChain) == alignof(WGPUSwapChain), "alignof mismatch for SwapChain"); - - - - void SwapChain::Configure(TextureFormat format, TextureUsage allowedUsage, uint32_t width, uint32_t height) const { - wgpuSwapChainConfigure(Get(), static_cast(format), static_cast(allowedUsage), width, height); - } - TextureView SwapChain::GetCurrentTextureView() const { - auto result = wgpuSwapChainGetCurrentTextureView(Get()); - return TextureView::Acquire(result); - } - void SwapChain::Present() const { - wgpuSwapChainPresent(Get()); - } - void SwapChain::WGPUReference(WGPUSwapChain handle) { - if (handle != nullptr) { - wgpuSwapChainReference(handle); - } - } - void SwapChain::WGPURelease(WGPUSwapChain handle) { - if (handle != nullptr) { - wgpuSwapChainRelease(handle); - } - } - - - static_assert(sizeof(Texture) == sizeof(WGPUTexture), "sizeof mismatch for Texture"); - static_assert(alignof(Texture) == alignof(WGPUTexture), "alignof mismatch for Texture"); - - - - TextureView Texture::CreateView(TextureViewDescriptor const * descriptor) const { - auto result = wgpuTextureCreateView(Get(), reinterpret_cast(descriptor)); - return TextureView::Acquire(result); - } - void Texture::Destroy() const { - wgpuTextureDestroy(Get()); - } - void Texture::WGPUReference(WGPUTexture handle) { - if (handle != nullptr) { - wgpuTextureReference(handle); - } - } - void Texture::WGPURelease(WGPUTexture handle) { - if (handle != nullptr) { - wgpuTextureRelease(handle); - } - } - - - static_assert(sizeof(TextureView) == sizeof(WGPUTextureView), "sizeof mismatch for TextureView"); - static_assert(alignof(TextureView) == alignof(WGPUTextureView), "alignof mismatch for TextureView"); - - - - void TextureView::WGPUReference(WGPUTextureView handle) { - if (handle != nullptr) { - wgpuTextureViewReference(handle); - } - } - void TextureView::WGPURelease(WGPUTextureView handle) { - if (handle != nullptr) { - wgpuTextureViewRelease(handle); - } - } - - - Instance CreateInstance(const InstanceDescriptor* descriptor) { - const WGPUInstanceDescriptor* cDescriptor = - reinterpret_cast(descriptor); - return Instance::Acquire(wgpuCreateInstance(cDescriptor)); - } - - Proc GetProcAddress(Device const& device, const char* procName) { - return reinterpret_cast(wgpuGetProcAddress(device.Get(), procName)); - } - -} diff --git a/modules/dnn/src/dnn.cpp b/modules/dnn/src/dnn.cpp index 15c64c1d5b89..57e53f8f44a7 100644 --- a/modules/dnn/src/dnn.cpp +++ b/modules/dnn/src/dnn.cpp @@ -246,7 +246,7 @@ class BackendRegistry #ifdef HAVE_WEBGPU if(haveWGPU()) backends.push_back(std::make_pair(DNN_BACKEND_WGPU, DNN_TARGET_WGPU)); -#endif +#endif // HAVE_WEBGPU #ifdef HAVE_CUDA if (haveCUDA()) { @@ -1283,7 +1283,7 @@ struct Net::Impl : public detail::NetImplBase { #ifdef HAVE_WEBGPU return Ptr(new WGPUBackendWrapper(baseBuffer, host)); -#endif +#endif // HAVE_WEBGPU } else if (preferableBackend == DNN_BACKEND_CUDA) { @@ -2417,7 +2417,7 @@ struct Net::Impl : public detail::NetImplBase ld.backendNodes[DNN_BACKEND_WGPU] = Ptr(); } } -#endif +#endif // HAVE_WEBGPU } void initCUDABackend() { diff --git a/modules/dnn/src/layers/concat_layer.cpp b/modules/dnn/src/layers/concat_layer.cpp index 8a0f4a67c6b5..59c22755f3fe 100644 --- a/modules/dnn/src/layers/concat_layer.cpp +++ b/modules/dnn/src/layers/concat_layer.cpp @@ -47,6 +47,7 @@ #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #ifdef HAVE_OPENCL #include "opencl_kernels_dnn.hpp" @@ -116,7 +117,8 @@ class ConcatLayerImpl CV_FINAL : public ConcatLayer (backendId == DNN_BACKEND_HALIDE && haveHalide() && axis == 1 && !padding) || // By channels (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && haveInfEngine() && !padding) || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH || - (backendId == DNN_BACKEND_VKCOM && haveVulkan() && !padding); + (backendId == DNN_BACKEND_VKCOM && haveVulkan() && !padding) || + (backendId == DNN_BACKEND_WGPU && haveWGPU() && !padding); } class ChannelConcatInvoker : public ParallelLoopBody @@ -312,6 +314,18 @@ class ConcatLayerImpl CV_FINAL : public ConcatLayer return Ptr(); } + virtual Ptr initWGPU(const std::vector > &input) CV_OVERRIDE + { +#ifdef HAVE_WEBGPU + webgpu::Tensor in = WGPUTensor(input[0]); + int cAxis = clamp(axis, in.dimNum()); + std::shared_ptr op(new webgpu::OpConcat(cAxis)); + return Ptr(new WGPUBackendNode(input, op)); +#endif // HAVE_WEBGPU + return Ptr(); + } + + virtual Ptr initHalide(const std::vector > &input) CV_OVERRIDE { #ifdef HAVE_HALIDE diff --git a/modules/dnn/src/layers/convolution_layer.cpp b/modules/dnn/src/layers/convolution_layer.cpp index 5e5af51ba99a..b2b3088fa506 100644 --- a/modules/dnn/src/layers/convolution_layer.cpp +++ b/modules/dnn/src/layers/convolution_layer.cpp @@ -47,6 +47,7 @@ #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #include "opencv2/core/hal/hal.hpp" #include "opencv2/core/hal/intrin.hpp" @@ -303,7 +304,8 @@ class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl else if (kernel_size.size() == 2) return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_HALIDE || - (backendId == DNN_BACKEND_VKCOM && haveVulkan()); + (backendId == DNN_BACKEND_VKCOM && haveVulkan()) || + (backendId == DNN_BACKEND_WGPU && haveWGPU()); else return false; } @@ -581,6 +583,71 @@ class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl return Ptr(); } + virtual Ptr initWGPU(const std::vector > &inputs) CV_OVERRIDE + { +#ifdef HAVE_WEBGPU + int out_channel = blobs[0].size[0]; + bool has_bias = hasBias() || fusedBias; + int filter_size[2] = {kernel.height, kernel.width}; + int pad_size[2] = {pad.height, pad.width}; + int stride_size[2] = {stride.height, stride.width}; + int dilation_size[2] = {dilation.height, dilation.width}; + int activation = 0; + webgpu::Tensor input_tensor = WGPUTensor(inputs[0]); + int in_channel = input_tensor.dimSize(1); + int group = in_channel / blobs[0].size[1]; + + // TODO: support group > 1 + if (group != 1) + return Ptr(); + + int padding_mode; + if (padMode.empty()) + { + padding_mode = webgpu::wPaddingModeCaffe; + } + else if (padMode == "VALID") + { + padding_mode = webgpu::wPaddingModeValid; + } + else if (padMode == "SAME") + { + padding_mode = webgpu::wPaddingModeSame; + } + else + CV_Error(Error::StsError, "Unsupported padding mode " + padMode); + + std::shared_ptr op(new webgpu::OpConv(out_channel, has_bias, + filter_size, pad_size, + stride_size, dilation_size, + activation, group, + padding_mode)); + + std::vector > blobsWrapper; + + if (fusedWeights) + { + Mat wm; + weightsMat.copyTo(wm); // to handle the case of isContinuous() == false + wm = wm.reshape(1, blobs[0].dims, blobs[0].size); + blobsWrapper.push_back(Ptr(new WGPUBackendWrapper(wm))); + } + else + { + blobsWrapper.push_back(Ptr(new WGPUBackendWrapper(blobs[0]))); + } + + if (has_bias) + { + Mat biasesMat({out_channel}, CV_32F, &biasvec[0]); + blobsWrapper.push_back(Ptr(new WGPUBackendWrapper(biasesMat))); + } + + return Ptr(new WGPUBackendNode(inputs, op, blobsWrapper)); +#endif // HAVE_WEBGPU + return Ptr(); + } + virtual Ptr initHalide(const std::vector > &inputs) CV_OVERRIDE { #ifdef HAVE_HALIDE diff --git a/modules/dnn/src/layers/elementwise_layers.cpp b/modules/dnn/src/layers/elementwise_layers.cpp index 85b39ddfea68..dc7b98fbd78b 100644 --- a/modules/dnn/src/layers/elementwise_layers.cpp +++ b/modules/dnn/src/layers/elementwise_layers.cpp @@ -47,6 +47,7 @@ #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #include #include @@ -189,6 +190,14 @@ class ElementWiseLayer : public Func::Layer return Ptr(); } + virtual Ptr initWGPU(const std::vector >& inputs) CV_OVERRIDE + { +#ifdef HAVE_WEBGPU + return Ptr(new WGPUBackendNode(inputs, func.initWGPU())); +#endif // HAVE_WEBGPU + return Ptr(); + } + virtual bool tryFuse(Ptr& top) CV_OVERRIDE { return func.tryFuse(top); @@ -310,7 +319,8 @@ struct ReLUFunctor : public BaseFunctor return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_CUDA || backendId == DNN_BACKEND_HALIDE || - backendId == DNN_BACKEND_VKCOM; + backendId == DNN_BACKEND_VKCOM || + backendId == DNN_BACKEND_WGPU; } void apply(const float* srcptr, float* dstptr, int len, size_t planeSize, int cn0, int cn1) const @@ -436,6 +446,14 @@ struct ReLUFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + std::shared_ptr op(new webgpu::OpReLU(slope)); + return op; + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 1; } }; @@ -559,6 +577,14 @@ struct ReLU6Functor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 2; } }; @@ -651,6 +677,14 @@ struct TanHFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 1; } }; @@ -743,6 +777,14 @@ struct SwishFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 3; } }; @@ -840,6 +882,14 @@ struct MishFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 3; } }; @@ -932,6 +982,14 @@ struct SigmoidFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 3; } }; @@ -1024,6 +1082,14 @@ struct ELUFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 2; } }; @@ -1122,6 +1188,14 @@ struct AbsValFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 1; } }; @@ -1215,6 +1289,14 @@ struct BNLLFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 5; } }; @@ -1363,6 +1445,14 @@ struct PowerFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + bool tryFuse(Ptr& top) { if (power != 1.0f && shift != 0.0f) @@ -1526,6 +1616,14 @@ struct ChannelsPReLUFunctor : public BaseFunctor } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + std::shared_ptr initWGPU() + { + // TODO: add webgpu implementation + return std::shared_ptr(); + } +#endif // HAVE_WEBGPU + int64 getFLOPSPerElement() const { return 1; } }; diff --git a/modules/dnn/src/layers/lrn_layer.cpp b/modules/dnn/src/layers/lrn_layer.cpp index 71970a3f6bc6..3060f9fd973a 100644 --- a/modules/dnn/src/layers/lrn_layer.cpp +++ b/modules/dnn/src/layers/lrn_layer.cpp @@ -47,6 +47,7 @@ #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/dnn/shape_utils.hpp" @@ -108,7 +109,8 @@ class LRNLayerImpl CV_FINAL : public LRNLayer return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_CUDA || backendId == DNN_BACKEND_HALIDE || - (backendId == DNN_BACKEND_VKCOM && haveVulkan() && (size % 2 == 1) && (type == CHANNEL_NRM)); + (backendId == DNN_BACKEND_VKCOM && haveVulkan() && (size % 2 == 1) && (type == CHANNEL_NRM)) + || (backendId == DNN_BACKEND_WGPU && haveWGPU() && (size % 2 == 1) && (type == CHANNEL_NRM)); } #ifdef HAVE_OPENCL @@ -371,6 +373,15 @@ class LRNLayerImpl CV_FINAL : public LRNLayer return Ptr(); } + virtual Ptr initWGPU(const std::vector > &inputs) CV_OVERRIDE + { +#ifdef HAVE_WEBGPU + std::shared_ptr op(new webgpu::OpLRN(size / 2, bias, alpha, beta, normBySize)); + return Ptr(new WGPUBackendNode(inputs, op)); +#endif // HAVE_WEBGPU + return Ptr(); + } + virtual Ptr initHalide(const std::vector > &inputs) CV_OVERRIDE { #ifdef HAVE_HALIDE diff --git a/modules/dnn/src/layers/permute_layer.cpp b/modules/dnn/src/layers/permute_layer.cpp index 943e347ff617..cff9d9c80760 100644 --- a/modules/dnn/src/layers/permute_layer.cpp +++ b/modules/dnn/src/layers/permute_layer.cpp @@ -46,6 +46,7 @@ #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #include #include @@ -116,7 +117,8 @@ class PermuteLayerImpl CV_FINAL : public PermuteLayer return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_CUDA || ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && haveInfEngine()) || - (backendId == DNN_BACKEND_VKCOM && haveVulkan()); + (backendId == DNN_BACKEND_VKCOM && haveVulkan()) || + (backendId == DNN_BACKEND_WGPU && haveWGPU());; } bool getMemoryShapes(const std::vector &inputs, @@ -427,6 +429,14 @@ class PermuteLayerImpl CV_FINAL : public PermuteLayer } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + virtual Ptr initWGPU(const std::vector > &input) CV_OVERRIDE + { + CV_Assert(!_order.empty()); + std::shared_ptr op(new webgpu::OpPermute(_order)); + return Ptr(new WGPUBackendNode(input, op)); + } +#endif // HAVE_VULKAN size_t _count; std::vector _order; diff --git a/modules/dnn/src/layers/pooling_layer.cpp b/modules/dnn/src/layers/pooling_layer.cpp index fc3bc4fc361b..272175ee5254 100644 --- a/modules/dnn/src/layers/pooling_layer.cpp +++ b/modules/dnn/src/layers/pooling_layer.cpp @@ -54,6 +54,7 @@ #endif #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #include #include @@ -211,7 +212,8 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer { return !computeMaxIdx && type != STOCHASTIC; } - if (backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_HALIDE || backendId == DNN_BACKEND_VKCOM) + if (backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_HALIDE || + backendId == DNN_BACKEND_VKCOM || backendId == DNN_BACKEND_WGPU) { if (kernel_size.size() == 3) return (backendId == DNN_BACKEND_OPENCV && preferableTarget == DNN_TARGET_CPU); @@ -220,6 +222,8 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer (backendId == DNN_BACKEND_HALIDE && haveHalide() && (type == MAX || (type == AVE && !pad_t && !pad_l && !pad_b && !pad_r))) || (backendId == DNN_BACKEND_VKCOM && haveVulkan() && + (type == MAX || type == AVE)) || + (backendId == DNN_BACKEND_WGPU && haveWGPU() && (type == MAX || type == AVE)); else return false; @@ -444,6 +448,39 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer } #endif +#ifdef HAVE_WEBGPU + virtual Ptr initWGPU(const std::vector > &inputs) CV_OVERRIDE + { + int padding_mode; + webgpu::PoolType pool_type; + int filter_size[2] = {kernel.height, kernel.width}; + int pad_size[2] = {pad.height, pad.width}; + int stride_size[2] = {stride.height, stride.width}; + pool_type = type == MAX ? webgpu::PoolType::wPoolTypeMax: + (type == AVE ? webgpu::PoolType::wPoolTypeAvg: + webgpu::PoolType::wPoolTypeNum); + + if (padMode.empty()) + { + padding_mode = webgpu::wPaddingModeCaffe; + } + else if (padMode == "VALID") + { + padding_mode = webgpu::wPaddingModeValid; + } + else if (padMode == "SAME") + { + padding_mode = webgpu::wPaddingModeSame; + } + else + CV_Error(Error::StsError, "Unsupported padding mode " + padMode); + + std::shared_ptr op(new webgpu::OpPool(filter_size, pad_size, + stride_size, padding_mode, + pool_type, avePoolPaddedArea)); + return Ptr(new WGPUBackendNode(inputs, op)); + } +#endif // HAVE_WEBGPU virtual Ptr initHalide(const std::vector > &inputs) CV_OVERRIDE { diff --git a/modules/dnn/src/layers/prior_box_layer.cpp b/modules/dnn/src/layers/prior_box_layer.cpp index c06065d566a3..8606ff4cea2d 100644 --- a/modules/dnn/src/layers/prior_box_layer.cpp +++ b/modules/dnn/src/layers/prior_box_layer.cpp @@ -52,6 +52,7 @@ #endif #include "../op_vkcom.hpp" +#include "../op_webgpu.hpp" #include #include @@ -295,7 +296,8 @@ class PriorBoxLayerImpl CV_FINAL : public PriorBoxLayer backendId == DNN_BACKEND_CUDA || (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && haveInfEngine() && ( _explicitSizes || (_minSize.size() == 1 && _maxSize.size() <= 1))) - || (backendId == DNN_BACKEND_VKCOM && haveVulkan()); + || (backendId == DNN_BACKEND_VKCOM && haveVulkan()) + || (backendId == DNN_BACKEND_WGPU && haveWGPU()); } bool getMemoryShapes(const std::vector &inputs, @@ -681,6 +683,17 @@ class PriorBoxLayerImpl CV_FINAL : public PriorBoxLayer } #endif // HAVE_VULKAN +#ifdef HAVE_WEBGPU + virtual Ptr initWGPU(const std::vector > &input) CV_OVERRIDE + { + std::shared_ptr op(new webgpu::OpPriorBox(_stepX, _stepY, + _clip, _numPriors, + _variance, _offsetsX, + _offsetsY, _boxWidths, + _boxHeights)); + return Ptr(new WGPUBackendNode(input, op)); + } +#endif // HAVE_WEBGPU virtual int64 getFLOPS(const std::vector &inputs, const std::vector &outputs) const CV_OVERRIDE diff --git a/modules/dnn/src/layers/softmax_layer.cpp b/modules/dnn/src/layers/softmax_layer.cpp index 2ffdd57949ac..3e58baa6b862 100644 --- a/modules/dnn/src/layers/softmax_layer.cpp +++ b/modules/dnn/src/layers/softmax_layer.cpp @@ -325,12 +325,12 @@ class SoftMaxLayerImpl CV_FINAL : public SoftmaxLayer virtual Ptr initWGPU(const std::vector > &inputs) CV_OVERRIDE { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU webgpu::Tensor in = WGPUTensor(inputs[0]); int cAxis = clamp(axisRaw, in.dimNum()); std::shared_ptr op(new webgpu::OpSoftmax(cAxis, logSoftMax)); return Ptr(new WGPUBackendNode(inputs, op)); -// #endif // HAVE_WEBGPU +#endif // HAVE_WEBGPU return Ptr(); } diff --git a/modules/dnn/src/op_webgpu.cpp b/modules/dnn/src/op_webgpu.cpp index ddc876e2978e..196cd8e27b32 100644 --- a/modules/dnn/src/op_webgpu.cpp +++ b/modules/dnn/src/op_webgpu.cpp @@ -6,7 +6,7 @@ namespace cv { namespace dnn { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU void copyToTensor(webgpu::Tensor &dst, const Mat &src) { CV_Assert(src.isContinuous() && src.type() == CV_32F); @@ -42,8 +42,7 @@ std::vector WGPUTensors(const std::vector > return vec; } -WGPUBackendWrapper::WGPUBackendWrapper(Mat& m) -: BackendWrapper(DNN_BACKEND_WGPU, DNN_TARGET_WGPU) +WGPUBackendWrapper::WGPUBackendWrapper(Mat& m) : BackendWrapper(DNN_BACKEND_WGPU, DNN_TARGET_WGPU) { copyToTensor(tensor, m); host = &m; @@ -120,8 +119,6 @@ bool WGPUBackendNode::forward(std::vector& outs) return operation->forward(ins, blobs, outs); } -// #endif //HAVE_WEBGPU - void setBackendWrappersDirty(std::vector >& ptrs) { for (const Ptr& ptr : ptrs) @@ -129,19 +126,19 @@ void setBackendWrappersDirty(std::vector >& ptrs) ptr.dynamicCast()->setDeviceDirty(); } } +#endif // HAVE_WEBGPU void forwardWGPU(std::vector > &outputs, const Ptr& node) { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU CV_Assert(!node.empty()); Ptr node_ = node.dynamicCast(); std::vector outs = WGPUTensors(outputs); node_->forward(outs); setBackendWrappersDirty(outputs); - -// #endif +#endif // HAVE_WEBGPU } bool haveWGPU() diff --git a/modules/dnn/src/op_webgpu.hpp b/modules/dnn/src/op_webgpu.hpp index 089da35e09fd..53007621696e 100644 --- a/modules/dnn/src/op_webgpu.hpp +++ b/modules/dnn/src/op_webgpu.hpp @@ -2,15 +2,15 @@ #define OPENCV_DNN_OP_WEBGPU_HPP #include -// #ifdef HAVE_WEBGP&U +#ifdef HAVE_WEBGPU #include "webgpu/include/wgpucom.hpp" -// #endif // HAVE_WEBGPU +#endif // HAVE_WEBGPU namespace cv { namespace dnn { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU std::vector WGPUTensors( const std::vector >& ptrs); webgpu::Tensor WGPUTensor(const Ptr& ptr); @@ -53,7 +53,7 @@ namespace dnn std::vector > inputsWrapper_; std::shared_ptr operation; }; -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU void forwardWGPU(std::vector > &outputs, const Ptr& node); diff --git a/modules/dnn/src/precomp.hpp b/modules/dnn/src/precomp.hpp index 4390264e5590..adda226a3b91 100644 --- a/modules/dnn/src/precomp.hpp +++ b/modules/dnn/src/precomp.hpp @@ -40,6 +40,7 @@ //M*/ #include +#include "cvconfig.h" #ifndef CV_OCL4DNN #define CV_OCL4DNN 0 @@ -65,6 +66,12 @@ #undef HAVE_CUDA #endif +#include +#include + #include #include -#include \ No newline at end of file +#include +#include + +#include "dnn_common.hpp" \ No newline at end of file diff --git a/modules/dnn/src/webgpu/dawn/dawnUtils.cpp b/modules/dnn/src/webgpu/dawn/dawnUtils.cpp index 22862d45936f..23a1a6347e0f 100644 --- a/modules/dnn/src/webgpu/dawn/dawnUtils.cpp +++ b/modules/dnn/src/webgpu/dawn/dawnUtils.cpp @@ -1,26 +1,14 @@ -#include -// #ifdef HAVE_WEBGPU -#include -#include -#include -#include -#include "opencv2/core/base.hpp" -#include "dawnUtils.hpp" -// #endif #include -#include -#include -#include #include -#include +#include "dawnUtils.hpp" +#include "opencv2/core/base.hpp" namespace cv { namespace dnn { namespace webgpu { +#ifdef HAVE_WEBGPU -// #ifdef HAVE_WEBGPU - -static dawn_native::Instance* instance; +static std::shared_ptr instance; static wgpu::BackendType backendType = wgpu::BackendType::Vulkan; -void PrintDeviceError(WGPUErrorType errorType, const char* message, void*) { +void PrintDeviceError(WGPUErrorType errorType, const char* message, void*) { String errorTypeName = ""; switch (errorType) { case WGPUErrorType_Validation: @@ -39,13 +27,13 @@ void PrintDeviceError(WGPUErrorType errorType, const char* message, void*) { errorTypeName = "WGPUErrorTyp Unknown"; return; } - errorTypeName += " Error message:"; + errorTypeName += "Error message: "; errorTypeName += message; CV_Error(Error::StsError, errorTypeName); } wgpu::Device createCppDawnDevice() { - instance = new dawn_native::Instance(); + instance = std::make_shared(); instance->DiscoverDefaultAdapters(); // Get an adapter for the backend to use, and create the device. dawn_native::Adapter backendAdapter; @@ -66,53 +54,6 @@ wgpu::Device createCppDawnDevice() { return wgpu::Device::Acquire(backendDevice); } -wgpu::Buffer CreateBufferFromData(const wgpu::Device& device, - const void* data, - size_t size, - wgpu::BufferUsage usage) { - wgpu::BufferDescriptor descriptor; - descriptor.size = size; - descriptor.usage = usage | wgpu::BufferUsage::CopyDst; - - wgpu::Buffer buffer = device.CreateBuffer(&descriptor); - buffer.SetSubData(0, size, data); - return buffer; -} - -wgpu::CreateBufferMappedResult CreateBufferMappedFromData(const wgpu::Device& device, - const void* data, - size_t size, - wgpu::BufferUsage usage){ - wgpu::BufferDescriptor descriptor = {}; - descriptor.size = size; - descriptor.usage = usage | wgpu::BufferUsage::CopyDst; - wgpu::CreateBufferMappedResult result = device.CreateBufferMapped(&descriptor); - if(data) { memcpy(result.data, data, size); } - return result; -} - -wgpu::PipelineLayout MakeBasicPipelineLayout(const wgpu::Device& device, - const wgpu::BindGroupLayout* bindGroupLayout) { - wgpu::PipelineLayoutDescriptor descriptor; - if (bindGroupLayout != nullptr) { - descriptor.bindGroupLayoutCount = 1; - descriptor.bindGroupLayouts = bindGroupLayout; - } else { - descriptor.bindGroupLayoutCount = 0; - descriptor.bindGroupLayouts = nullptr; - } - return device.CreatePipelineLayout(&descriptor); -} - -wgpu::BindGroupLayout MakeBindGroupLayout( - const wgpu::Device& device, - std::vector entriesInitializer) { - wgpu::BindGroupLayoutDescriptor descriptor; - descriptor.entryCount = static_cast(entriesInitializer.size()); - descriptor.entries = entriesInitializer.data(); - return device.CreateBindGroupLayout(&descriptor); -} - -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} //namespace cv::dnn::webgpu \ No newline at end of file diff --git a/modules/dnn/src/webgpu/dawn/dawnUtils.hpp b/modules/dnn/src/webgpu/dawn/dawnUtils.hpp index ca7151ad9983..4909f13855bf 100644 --- a/modules/dnn/src/webgpu/dawn/dawnUtils.hpp +++ b/modules/dnn/src/webgpu/dawn/dawnUtils.hpp @@ -1,32 +1,14 @@ -// #ifdef HAVE_WEBGPU +#include "../../precomp.hpp" +#ifdef HAVE_WEBGPU #include -// #endif -#include -#include -#include +#include +#include +#endif // HAVE_WEBGPU namespace cv { namespace dnn { namespace webgpu { +#ifdef HAVE_WEBGPU -// #ifdef HAVE_WEBGPU + wgpu::Device createCppDawnDevice(); -wgpu::Device createCppDawnDevice(); +#endif //HAVE_WEBGPU -wgpu::Buffer CreateBufferFromData(const wgpu::Device& device, - const void* data, - size_t size, - wgpu::BufferUsage usage); - -wgpu::CreateBufferMappedResult CreateBufferMappedFromData(const wgpu::Device& device, - const void* data, - size_t size, - wgpu::BufferUsage usage); - -wgpu::PipelineLayout MakeBasicPipelineLayout(const wgpu::Device& device, - const wgpu::BindGroupLayout* bindGroupLayout); - -wgpu::BindGroupLayout MakeBindGroupLayout( - const wgpu::Device& device, - std::vector entriesInitializer); - -// #endif //HAVE_WEBGPU - -}}} // namespace cv::dnn::webgpu \ No newline at end of file +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/dawnAPITest/CMakeLists.txt b/modules/dnn/src/webgpu/dawnAPITest/CMakeLists.txt deleted file mode 100644 index 41ed5c90fe09..000000000000 --- a/modules/dnn/src/webgpu/dawnAPITest/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(WEBGPU VERSION 1.0) -set(OPENCV_SOURCE_DIR "/home/webml/GSoC/Forked/opencv") - -set(WEBGPU_INCLUDE_DIRS "${OPENCV_SOURCE_DIR}/3rdparty/include/webgpu/include") -set(WEBGPU_LIBRARIES "${OPENCV_SOURCE_DIR}/3rdparty/include/webgpu/lib") - -add_executable(WEBGPU helloCompute.cpp ${WEBGPU_LIBRARIES}/webgpu_cpp.cpp) -set_property(TARGET WEBGPU PROPERTY CXX_STANDARD 14) -include_directories(${WEBGPU_INCLUDE_DIRS} ) -target_link_directories(WEBGPU PUBLIC ${WEBGPU_LIBRARIES}) -target_link_libraries(WEBGPU PUBLIC dawn_wire dawn_proc dawn_native ) \ No newline at end of file diff --git a/modules/dnn/src/webgpu/dawnAPITest/helloCompute.cpp b/modules/dnn/src/webgpu/dawnAPITest/helloCompute.cpp deleted file mode 100644 index 1e6b93ad359e..000000000000 --- a/modules/dnn/src/webgpu/dawnAPITest/helloCompute.cpp +++ /dev/null @@ -1,319 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -// Refer to https://developers.google.com/web/updates/2019/08/get-started-with-gpu-compute-on-the-web -const char* computeShaderCode = R"(#version 450 - - layout(std430, set = 0, binding = 0) readonly buffer FirstMatrix { - vec2 size; - float numbers[]; - } firstMatrix; - - layout(std430, set = 0, binding = 1) readonly buffer SecondMatrix { - vec2 size; - float numbers[]; - } secondMatrix; - - layout(std430, set = 0, binding = 2) buffer ResultMatrix { - vec2 size; - float numbers[]; - } resultMatrix; - - void main() { - resultMatrix.size = vec2(firstMatrix.size.x, secondMatrix.size.y); - - ivec2 resultCell = ivec2(gl_GlobalInvocationID.x, gl_GlobalInvocationID.y); - float result = 0.0; - for (int i = 0; i < firstMatrix.size.y; i++) { - int a = i + resultCell.x * int(firstMatrix.size.y); - int b = resultCell.y + i * int(secondMatrix.size.y); - result += firstMatrix.numbers[a] * secondMatrix.numbers[b]; - } - - int index = resultCell.y + resultCell.x * int(secondMatrix.size.y); - resultMatrix.numbers[index] = result; - } -)"; -const uint32_t shaderBuffer[705] = { - 0x07230203,0x00010000,0x00080009,0x0000006a,0x00000000,0x00020011,0x00000001,0x0006000b, - 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, - 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000026,0x00060010,0x00000004, - 0x00000011,0x00000001,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, - 0x00000004,0x6e69616d,0x00000000,0x00060005,0x00000009,0x75736552,0x614d746c,0x78697274, - 0x00000000,0x00050006,0x00000009,0x00000000,0x657a6973,0x00000000,0x00050006,0x00000009, - 0x00000001,0x626d756e,0x00737265,0x00060005,0x0000000b,0x75736572,0x614d746c,0x78697274, - 0x00000000,0x00050005,0x0000000f,0x73726946,0x74614d74,0x00786972,0x00050006,0x0000000f, - 0x00000000,0x657a6973,0x00000000,0x00050006,0x0000000f,0x00000001,0x626d756e,0x00737265, - 0x00050005,0x00000011,0x73726966,0x74614d74,0x00786972,0x00060005,0x00000018,0x6f636553, - 0x614d646e,0x78697274,0x00000000,0x00050006,0x00000018,0x00000000,0x657a6973,0x00000000, - 0x00050006,0x00000018,0x00000001,0x626d756e,0x00737265,0x00060005,0x0000001a,0x6f636573, - 0x614d646e,0x78697274,0x00000000,0x00050005,0x00000023,0x75736572,0x6543746c,0x00006c6c, - 0x00080005,0x00000026,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044, - 0x00040005,0x00000030,0x75736572,0x0000746c,0x00030005,0x00000033,0x00000069,0x00030005, - 0x0000003f,0x00000061,0x00030005,0x00000048,0x00000062,0x00040005,0x0000005d,0x65646e69, - 0x00000078,0x00040047,0x00000008,0x00000006,0x00000004,0x00050048,0x00000009,0x00000000, - 0x00000023,0x00000000,0x00050048,0x00000009,0x00000001,0x00000023,0x00000008,0x00030047, - 0x00000009,0x00000003,0x00040047,0x0000000b,0x00000022,0x00000000,0x00040047,0x0000000b, - 0x00000021,0x00000002,0x00040047,0x0000000e,0x00000006,0x00000004,0x00040048,0x0000000f, - 0x00000000,0x00000018,0x00050048,0x0000000f,0x00000000,0x00000023,0x00000000,0x00040048, - 0x0000000f,0x00000001,0x00000018,0x00050048,0x0000000f,0x00000001,0x00000023,0x00000008, - 0x00030047,0x0000000f,0x00000003,0x00040047,0x00000011,0x00000022,0x00000000,0x00040047, - 0x00000011,0x00000021,0x00000000,0x00040047,0x00000017,0x00000006,0x00000004,0x00040048, - 0x00000018,0x00000000,0x00000018,0x00050048,0x00000018,0x00000000,0x00000023,0x00000000, - 0x00040048,0x00000018,0x00000001,0x00000018,0x00050048,0x00000018,0x00000001,0x00000023, - 0x00000008,0x00030047,0x00000018,0x00000003,0x00040047,0x0000001a,0x00000022,0x00000000, - 0x00040047,0x0000001a,0x00000021,0x00000001,0x00040047,0x00000026,0x0000000b,0x0000001c, - 0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,0x00000020, - 0x00040017,0x00000007,0x00000006,0x00000002,0x0003001d,0x00000008,0x00000006,0x0004001e, - 0x00000009,0x00000007,0x00000008,0x00040020,0x0000000a,0x00000002,0x00000009,0x0004003b, - 0x0000000a,0x0000000b,0x00000002,0x00040015,0x0000000c,0x00000020,0x00000001,0x0004002b, - 0x0000000c,0x0000000d,0x00000000,0x0003001d,0x0000000e,0x00000006,0x0004001e,0x0000000f, - 0x00000007,0x0000000e,0x00040020,0x00000010,0x00000002,0x0000000f,0x0004003b,0x00000010, - 0x00000011,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,0x0004002b,0x00000012, - 0x00000013,0x00000000,0x00040020,0x00000014,0x00000002,0x00000006,0x0003001d,0x00000017, - 0x00000006,0x0004001e,0x00000018,0x00000007,0x00000017,0x00040020,0x00000019,0x00000002, - 0x00000018,0x0004003b,0x00000019,0x0000001a,0x00000002,0x0004002b,0x00000012,0x0000001b, - 0x00000001,0x00040020,0x0000001f,0x00000002,0x00000007,0x00040017,0x00000021,0x0000000c, - 0x00000002,0x00040020,0x00000022,0x00000007,0x00000021,0x00040017,0x00000024,0x00000012, - 0x00000003,0x00040020,0x00000025,0x00000001,0x00000024,0x0004003b,0x00000025,0x00000026, - 0x00000001,0x00040020,0x00000027,0x00000001,0x00000012,0x00040020,0x0000002f,0x00000007, - 0x00000006,0x0004002b,0x00000006,0x00000031,0x00000000,0x00040020,0x00000032,0x00000007, - 0x0000000c,0x00020014,0x0000003d,0x0004002b,0x0000000c,0x00000051,0x00000001,0x00050036, - 0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000022, - 0x00000023,0x00000007,0x0004003b,0x0000002f,0x00000030,0x00000007,0x0004003b,0x00000032, - 0x00000033,0x00000007,0x0004003b,0x00000032,0x0000003f,0x00000007,0x0004003b,0x00000032, - 0x00000048,0x00000007,0x0004003b,0x00000032,0x0000005d,0x00000007,0x00060041,0x00000014, - 0x00000015,0x00000011,0x0000000d,0x00000013,0x0004003d,0x00000006,0x00000016,0x00000015, - 0x00060041,0x00000014,0x0000001c,0x0000001a,0x0000000d,0x0000001b,0x0004003d,0x00000006, - 0x0000001d,0x0000001c,0x00050050,0x00000007,0x0000001e,0x00000016,0x0000001d,0x00050041, - 0x0000001f,0x00000020,0x0000000b,0x0000000d,0x0003003e,0x00000020,0x0000001e,0x00050041, - 0x00000027,0x00000028,0x00000026,0x00000013,0x0004003d,0x00000012,0x00000029,0x00000028, - 0x0004007c,0x0000000c,0x0000002a,0x00000029,0x00050041,0x00000027,0x0000002b,0x00000026, - 0x0000001b,0x0004003d,0x00000012,0x0000002c,0x0000002b,0x0004007c,0x0000000c,0x0000002d, - 0x0000002c,0x00050050,0x00000021,0x0000002e,0x0000002a,0x0000002d,0x0003003e,0x00000023, - 0x0000002e,0x0003003e,0x00000030,0x00000031,0x0003003e,0x00000033,0x0000000d,0x000200f9, - 0x00000034,0x000200f8,0x00000034,0x000400f6,0x00000036,0x00000037,0x00000000,0x000200f9, - 0x00000038,0x000200f8,0x00000038,0x0004003d,0x0000000c,0x00000039,0x00000033,0x0004006f, - 0x00000006,0x0000003a,0x00000039,0x00060041,0x00000014,0x0000003b,0x00000011,0x0000000d, - 0x0000001b,0x0004003d,0x00000006,0x0000003c,0x0000003b,0x000500b8,0x0000003d,0x0000003e, - 0x0000003a,0x0000003c,0x000400fa,0x0000003e,0x00000035,0x00000036,0x000200f8,0x00000035, - 0x0004003d,0x0000000c,0x00000040,0x00000033,0x00050041,0x00000032,0x00000041,0x00000023, - 0x00000013,0x0004003d,0x0000000c,0x00000042,0x00000041,0x00060041,0x00000014,0x00000043, - 0x00000011,0x0000000d,0x0000001b,0x0004003d,0x00000006,0x00000044,0x00000043,0x0004006e, - 0x0000000c,0x00000045,0x00000044,0x00050084,0x0000000c,0x00000046,0x00000042,0x00000045, - 0x00050080,0x0000000c,0x00000047,0x00000040,0x00000046,0x0003003e,0x0000003f,0x00000047, - 0x00050041,0x00000032,0x00000049,0x00000023,0x0000001b,0x0004003d,0x0000000c,0x0000004a, - 0x00000049,0x0004003d,0x0000000c,0x0000004b,0x00000033,0x00060041,0x00000014,0x0000004c, - 0x0000001a,0x0000000d,0x0000001b,0x0004003d,0x00000006,0x0000004d,0x0000004c,0x0004006e, - 0x0000000c,0x0000004e,0x0000004d,0x00050084,0x0000000c,0x0000004f,0x0000004b,0x0000004e, - 0x00050080,0x0000000c,0x00000050,0x0000004a,0x0000004f,0x0003003e,0x00000048,0x00000050, - 0x0004003d,0x0000000c,0x00000052,0x0000003f,0x00060041,0x00000014,0x00000053,0x00000011, - 0x00000051,0x00000052,0x0004003d,0x00000006,0x00000054,0x00000053,0x0004003d,0x0000000c, - 0x00000055,0x00000048,0x00060041,0x00000014,0x00000056,0x0000001a,0x00000051,0x00000055, - 0x0004003d,0x00000006,0x00000057,0x00000056,0x00050085,0x00000006,0x00000058,0x00000054, - 0x00000057,0x0004003d,0x00000006,0x00000059,0x00000030,0x00050081,0x00000006,0x0000005a, - 0x00000059,0x00000058,0x0003003e,0x00000030,0x0000005a,0x000200f9,0x00000037,0x000200f8, - 0x00000037,0x0004003d,0x0000000c,0x0000005b,0x00000033,0x00050080,0x0000000c,0x0000005c, - 0x0000005b,0x00000051,0x0003003e,0x00000033,0x0000005c,0x000200f9,0x00000034,0x000200f8, - 0x00000036,0x00050041,0x00000032,0x0000005e,0x00000023,0x0000001b,0x0004003d,0x0000000c, - 0x0000005f,0x0000005e,0x00050041,0x00000032,0x00000060,0x00000023,0x00000013,0x0004003d, - 0x0000000c,0x00000061,0x00000060,0x00060041,0x00000014,0x00000062,0x0000001a,0x0000000d, - 0x0000001b,0x0004003d,0x00000006,0x00000063,0x00000062,0x0004006e,0x0000000c,0x00000064, - 0x00000063,0x00050084,0x0000000c,0x00000065,0x00000061,0x00000064,0x00050080,0x0000000c, - 0x00000066,0x0000005f,0x00000065,0x0003003e,0x0000005d,0x00000066,0x0004003d,0x0000000c, - 0x00000067,0x0000005d,0x0004003d,0x00000006,0x00000068,0x00000030,0x00060041,0x00000014, - 0x00000069,0x0000000b,0x00000051,0x00000067,0x0003003e,0x00000069,0x00000068,0x000100fd, - 0x00010038 -}; - -void PrintDeviceError(WGPUErrorType errorType, const char* message, void*) { - std::string errorTypeName = ""; - switch (errorType) { - case WGPUErrorType_Validation: - errorTypeName = "WGPUErrorTyp Validation"; - break; - case WGPUErrorType_OutOfMemory: - errorTypeName = "WGPUErrorTyp Out of memory"; - break; - case WGPUErrorType_Unknown: - errorTypeName = "WGPUErrorTyp Unknown"; - break; - case WGPUErrorType_DeviceLost: - errorTypeName = "WGPUErrorTyp Device lost"; - break; - default : - errorTypeName = "WGPUErrorTyp Unknown"; - return; - } - std::cout<<"Device error:" << errorTypeName< instance; - instance = std::make_unique(); - instance->DiscoverDefaultAdapters(); - // Get an adapter for the backend to use, and create the device. - dawn_native::Adapter backendAdapter; - { - std::vector adapters = instance->GetAdapters(); - auto adapterIt = std::find_if(adapters.begin(), adapters.end(), - [](const dawn_native::Adapter adapter) -> bool { - wgpu::AdapterProperties properties; - adapter.GetProperties(&properties); - return properties.backendType == backendType; - }); - backendAdapter = *adapterIt; - } - WGPUDevice backendDevice = backendAdapter.CreateDevice(); - DawnProcTable backendProcs = dawn_native::GetProcs(); - dawnProcSetProcs(&backendProcs); - backendProcs.deviceSetUncapturedErrorCallback(backendDevice, PrintDeviceError, nullptr); - return wgpu::Device::Acquire(backendDevice); -} - -wgpu::CreateBufferMappedResult createBufferMappedFromData(wgpu::Device& device, - const void* data, - size_t size, - wgpu::BufferUsage usage){ - wgpu::BufferDescriptor descriptor = {}; - descriptor.size = size; - descriptor.usage = usage | wgpu::BufferUsage::CopyDst; - wgpu::CreateBufferMappedResult result = device.CreateBufferMapped(&descriptor); - memcpy(result.data, data, size); - return result; -} - -void readBufferMapReadCallback(WGPUBufferMapAsyncStatus status, - const void* ptr, - uint64_t dataLength, - void* userdata) { - (void)status; - (void)userdata; - printf("resultMatrix: ["); - size_t num = dataLength / sizeof(float); - for (size_t i = 0; i < num; ++i) { - printf("%f", ((const float*)ptr)[i]); - if (i != num - 1) - printf(", "); - } - printf("]\n"); -} - -int main(int /*argc*/, char** /*argv*/) -{ - wgpu::Device device = createCppDawnDevice(); - wgpu::Queue queue = device.GetDefaultQueue(); - // create buffer - wgpu::Buffer inputsBuffer1, inputsBuffer2; - wgpu::Buffer resultBuffer,gpuReadBuffer; - float const inputData1[] = { 2 /* rows */, 4 /* columns */, - 1, 2, 3, 4, 5, 6, 7, 8}; - float const inputData2[] = { 4 /* rows */, 2 /* columns */, - 1, 2, 3, 4, 5, 6, 7, 8}; - - wgpu::BufferDescriptor desc0 = {}; - desc0.size = sizeof(inputData1); - desc0.usage = wgpu::BufferUsage::Storage | wgpu::BufferUsage::CopyDst; - inputsBuffer1 =device.CreateBuffer(&desc0); - inputsBuffer1.SetSubData(0, sizeof(inputData1), inputData1); - - wgpu::BufferDescriptor desc1 = {}; - desc1.size = sizeof(inputData2); - desc1.usage = wgpu::BufferUsage::Storage | wgpu::BufferUsage::CopyDst; - inputsBuffer2 =device.CreateBuffer(&desc1); - inputsBuffer2.SetSubData(0, sizeof(inputData2), inputData2); - - wgpu::BufferDescriptor desc2 = {}; - desc2.size = sizeof(float) * 6; - desc2.usage = wgpu::BufferUsage::Storage | wgpu::BufferUsage::CopySrc; - resultBuffer = device.CreateBuffer(& desc2); - - wgpu::BufferDescriptor desc3 = {}; - desc3.size = sizeof(float) * 6; - desc3.usage = wgpu::BufferUsage::CopyDst | wgpu::BufferUsage::MapRead; - gpuReadBuffer = device.CreateBuffer(& desc3); - - std::cout << "buffer create succeed" < bglEntries { - {0, wgpu::ShaderStage::Compute, wgpu::BindingType::ReadonlyStorageBuffer}, - {1, wgpu::ShaderStage::Compute, wgpu::BindingType::ReadonlyStorageBuffer}, - {2, wgpu::ShaderStage::Compute, wgpu::BindingType::StorageBuffer}}; - wgpu::BindGroupLayoutDescriptor bglDesc; - bglDesc.entryCount = static_cast(bglEntries.size()); - bglDesc.entries = bglEntries.data(); - wgpu::BindGroupLayout bgl = device.CreateBindGroupLayout(&bglDesc); - - std::vector bgEntries { - { 0, inputsBuffer1, 0, sizeof(inputData1), nullptr, nullptr }, - { 1, inputsBuffer2, 0, sizeof(inputData2), nullptr, nullptr }, - { 2, resultBuffer, 0, sizeof(float) * 6, nullptr, nullptr } }; - wgpu::BindGroupDescriptor bgDesc; - bgDesc.layout = bgl; - bgDesc.entryCount = bgEntries.size(); - bgDesc.entries = bgEntries.data(); - wgpu::BindGroup bg = device.CreateBindGroup(&bgDesc); - std::cout<<"create BindGroup succeed"< -#include -#include "../include/op_softmax.hpp" -#include "../src/context.hpp" -#include "../include/wgpucom.hpp" -#include -#include "../src/common.hpp" -#include -using namespace cv::dnn; -void printData(const void * data, int num) { - printf("resultMatrix: ["); - for (size_t i = 0; i < num; ++i) { - printf("%f", ((const float*)data)[i]); - if (i != num - 1) - printf(", "); - } - printf("]\n"); -} -int main(int argc, char** argv ) -{ - webgpu::isAvailable(); - float inputData1[] = {1, 2, 3, 4, 5, 6, 7, 8}; - std::vector shape = {2,4,1}; // outer_size * channels * channel_size - - webgpu::Tensor input(inputData1, shape, webgpu::Format::wFormatFp32); - webgpu::Tensor out(nullptr, shape, webgpu::Format::wFormatFp32); - - webgpu::OpSoftmax op1(1, false); - op1.forward(input, out); - - const void * result = out.getBuffer()->MapReadAsyncAndWait(); - out.unMap(); - printData(result, out.size()/sizeof(float)); - std::cout<<"Finish"< + #include #include -// #endif -namespace cv { namespace dnn { namespace webgpu { +#ifdef HAVE_WEBGPU +#include +#endif // HAVE_WEBGPU +namespace cv { namespace dnn { namespace webgpu { +#ifdef HAVE_WEBGPU class Buffer { -// #ifdef HAVE_WEBGPU public: Buffer(const std::shared_ptr device); Buffer(const std::shared_ptr device, @@ -41,13 +42,13 @@ class Buffer Buffer(); std::shared_ptr device_; wgpu::Buffer buffer_; - wgpu::Buffer gpuReadBuffer_ = nullptr; + wgpu::Buffer gpuReadBuffer_; wgpu::BufferUsage usage_; size_t size_; const void * mappedData = nullptr; }; -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} //namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/include/op_base.hpp b/modules/dnn/src/webgpu/include/op_base.hpp index 90ba108371e1..bfd78a958641 100644 --- a/modules/dnn/src/webgpu/include/op_base.hpp +++ b/modules/dnn/src/webgpu/include/op_base.hpp @@ -1,20 +1,12 @@ -// This file is part of OpenCV project. -// It is subject to the license terms in the LICENSE file found in the top-level directory -// of this distribution and at http://opencv.org/license.html. -// -// Copyright (C) 2018, Intel Corporation, all rights reserved. -// Third party copyrights are property of their respective owners. - #ifndef OPENCV_DNN_WEBGPU_OP_BASE_HPP #define OPENCV_DNN_WEBGPU_OP_BASE_HPP #include "../../precomp.hpp" #include "wgpucom.hpp" #include "../dawn/dawnUtils.hpp" -#include "tensor.hpp" namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU class Context; class Tensor; class OpBase @@ -35,25 +27,24 @@ class OpBase void createComputePipeline(); void createCommandBuffer(); void runCommandBuffer(); - wgpu::FenceCompletionStatus WaitForCompletedValue(wgpu::Fence fence, - uint64_t completedValue); std::shared_ptr device_; - wgpu::ComputePipeline pipeline_; - wgpu::CommandBuffer cmd_buffer_; - wgpu::BindGroupLayout bindgrouplayout_; - wgpu::BindGroup bindgroup_; - wgpu::ShaderModule module_; - wgpu::PipelineLayout pipeline_layout_; - std::vector bgEntries; + wgpu::ComputePipeline pipeline_ = nullptr; + wgpu::CommandBuffer cmd_buffer_= nullptr; + wgpu::BindGroupLayout bindgrouplayout_= nullptr; + wgpu::BindGroup bindgroup_= nullptr; + wgpu::ShaderModule module_= nullptr; + wgpu::PipelineLayout pipeline_layout_= nullptr; + std::vector bgEntries = {}; + Buffer* uniformBuffer_ = nullptr; - bool needsUniform = true; uint32_t group_x_; uint32_t group_y_; uint32_t group_z_; std::string type_; }; -// #endif //HAVE_WEBGPU + +#endif // HAVE_WEBGPU }}} //namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/include/op_concat.hpp b/modules/dnn/src/webgpu/include/op_concat.hpp new file mode 100644 index 000000000000..aaed6192051a --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_concat.hpp @@ -0,0 +1,46 @@ +#ifndef OPENCV_DNN_WGPU_OP_CONCAT_HPP +#define OPENCV_DNN_WGPU_OP_CONCAT_HPP + +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +struct ConcatShaderConfig +{ + int local_size_x; + int local_size_y; + int local_size_z; + int block_height; + int block_width; + int block_depth; +}; + +class OpConcat: public OpBase +{ +public: + OpConcat(const int axis); + bool forward(std::vector& ins, Tensor& out); + void reshapeOutTensor(std::vector& in, Tensor& out); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; + +private: + bool init(const int axis); + bool computeGroupCount(); + ConcatShaderConfig config_; + int axis_; + int out_concat_axis_; + int accumulated_concat_axis_; + int concat_size_; + int total_concat_size_; + int thread_num_; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_CONCAT_HPP diff --git a/modules/dnn/src/webgpu/include/op_conv.hpp b/modules/dnn/src/webgpu/include/op_conv.hpp new file mode 100644 index 000000000000..2517e93e05b8 --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_conv.hpp @@ -0,0 +1,78 @@ +#ifndef OPENCV_DNN_WGPU_OP_CONV_HPP +#define OPENCV_DNN_WGPU_OP_CONV_HPP + +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +enum ConvShaderType +{ + wConvShaderTypeBasic = 0, + wConvShaderType48, + wConvShaderTypeDepthWise, + wConvShaderTypeNum +}; + +struct ConvShaderConfig +{ + int local_size_x; + int local_size_y; + int local_size_z; + int block_height; + int block_width; + int block_depth; + ConvShaderType shader_type; +}; + +class OpConv : public OpBase +{ +public: + OpConv(const int out_channel, const bool has_bias, + const int* filter_size, const int* pad, + const int* stride, const int* dilation, + const int activation, const int group, + const int padding_mode); + void reshapeOutTensor(Tensor& in, Tensor& out); + bool forward(Tensor& in, Tensor& filter_weights, Tensor& bias, Tensor& out); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; +private: + bool init(const int out_channel, const bool has_bias, + const int* filter_size, const int* pad, + const int* stride, const int* dilation, + const int activation, const int group, + const int padding_mode); + bool computeGroupCount(); + + int batch_; + int in_height_; + int in_width_; + int in_channel_; + int out_height_; + int out_width_; + int out_channel_; + int filter_height_; + int filter_width_; + int stride_height_; + int stride_width_; + int padding_top_; + int padding_left_; + int dilation_height_; + int dilation_width_; + int activation_; + PaddingMode padding_mode_; + int group_; + int has_bias_; + Tensor* swizzled_weights = nullptr; + ConvShaderConfig config_; + bool dwconv_; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_CONV_HPP diff --git a/modules/dnn/src/webgpu/include/op_lrn.hpp b/modules/dnn/src/webgpu/include/op_lrn.hpp new file mode 100644 index 000000000000..b45d8aa07505 --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_lrn.hpp @@ -0,0 +1,63 @@ +#ifndef OPENCV_DNN_WGPU_OP_LRN_HPP +#define OPENCV_DNN_WGPU_OP_LRN_HPP + +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +enum LRNShaderType +{ + kLRNShaderTypeBasic = 0, + kLRNShaderTypeNum +}; + +struct LRNShaderConfig +{ + int local_size_x; + int local_size_y; + int local_size_z; + int block_height; + int block_width; + int block_depth; + LRNShaderType shader_type; +}; + +class OpLRN : public OpBase +{ +public: + OpLRN(const int radius, const float bias, + const float alpha, const float beta, + const bool norm_by_size); + void reshapeOutTensor(Tensor& in, Tensor& out); + bool forward(Tensor& in, Tensor& out); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; + +private: + bool init(const int radius, const float bias, + const float alpha, const float beta, + const bool norm_by_size); + bool computeGroupCount(); + int batch_; + int height_; + int width_; + int channels_; + int radius_; + float bias_; + float alpha_; + float beta_; + int filter_len_; + int thread_num_; + bool norm_by_size_; + LRNShaderConfig config_; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_LRN_HPP + diff --git a/modules/dnn/src/webgpu/include/op_permute.hpp b/modules/dnn/src/webgpu/include/op_permute.hpp new file mode 100644 index 000000000000..5f7162ec24e7 --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_permute.hpp @@ -0,0 +1,41 @@ +#ifndef OPENCV_DNN_WGPU_OP_PERMUTE_HPP +#define OPENCV_DNN_WGPU_OP_PERMUTE_HPP +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +class OpPermute: public OpBase +{ +public: + OpPermute(std::vector& order); + bool forward(std::vector& ins, std::vector& outs); + void reshapeOutTensor(std::vector& in, std::vector& outs); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; + ~OpPermute(); +private: + void prepareStrides(const Shape &shape_before, const Shape &shape_after); + bool computeGroupCount(); + + std::vector order_; + bool need_permute_; + int global_size_; + int nthreads_; + int dims_; + Tensor* tensor_order_ = nullptr; + Tensor* tensor_old_stride_ = nullptr; + Tensor* tensor_new_stride_ = nullptr; + std::vector old_stride_; + std::vector new_stride_; + Shape in_shape_; + Shape out_shape_; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_PERMUTE_HPP diff --git a/modules/dnn/src/webgpu/include/op_pool.hpp b/modules/dnn/src/webgpu/include/op_pool.hpp new file mode 100644 index 000000000000..40aa1770bd08 --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_pool.hpp @@ -0,0 +1,61 @@ +#ifndef OPENCV_DNN_WGPU_OP_POOL_HPP +#define OPENCV_DNN_WGPU_OP_POOL_HPP +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +enum PoolType { wPoolTypeAvg, wPoolTypeMax, wPoolTypeNum }; + +struct PoolShaderConfig +{ + int local_size_x; + int local_size_y; + int local_size_z; + int block_height; + int block_width; + int block_depth; +}; + +class OpPool: public OpBase +{ +public: + OpPool(const int* filter_size, const int* pad, const int* stride, + const int padding_mode, const PoolType pool_type, + const bool avg_pool_padded_area); + bool forward(Tensor& in, Tensor& out, Tensor& mask); + void reshapeOutTensor(Tensor& in, Tensor& out); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; +private: + bool init(const int* filter_size, const int* pad, const int* stride, + const int padding_mode, const PoolType type, const bool avg_pool_padded_area); + bool computeGroupCount(); + + int batch_; + int channels_; + int in_height_; + int in_width_; + int out_height_; + int out_width_; + int filter_height_; + int filter_width_; + int stride_height_; + int stride_width_; + int padding_left_; + int padding_top_; + PoolType pool_type_; + int avg_pool_padded_area_; + int need_mask_; + PaddingMode padding_mode_; + //int activation_; + PoolShaderConfig config_; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_POOL_HPP \ No newline at end of file diff --git a/modules/dnn/src/webgpu/include/op_prior_box.hpp b/modules/dnn/src/webgpu/include/op_prior_box.hpp new file mode 100644 index 000000000000..fdd568886d4f --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_prior_box.hpp @@ -0,0 +1,58 @@ +#ifndef OPENCV_DNN_WGPU_OP_PRIOR_BOX_HPP +#define OPENCV_DNN_WGPU_OP_PRIOR_BOX_HPP +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +class OpPriorBox: public OpBase +{ +public: + OpPriorBox(float step_x, + float step_y, + bool clip, + int num_priors, + std::vector& variance, + std::vector& offsets_x, + std::vector& offsets_y, + std::vector& box_widths, + std::vector& box_heights); + ~OpPriorBox(); + bool forward(std::vector& in, Tensor& out); + void reshapeOutTensor(std::vector& in, Tensor& out); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; +private: + bool computeGroupCount(); + + int global_size_; + int nthreads_; + float step_x_; + float step_y_; + bool clip_; + int num_priors_; + std::vector variance_; + std::vector offsets_x_; + std::vector offsets_y_; + std::vector box_widths_; + std::vector box_heights_; + int img_h_; + int img_w_; + int in_h_; + int in_w_; + int out_channel_; + int out_channel_size_; + Tensor* tensor_offsets_x_= nullptr; + Tensor* tensor_offsets_y_= nullptr; + Tensor* tensor_widths_= nullptr; + Tensor* tensor_heights_= nullptr; + Tensor* tensor_variance_= nullptr; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_PRIOR_BOX_HPP diff --git a/modules/dnn/src/webgpu/include/op_relu.hpp b/modules/dnn/src/webgpu/include/op_relu.hpp new file mode 100644 index 000000000000..5d683f0be1a5 --- /dev/null +++ b/modules/dnn/src/webgpu/include/op_relu.hpp @@ -0,0 +1,28 @@ +#ifndef OPENCV_DNN_WGPU_OP_RELU_HPP +#define OPENCV_DNN_WGPU_OP_RELU_HPP +#include "wgpucom.hpp" +#include "op_base.hpp" +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +class OpReLU: public OpBase +{ +public: + OpReLU(const float slope = 1.f); + bool forward(Tensor& in, Tensor& out); + void reshapeOutTensor(Tensor& in, Tensor& out); + virtual bool forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) CV_OVERRIDE; +private: + bool computeGroupCount(); + int total_; + float slope_; +}; + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu + +#endif // OPENCV_DNN_WGPU_OP_RELU_HPP diff --git a/modules/dnn/src/webgpu/include/op_softmax.hpp b/modules/dnn/src/webgpu/include/op_softmax.hpp index 5f2d5424d9b0..1b24d0cb83ad 100644 --- a/modules/dnn/src/webgpu/include/op_softmax.hpp +++ b/modules/dnn/src/webgpu/include/op_softmax.hpp @@ -4,7 +4,7 @@ #include "op_base.hpp" namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU struct SoftmaxShaderConfig { @@ -35,13 +35,12 @@ class OpSoftmax: public OpBase int channel_size_; int outer_size_; bool log_softmax_; + SoftmaxShaderConfig config_; Tensor* max_tensor_ = nullptr; Tensor* sum_tensor_ = nullptr; - Buffer* uniformBuffer_; - SoftmaxShaderConfig config_; }; -// #endif // HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/include/tensor.hpp b/modules/dnn/src/webgpu/include/tensor.hpp index 505fe5395a69..7b7cf89e3949 100644 --- a/modules/dnn/src/webgpu/include/tensor.hpp +++ b/modules/dnn/src/webgpu/include/tensor.hpp @@ -1,13 +1,12 @@ #ifndef OPENCV_DNN_WEBGPU_TENSOR_HPP #define OPENCV_DNN_WEBGPU_TENSOR_HPP -// #ifdef HAVE_WEBGPU -#include -// #endif -#include"buffer.hpp" -#include"wgpucom.hpp" -#include +#ifdef HAVE_WEBGPU +#include +#endif // HAVE_WEBGPU +#include "wgpucom.hpp" +#include namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU class Buffer; class Tensor{ public: @@ -25,8 +24,7 @@ class Tensor{ // Allocate new internal buffer if new size > old size or alloc flag is true Tensor reshape(const void* data, const std::vector& shape, bool alloc = false, - Format fmt = wFormatInvalid); - Tensor fillData(const void * data); + Format fmt = wFormatFp32); int getFormat() const; size_t size() const { return size_in_byte_; } bool isEmpty() { return size_in_byte_ == 0 ? true : false; } @@ -37,12 +35,12 @@ class Tensor{ std::vector shape_; size_t size_in_byte_; std::shared_ptr buffer_; - Format format_; + Format format_ = wFormatFp32; wgpu::BufferUsage usage_ = wgpu::BufferUsage::Storage | wgpu::BufferUsage::CopySrc | wgpu::BufferUsage::CopyDst; }; -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} //namespace cv::dnn:webgpu diff --git a/modules/dnn/src/webgpu/include/wgpucom.hpp b/modules/dnn/src/webgpu/include/wgpucom.hpp index 6e5d1dde5bf7..2720b32ca765 100644 --- a/modules/dnn/src/webgpu/include/wgpucom.hpp +++ b/modules/dnn/src/webgpu/include/wgpucom.hpp @@ -11,7 +11,8 @@ #include namespace cv { namespace dnn { namespace webgpu { -//#ifndef HAVE_WEBGPU +#ifdef HAVE_WEBGPU + enum Format { wFormatInvalid = -1, @@ -55,13 +56,20 @@ enum FusedActivationType typedef std::vector Shape; bool isAvailable(); -//#endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} //namespace cv::dnn::webgpu -#include "tensor.hpp" #include "buffer.hpp" +#include "tensor.hpp" #include "op_base.hpp" +#include "op_concat.hpp" +#include "op_conv.hpp" +#include "op_lrn.hpp" #include "op_softmax.hpp" +#include "op_relu.hpp" +#include "op_pool.hpp" +#include "op_prior_box.hpp" +#include "op_permute.hpp" #endif// OPENCV_DNN_WEBGPU_HPP \ No newline at end of file diff --git a/modules/dnn/src/webgpu/shader/avg_pool.comp b/modules/dnn/src/webgpu/shader/avg_pool.comp new file mode 100644 index 000000000000..f17d9e2d131a --- /dev/null +++ b/modules/dnn/src/webgpu/shader/avg_pool.comp @@ -0,0 +1,70 @@ +#version 450 +#define LOCAL_SZ_X 256 + +layout(binding = 0) buffer Input0{ + float in_buffer[]; +}; + +layout(binding = 1) buffer Output{ + float out_buffer[]; +}; + +layout(binding = 2) uniform pushBlock { + int channels; + int in_h; + int in_w; + int out_h; + int out_w; + int padding_h; + int padding_w; + int filter_h; + int filter_w; + int stride_h; + int stride_w; + int total; + int padded_area; +} p; + +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; + +void main() +{ + int global_size = int(gl_WorkGroupSize.x * gl_NumWorkGroups.x); + int gid = int(gl_GlobalInvocationID.x); + for (int index = gid; index < p.total; index += global_size) + { + const int pw = index % p.out_w; + const int ph = (index / p.out_w) % p.out_h; + const int c = (index / p.out_w / p.out_h) % p.channels; + const int n = index / p.out_w / p.out_h / p.channels; + int hstart = ph * p.stride_h - p.padding_h; + int wstart = pw * p.stride_w - p.padding_w; + int hend = min(hstart + p.filter_h, p.in_h + p.padding_h); + int wend = min(wstart + p.filter_w, p.in_w + p.padding_w); + int pool_size; + if (p.padded_area == 1) + { + pool_size = (hend - hstart) * (wend - wstart); + hstart = max(hstart, 0); + wstart = max(wstart, 0); + hend = min(hend, p.in_h); + wend = min(wend, p.in_w); + } + else + { + hstart = max(hstart, 0); + wstart = max(wstart, 0); + hend = min(hend, p.in_h); + wend = min(wend, p.in_w); + pool_size = (hend - hstart) * (wend - wstart); + } + float aveval = 0; + int off = (n * p.channels + c) * p.in_h * p.in_w; + for (int h = hstart; h < hend; ++h) { + for (int w = wstart; w < wend; ++w) { + aveval += in_buffer[off + h * p.in_w + w]; + } + } + out_buffer[index] = aveval / pool_size; + } +} diff --git a/modules/dnn/src/webgpu/shader/avg_pool_spv.cpp b/modules/dnn/src/webgpu/shader/avg_pool_spv.cpp new file mode 100644 index 000000000000..2da59a4f0af8 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/avg_pool_spv.cpp @@ -0,0 +1,208 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int avg_pool_spv[1538] = { + 0x07230203,0x00010000,0x00080009,0x000000f5,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0007000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000015,0x00060010, + 0x00000004,0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2, + 0x00040005,0x00000004,0x6e69616d,0x00000000,0x00050005,0x00000008,0x626f6c67,0x735f6c61, + 0x00657a69,0x00070005,0x0000000d,0x4e5f6c67,0x6f576d75,0x72476b72,0x7370756f,0x00000000, + 0x00030005,0x00000014,0x00646967,0x00080005,0x00000015,0x475f6c67,0x61626f6c,0x766e496c, + 0x7461636f,0x496e6f69,0x00000044,0x00040005,0x00000019,0x65646e69,0x00000078,0x00050005, + 0x00000021,0x68737570,0x636f6c42,0x0000006b,0x00060006,0x00000021,0x00000000,0x6e616863, + 0x736c656e,0x00000000,0x00050006,0x00000021,0x00000001,0x685f6e69,0x00000000,0x00050006, + 0x00000021,0x00000002,0x775f6e69,0x00000000,0x00050006,0x00000021,0x00000003,0x5f74756f, + 0x00000068,0x00050006,0x00000021,0x00000004,0x5f74756f,0x00000077,0x00060006,0x00000021, + 0x00000005,0x64646170,0x5f676e69,0x00000068,0x00060006,0x00000021,0x00000006,0x64646170, + 0x5f676e69,0x00000077,0x00060006,0x00000021,0x00000007,0x746c6966,0x685f7265,0x00000000, + 0x00060006,0x00000021,0x00000008,0x746c6966,0x775f7265,0x00000000,0x00060006,0x00000021, + 0x00000009,0x69727473,0x685f6564,0x00000000,0x00060006,0x00000021,0x0000000a,0x69727473, + 0x775f6564,0x00000000,0x00050006,0x00000021,0x0000000b,0x61746f74,0x0000006c,0x00060006, + 0x00000021,0x0000000c,0x64646170,0x615f6465,0x00616572,0x00030005,0x00000023,0x00000070, + 0x00030005,0x0000002a,0x00007770,0x00030005,0x00000030,0x00006870,0x00030005,0x00000039, + 0x00000063,0x00030005,0x00000045,0x0000006e,0x00040005,0x00000050,0x61747368,0x00007472, + 0x00040005,0x0000005a,0x61747377,0x00007472,0x00040005,0x00000064,0x646e6568,0x00000000, + 0x00040005,0x00000071,0x646e6577,0x00000000,0x00050005,0x00000084,0x6c6f6f70,0x7a69735f, + 0x00000065,0x00040005,0x000000ae,0x76657661,0x00006c61,0x00030005,0x000000b0,0x0066666f, + 0x00030005,0x000000bd,0x00000068,0x00030005,0x000000c7,0x00000077,0x00040005,0x000000d2, + 0x75706e49,0x00003074,0x00060006,0x000000d2,0x00000000,0x625f6e69,0x65666675,0x00000072, + 0x00030005,0x000000d4,0x00000000,0x00040005,0x000000e7,0x7074754f,0x00007475,0x00060006, + 0x000000e7,0x00000000,0x5f74756f,0x66667562,0x00007265,0x00030005,0x000000e9,0x00000000, + 0x00040047,0x0000000d,0x0000000b,0x00000018,0x00040047,0x00000015,0x0000000b,0x0000001c, + 0x00050048,0x00000021,0x00000000,0x00000023,0x00000000,0x00050048,0x00000021,0x00000001, + 0x00000023,0x00000004,0x00050048,0x00000021,0x00000002,0x00000023,0x00000008,0x00050048, + 0x00000021,0x00000003,0x00000023,0x0000000c,0x00050048,0x00000021,0x00000004,0x00000023, + 0x00000010,0x00050048,0x00000021,0x00000005,0x00000023,0x00000014,0x00050048,0x00000021, + 0x00000006,0x00000023,0x00000018,0x00050048,0x00000021,0x00000007,0x00000023,0x0000001c, + 0x00050048,0x00000021,0x00000008,0x00000023,0x00000020,0x00050048,0x00000021,0x00000009, + 0x00000023,0x00000024,0x00050048,0x00000021,0x0000000a,0x00000023,0x00000028,0x00050048, + 0x00000021,0x0000000b,0x00000023,0x0000002c,0x00050048,0x00000021,0x0000000c,0x00000023, + 0x00000030,0x00030047,0x00000021,0x00000002,0x00040047,0x00000023,0x00000022,0x00000000, + 0x00040047,0x00000023,0x00000021,0x00000002,0x00040047,0x000000d1,0x00000006,0x00000004, + 0x00050048,0x000000d2,0x00000000,0x00000023,0x00000000,0x00030047,0x000000d2,0x00000003, + 0x00040047,0x000000d4,0x00000022,0x00000000,0x00040047,0x000000d4,0x00000021,0x00000000, + 0x00040047,0x000000e6,0x00000006,0x00000004,0x00050048,0x000000e7,0x00000000,0x00000023, + 0x00000000,0x00030047,0x000000e7,0x00000003,0x00040047,0x000000e9,0x00000022,0x00000000, + 0x00040047,0x000000e9,0x00000021,0x00000001,0x00040047,0x000000f4,0x0000000b,0x00000019, + 0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020, + 0x00000001,0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020, + 0x00000000,0x0004002b,0x00000009,0x0000000a,0x00000100,0x00040017,0x0000000b,0x00000009, + 0x00000003,0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d, + 0x00000001,0x0004002b,0x00000009,0x0000000e,0x00000000,0x00040020,0x0000000f,0x00000001, + 0x00000009,0x0004003b,0x0000000c,0x00000015,0x00000001,0x000f001e,0x00000021,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x00000022,0x00000002,0x00000021, + 0x0004003b,0x00000022,0x00000023,0x00000002,0x0004002b,0x00000006,0x00000024,0x0000000b, + 0x00040020,0x00000025,0x00000002,0x00000006,0x00020014,0x00000028,0x0004002b,0x00000006, + 0x0000002c,0x00000004,0x0004002b,0x00000006,0x00000035,0x00000003,0x0004002b,0x00000006, + 0x00000041,0x00000000,0x0004002b,0x00000006,0x00000052,0x00000009,0x0004002b,0x00000006, + 0x00000056,0x00000005,0x0004002b,0x00000006,0x0000005c,0x0000000a,0x0004002b,0x00000006, + 0x00000060,0x00000006,0x0004002b,0x00000006,0x00000066,0x00000007,0x0004002b,0x00000006, + 0x0000006a,0x00000001,0x0004002b,0x00000006,0x00000073,0x00000008,0x0004002b,0x00000006, + 0x00000077,0x00000002,0x0004002b,0x00000006,0x0000007e,0x0000000c,0x00030016,0x000000ac, + 0x00000020,0x00040020,0x000000ad,0x00000007,0x000000ac,0x0004002b,0x000000ac,0x000000af, + 0x00000000,0x0003001d,0x000000d1,0x000000ac,0x0003001e,0x000000d2,0x000000d1,0x00040020, + 0x000000d3,0x00000002,0x000000d2,0x0004003b,0x000000d3,0x000000d4,0x00000002,0x00040020, + 0x000000dd,0x00000002,0x000000ac,0x0003001d,0x000000e6,0x000000ac,0x0003001e,0x000000e7, + 0x000000e6,0x00040020,0x000000e8,0x00000002,0x000000e7,0x0004003b,0x000000e8,0x000000e9, + 0x00000002,0x0004002b,0x00000009,0x000000f3,0x00000001,0x0006002c,0x0000000b,0x000000f4, + 0x0000000a,0x000000f3,0x000000f3,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003, + 0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008,0x00000007,0x0004003b,0x00000007, + 0x00000014,0x00000007,0x0004003b,0x00000007,0x00000019,0x00000007,0x0004003b,0x00000007, + 0x0000002a,0x00000007,0x0004003b,0x00000007,0x00000030,0x00000007,0x0004003b,0x00000007, + 0x00000039,0x00000007,0x0004003b,0x00000007,0x00000045,0x00000007,0x0004003b,0x00000007, + 0x00000050,0x00000007,0x0004003b,0x00000007,0x0000005a,0x00000007,0x0004003b,0x00000007, + 0x00000064,0x00000007,0x0004003b,0x00000007,0x00000071,0x00000007,0x0004003b,0x00000007, + 0x00000084,0x00000007,0x0004003b,0x000000ad,0x000000ae,0x00000007,0x0004003b,0x00000007, + 0x000000b0,0x00000007,0x0004003b,0x00000007,0x000000bd,0x00000007,0x0004003b,0x00000007, + 0x000000c7,0x00000007,0x00050041,0x0000000f,0x00000010,0x0000000d,0x0000000e,0x0004003d, + 0x00000009,0x00000011,0x00000010,0x00050084,0x00000009,0x00000012,0x0000000a,0x00000011, + 0x0004007c,0x00000006,0x00000013,0x00000012,0x0003003e,0x00000008,0x00000013,0x00050041, + 0x0000000f,0x00000016,0x00000015,0x0000000e,0x0004003d,0x00000009,0x00000017,0x00000016, + 0x0004007c,0x00000006,0x00000018,0x00000017,0x0003003e,0x00000014,0x00000018,0x0004003d, + 0x00000006,0x0000001a,0x00000014,0x0003003e,0x00000019,0x0000001a,0x000200f9,0x0000001b, + 0x000200f8,0x0000001b,0x000400f6,0x0000001d,0x0000001e,0x00000000,0x000200f9,0x0000001f, + 0x000200f8,0x0000001f,0x0004003d,0x00000006,0x00000020,0x00000019,0x00050041,0x00000025, + 0x00000026,0x00000023,0x00000024,0x0004003d,0x00000006,0x00000027,0x00000026,0x000500b1, + 0x00000028,0x00000029,0x00000020,0x00000027,0x000400fa,0x00000029,0x0000001c,0x0000001d, + 0x000200f8,0x0000001c,0x0004003d,0x00000006,0x0000002b,0x00000019,0x00050041,0x00000025, + 0x0000002d,0x00000023,0x0000002c,0x0004003d,0x00000006,0x0000002e,0x0000002d,0x0005008b, + 0x00000006,0x0000002f,0x0000002b,0x0000002e,0x0003003e,0x0000002a,0x0000002f,0x0004003d, + 0x00000006,0x00000031,0x00000019,0x00050041,0x00000025,0x00000032,0x00000023,0x0000002c, + 0x0004003d,0x00000006,0x00000033,0x00000032,0x00050087,0x00000006,0x00000034,0x00000031, + 0x00000033,0x00050041,0x00000025,0x00000036,0x00000023,0x00000035,0x0004003d,0x00000006, + 0x00000037,0x00000036,0x0005008b,0x00000006,0x00000038,0x00000034,0x00000037,0x0003003e, + 0x00000030,0x00000038,0x0004003d,0x00000006,0x0000003a,0x00000019,0x00050041,0x00000025, + 0x0000003b,0x00000023,0x0000002c,0x0004003d,0x00000006,0x0000003c,0x0000003b,0x00050087, + 0x00000006,0x0000003d,0x0000003a,0x0000003c,0x00050041,0x00000025,0x0000003e,0x00000023, + 0x00000035,0x0004003d,0x00000006,0x0000003f,0x0000003e,0x00050087,0x00000006,0x00000040, + 0x0000003d,0x0000003f,0x00050041,0x00000025,0x00000042,0x00000023,0x00000041,0x0004003d, + 0x00000006,0x00000043,0x00000042,0x0005008b,0x00000006,0x00000044,0x00000040,0x00000043, + 0x0003003e,0x00000039,0x00000044,0x0004003d,0x00000006,0x00000046,0x00000019,0x00050041, + 0x00000025,0x00000047,0x00000023,0x0000002c,0x0004003d,0x00000006,0x00000048,0x00000047, + 0x00050087,0x00000006,0x00000049,0x00000046,0x00000048,0x00050041,0x00000025,0x0000004a, + 0x00000023,0x00000035,0x0004003d,0x00000006,0x0000004b,0x0000004a,0x00050087,0x00000006, + 0x0000004c,0x00000049,0x0000004b,0x00050041,0x00000025,0x0000004d,0x00000023,0x00000041, + 0x0004003d,0x00000006,0x0000004e,0x0000004d,0x00050087,0x00000006,0x0000004f,0x0000004c, + 0x0000004e,0x0003003e,0x00000045,0x0000004f,0x0004003d,0x00000006,0x00000051,0x00000030, + 0x00050041,0x00000025,0x00000053,0x00000023,0x00000052,0x0004003d,0x00000006,0x00000054, + 0x00000053,0x00050084,0x00000006,0x00000055,0x00000051,0x00000054,0x00050041,0x00000025, + 0x00000057,0x00000023,0x00000056,0x0004003d,0x00000006,0x00000058,0x00000057,0x00050082, + 0x00000006,0x00000059,0x00000055,0x00000058,0x0003003e,0x00000050,0x00000059,0x0004003d, + 0x00000006,0x0000005b,0x0000002a,0x00050041,0x00000025,0x0000005d,0x00000023,0x0000005c, + 0x0004003d,0x00000006,0x0000005e,0x0000005d,0x00050084,0x00000006,0x0000005f,0x0000005b, + 0x0000005e,0x00050041,0x00000025,0x00000061,0x00000023,0x00000060,0x0004003d,0x00000006, + 0x00000062,0x00000061,0x00050082,0x00000006,0x00000063,0x0000005f,0x00000062,0x0003003e, + 0x0000005a,0x00000063,0x0004003d,0x00000006,0x00000065,0x00000050,0x00050041,0x00000025, + 0x00000067,0x00000023,0x00000066,0x0004003d,0x00000006,0x00000068,0x00000067,0x00050080, + 0x00000006,0x00000069,0x00000065,0x00000068,0x00050041,0x00000025,0x0000006b,0x00000023, + 0x0000006a,0x0004003d,0x00000006,0x0000006c,0x0000006b,0x00050041,0x00000025,0x0000006d, + 0x00000023,0x00000056,0x0004003d,0x00000006,0x0000006e,0x0000006d,0x00050080,0x00000006, + 0x0000006f,0x0000006c,0x0000006e,0x0007000c,0x00000006,0x00000070,0x00000001,0x00000027, + 0x00000069,0x0000006f,0x0003003e,0x00000064,0x00000070,0x0004003d,0x00000006,0x00000072, + 0x0000005a,0x00050041,0x00000025,0x00000074,0x00000023,0x00000073,0x0004003d,0x00000006, + 0x00000075,0x00000074,0x00050080,0x00000006,0x00000076,0x00000072,0x00000075,0x00050041, + 0x00000025,0x00000078,0x00000023,0x00000077,0x0004003d,0x00000006,0x00000079,0x00000078, + 0x00050041,0x00000025,0x0000007a,0x00000023,0x00000060,0x0004003d,0x00000006,0x0000007b, + 0x0000007a,0x00050080,0x00000006,0x0000007c,0x00000079,0x0000007b,0x0007000c,0x00000006, + 0x0000007d,0x00000001,0x00000027,0x00000076,0x0000007c,0x0003003e,0x00000071,0x0000007d, + 0x00050041,0x00000025,0x0000007f,0x00000023,0x0000007e,0x0004003d,0x00000006,0x00000080, + 0x0000007f,0x000500aa,0x00000028,0x00000081,0x00000080,0x0000006a,0x000300f7,0x00000083, + 0x00000000,0x000400fa,0x00000081,0x00000082,0x00000098,0x000200f8,0x00000082,0x0004003d, + 0x00000006,0x00000085,0x00000064,0x0004003d,0x00000006,0x00000086,0x00000050,0x00050082, + 0x00000006,0x00000087,0x00000085,0x00000086,0x0004003d,0x00000006,0x00000088,0x00000071, + 0x0004003d,0x00000006,0x00000089,0x0000005a,0x00050082,0x00000006,0x0000008a,0x00000088, + 0x00000089,0x00050084,0x00000006,0x0000008b,0x00000087,0x0000008a,0x0003003e,0x00000084, + 0x0000008b,0x0004003d,0x00000006,0x0000008c,0x00000050,0x0007000c,0x00000006,0x0000008d, + 0x00000001,0x0000002a,0x0000008c,0x00000041,0x0003003e,0x00000050,0x0000008d,0x0004003d, + 0x00000006,0x0000008e,0x0000005a,0x0007000c,0x00000006,0x0000008f,0x00000001,0x0000002a, + 0x0000008e,0x00000041,0x0003003e,0x0000005a,0x0000008f,0x0004003d,0x00000006,0x00000090, + 0x00000064,0x00050041,0x00000025,0x00000091,0x00000023,0x0000006a,0x0004003d,0x00000006, + 0x00000092,0x00000091,0x0007000c,0x00000006,0x00000093,0x00000001,0x00000027,0x00000090, + 0x00000092,0x0003003e,0x00000064,0x00000093,0x0004003d,0x00000006,0x00000094,0x00000071, + 0x00050041,0x00000025,0x00000095,0x00000023,0x00000077,0x0004003d,0x00000006,0x00000096, + 0x00000095,0x0007000c,0x00000006,0x00000097,0x00000001,0x00000027,0x00000094,0x00000096, + 0x0003003e,0x00000071,0x00000097,0x000200f9,0x00000083,0x000200f8,0x00000098,0x0004003d, + 0x00000006,0x00000099,0x00000050,0x0007000c,0x00000006,0x0000009a,0x00000001,0x0000002a, + 0x00000099,0x00000041,0x0003003e,0x00000050,0x0000009a,0x0004003d,0x00000006,0x0000009b, + 0x0000005a,0x0007000c,0x00000006,0x0000009c,0x00000001,0x0000002a,0x0000009b,0x00000041, + 0x0003003e,0x0000005a,0x0000009c,0x0004003d,0x00000006,0x0000009d,0x00000064,0x00050041, + 0x00000025,0x0000009e,0x00000023,0x0000006a,0x0004003d,0x00000006,0x0000009f,0x0000009e, + 0x0007000c,0x00000006,0x000000a0,0x00000001,0x00000027,0x0000009d,0x0000009f,0x0003003e, + 0x00000064,0x000000a0,0x0004003d,0x00000006,0x000000a1,0x00000071,0x00050041,0x00000025, + 0x000000a2,0x00000023,0x00000077,0x0004003d,0x00000006,0x000000a3,0x000000a2,0x0007000c, + 0x00000006,0x000000a4,0x00000001,0x00000027,0x000000a1,0x000000a3,0x0003003e,0x00000071, + 0x000000a4,0x0004003d,0x00000006,0x000000a5,0x00000064,0x0004003d,0x00000006,0x000000a6, + 0x00000050,0x00050082,0x00000006,0x000000a7,0x000000a5,0x000000a6,0x0004003d,0x00000006, + 0x000000a8,0x00000071,0x0004003d,0x00000006,0x000000a9,0x0000005a,0x00050082,0x00000006, + 0x000000aa,0x000000a8,0x000000a9,0x00050084,0x00000006,0x000000ab,0x000000a7,0x000000aa, + 0x0003003e,0x00000084,0x000000ab,0x000200f9,0x00000083,0x000200f8,0x00000083,0x0003003e, + 0x000000ae,0x000000af,0x0004003d,0x00000006,0x000000b1,0x00000045,0x00050041,0x00000025, + 0x000000b2,0x00000023,0x00000041,0x0004003d,0x00000006,0x000000b3,0x000000b2,0x00050084, + 0x00000006,0x000000b4,0x000000b1,0x000000b3,0x0004003d,0x00000006,0x000000b5,0x00000039, + 0x00050080,0x00000006,0x000000b6,0x000000b4,0x000000b5,0x00050041,0x00000025,0x000000b7, + 0x00000023,0x0000006a,0x0004003d,0x00000006,0x000000b8,0x000000b7,0x00050084,0x00000006, + 0x000000b9,0x000000b6,0x000000b8,0x00050041,0x00000025,0x000000ba,0x00000023,0x00000077, + 0x0004003d,0x00000006,0x000000bb,0x000000ba,0x00050084,0x00000006,0x000000bc,0x000000b9, + 0x000000bb,0x0003003e,0x000000b0,0x000000bc,0x0004003d,0x00000006,0x000000be,0x00000050, + 0x0003003e,0x000000bd,0x000000be,0x000200f9,0x000000bf,0x000200f8,0x000000bf,0x000400f6, + 0x000000c1,0x000000c2,0x00000000,0x000200f9,0x000000c3,0x000200f8,0x000000c3,0x0004003d, + 0x00000006,0x000000c4,0x000000bd,0x0004003d,0x00000006,0x000000c5,0x00000064,0x000500b1, + 0x00000028,0x000000c6,0x000000c4,0x000000c5,0x000400fa,0x000000c6,0x000000c0,0x000000c1, + 0x000200f8,0x000000c0,0x0004003d,0x00000006,0x000000c8,0x0000005a,0x0003003e,0x000000c7, + 0x000000c8,0x000200f9,0x000000c9,0x000200f8,0x000000c9,0x000400f6,0x000000cb,0x000000cc, + 0x00000000,0x000200f9,0x000000cd,0x000200f8,0x000000cd,0x0004003d,0x00000006,0x000000ce, + 0x000000c7,0x0004003d,0x00000006,0x000000cf,0x00000071,0x000500b1,0x00000028,0x000000d0, + 0x000000ce,0x000000cf,0x000400fa,0x000000d0,0x000000ca,0x000000cb,0x000200f8,0x000000ca, + 0x0004003d,0x00000006,0x000000d5,0x000000b0,0x0004003d,0x00000006,0x000000d6,0x000000bd, + 0x00050041,0x00000025,0x000000d7,0x00000023,0x00000077,0x0004003d,0x00000006,0x000000d8, + 0x000000d7,0x00050084,0x00000006,0x000000d9,0x000000d6,0x000000d8,0x00050080,0x00000006, + 0x000000da,0x000000d5,0x000000d9,0x0004003d,0x00000006,0x000000db,0x000000c7,0x00050080, + 0x00000006,0x000000dc,0x000000da,0x000000db,0x00060041,0x000000dd,0x000000de,0x000000d4, + 0x00000041,0x000000dc,0x0004003d,0x000000ac,0x000000df,0x000000de,0x0004003d,0x000000ac, + 0x000000e0,0x000000ae,0x00050081,0x000000ac,0x000000e1,0x000000e0,0x000000df,0x0003003e, + 0x000000ae,0x000000e1,0x000200f9,0x000000cc,0x000200f8,0x000000cc,0x0004003d,0x00000006, + 0x000000e2,0x000000c7,0x00050080,0x00000006,0x000000e3,0x000000e2,0x0000006a,0x0003003e, + 0x000000c7,0x000000e3,0x000200f9,0x000000c9,0x000200f8,0x000000cb,0x000200f9,0x000000c2, + 0x000200f8,0x000000c2,0x0004003d,0x00000006,0x000000e4,0x000000bd,0x00050080,0x00000006, + 0x000000e5,0x000000e4,0x0000006a,0x0003003e,0x000000bd,0x000000e5,0x000200f9,0x000000bf, + 0x000200f8,0x000000c1,0x0004003d,0x00000006,0x000000ea,0x00000019,0x0004003d,0x000000ac, + 0x000000eb,0x000000ae,0x0004003d,0x00000006,0x000000ec,0x00000084,0x0004006f,0x000000ac, + 0x000000ed,0x000000ec,0x00050088,0x000000ac,0x000000ee,0x000000eb,0x000000ed,0x00060041, + 0x000000dd,0x000000ef,0x000000e9,0x00000041,0x000000ea,0x0003003e,0x000000ef,0x000000ee, + 0x000200f9,0x0000001e,0x000200f8,0x0000001e,0x0004003d,0x00000006,0x000000f0,0x00000008, + 0x0004003d,0x00000006,0x000000f1,0x00000019,0x00050080,0x00000006,0x000000f2,0x000000f1, + 0x000000f0,0x0003003e,0x00000019,0x000000f2,0x000200f9,0x0000001b,0x000200f8,0x0000001d, + 0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/concat.comp b/modules/dnn/src/webgpu/shader/concat.comp new file mode 100644 index 000000000000..d8ae0a15dc1c --- /dev/null +++ b/modules/dnn/src/webgpu/shader/concat.comp @@ -0,0 +1,29 @@ +#version 450 +#define LOCAL_SZ_X 256 + +layout(binding = 0) buffer Input0{ + float data[]; +} src; +layout(binding = 1) buffer Output{ + float data[]; +} dst; +layout(binding = 2) uniform pushBlock { + int out_concat_axis; + int accumulated_concat_axis; + int concat_size; + int total_concat_size; + int thread_num; +} p; + +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; +void main() +{ + int index = int(gl_GlobalInvocationID.x); + if (index < p.thread_num) + { + int concat_num = index / p.total_concat_size; + int concat_index = index % p.total_concat_size; + int out_index = concat_index + (concat_num * p.out_concat_axis + p.accumulated_concat_axis) * p.concat_size; + dst.data[out_index] = src.data[index]; + } +} diff --git a/modules/dnn/src/webgpu/shader/concat_spv.cpp b/modules/dnn/src/webgpu/shader/concat_spv.cpp new file mode 100644 index 000000000000..8466b2497460 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/concat_spv.cpp @@ -0,0 +1,83 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int concat_spv[541] = { + 0x07230203,0x00010000,0x00080009,0x0000004b,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00060010,0x00000004, + 0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, + 0x00000004,0x6e69616d,0x00000000,0x00040005,0x00000008,0x65646e69,0x00000078,0x00080005, + 0x0000000c,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005, + 0x00000013,0x68737570,0x636f6c42,0x0000006b,0x00070006,0x00000013,0x00000000,0x5f74756f, + 0x636e6f63,0x615f7461,0x00736978,0x00090006,0x00000013,0x00000001,0x75636361,0x616c756d, + 0x5f646574,0x636e6f63,0x615f7461,0x00736978,0x00060006,0x00000013,0x00000002,0x636e6f63, + 0x735f7461,0x00657a69,0x00080006,0x00000013,0x00000003,0x61746f74,0x6f635f6c,0x7461636e, + 0x7a69735f,0x00000065,0x00060006,0x00000013,0x00000004,0x65726874,0x6e5f6461,0x00006d75, + 0x00030005,0x00000015,0x00000070,0x00050005,0x0000001e,0x636e6f63,0x6e5f7461,0x00006d75, + 0x00060005,0x00000024,0x636e6f63,0x695f7461,0x7865646e,0x00000000,0x00050005,0x00000029, + 0x5f74756f,0x65646e69,0x00000078,0x00040005,0x0000003b,0x7074754f,0x00007475,0x00050006, + 0x0000003b,0x00000000,0x61746164,0x00000000,0x00030005,0x0000003d,0x00747364,0x00040005, + 0x00000040,0x75706e49,0x00003074,0x00050006,0x00000040,0x00000000,0x61746164,0x00000000, + 0x00030005,0x00000042,0x00637273,0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00050048, + 0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,0x00000001,0x00000023, + 0x00000004,0x00050048,0x00000013,0x00000002,0x00000023,0x00000008,0x00050048,0x00000013, + 0x00000003,0x00000023,0x0000000c,0x00050048,0x00000013,0x00000004,0x00000023,0x00000010, + 0x00030047,0x00000013,0x00000002,0x00040047,0x00000015,0x00000022,0x00000000,0x00040047, + 0x00000015,0x00000021,0x00000002,0x00040047,0x0000003a,0x00000006,0x00000004,0x00050048, + 0x0000003b,0x00000000,0x00000023,0x00000000,0x00030047,0x0000003b,0x00000003,0x00040047, + 0x0000003d,0x00000022,0x00000000,0x00040047,0x0000003d,0x00000021,0x00000001,0x00040047, + 0x0000003f,0x00000006,0x00000004,0x00050048,0x00000040,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000040,0x00000003,0x00040047,0x00000042,0x00000022,0x00000000,0x00040047, + 0x00000042,0x00000021,0x00000000,0x00040047,0x0000004a,0x0000000b,0x00000019,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000001, + 0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020,0x00000000, + 0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a, + 0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000, + 0x00040020,0x0000000e,0x00000001,0x00000009,0x0007001e,0x00000013,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00040020,0x00000014,0x00000002,0x00000013,0x0004003b, + 0x00000014,0x00000015,0x00000002,0x0004002b,0x00000006,0x00000016,0x00000004,0x00040020, + 0x00000017,0x00000002,0x00000006,0x00020014,0x0000001a,0x0004002b,0x00000006,0x00000020, + 0x00000003,0x0004002b,0x00000006,0x0000002c,0x00000000,0x0004002b,0x00000006,0x00000030, + 0x00000001,0x0004002b,0x00000006,0x00000034,0x00000002,0x00030016,0x00000039,0x00000020, + 0x0003001d,0x0000003a,0x00000039,0x0003001e,0x0000003b,0x0000003a,0x00040020,0x0000003c, + 0x00000002,0x0000003b,0x0004003b,0x0000003c,0x0000003d,0x00000002,0x0003001d,0x0000003f, + 0x00000039,0x0003001e,0x00000040,0x0000003f,0x00040020,0x00000041,0x00000002,0x00000040, + 0x0004003b,0x00000041,0x00000042,0x00000002,0x00040020,0x00000044,0x00000002,0x00000039, + 0x0004002b,0x00000009,0x00000048,0x00000100,0x0004002b,0x00000009,0x00000049,0x00000001, + 0x0006002c,0x0000000a,0x0000004a,0x00000048,0x00000049,0x00000049,0x00050036,0x00000002, + 0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008, + 0x00000007,0x0004003b,0x00000007,0x0000001e,0x00000007,0x0004003b,0x00000007,0x00000024, + 0x00000007,0x0004003b,0x00000007,0x00000029,0x00000007,0x00050041,0x0000000e,0x0000000f, + 0x0000000c,0x0000000d,0x0004003d,0x00000009,0x00000010,0x0000000f,0x0004007c,0x00000006, + 0x00000011,0x00000010,0x0003003e,0x00000008,0x00000011,0x0004003d,0x00000006,0x00000012, + 0x00000008,0x00050041,0x00000017,0x00000018,0x00000015,0x00000016,0x0004003d,0x00000006, + 0x00000019,0x00000018,0x000500b1,0x0000001a,0x0000001b,0x00000012,0x00000019,0x000300f7, + 0x0000001d,0x00000000,0x000400fa,0x0000001b,0x0000001c,0x0000001d,0x000200f8,0x0000001c, + 0x0004003d,0x00000006,0x0000001f,0x00000008,0x00050041,0x00000017,0x00000021,0x00000015, + 0x00000020,0x0004003d,0x00000006,0x00000022,0x00000021,0x00050087,0x00000006,0x00000023, + 0x0000001f,0x00000022,0x0003003e,0x0000001e,0x00000023,0x0004003d,0x00000006,0x00000025, + 0x00000008,0x00050041,0x00000017,0x00000026,0x00000015,0x00000020,0x0004003d,0x00000006, + 0x00000027,0x00000026,0x0005008b,0x00000006,0x00000028,0x00000025,0x00000027,0x0003003e, + 0x00000024,0x00000028,0x0004003d,0x00000006,0x0000002a,0x00000024,0x0004003d,0x00000006, + 0x0000002b,0x0000001e,0x00050041,0x00000017,0x0000002d,0x00000015,0x0000002c,0x0004003d, + 0x00000006,0x0000002e,0x0000002d,0x00050084,0x00000006,0x0000002f,0x0000002b,0x0000002e, + 0x00050041,0x00000017,0x00000031,0x00000015,0x00000030,0x0004003d,0x00000006,0x00000032, + 0x00000031,0x00050080,0x00000006,0x00000033,0x0000002f,0x00000032,0x00050041,0x00000017, + 0x00000035,0x00000015,0x00000034,0x0004003d,0x00000006,0x00000036,0x00000035,0x00050084, + 0x00000006,0x00000037,0x00000033,0x00000036,0x00050080,0x00000006,0x00000038,0x0000002a, + 0x00000037,0x0003003e,0x00000029,0x00000038,0x0004003d,0x00000006,0x0000003e,0x00000029, + 0x0004003d,0x00000006,0x00000043,0x00000008,0x00060041,0x00000044,0x00000045,0x00000042, + 0x0000002c,0x00000043,0x0004003d,0x00000039,0x00000046,0x00000045,0x00060041,0x00000044, + 0x00000047,0x0000003d,0x0000002c,0x0000003e,0x0003003e,0x00000047,0x00000046,0x000200f9, + 0x0000001d,0x000200f8,0x0000001d,0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/conv.comp b/modules/dnn/src/webgpu/shader/conv.comp new file mode 100644 index 000000000000..5da87de87d21 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/conv.comp @@ -0,0 +1,75 @@ +#version 450 +#define LOCAL_SZ_X 256 +layout(binding = 0) buffer Input0{ + float image_data[]; +}; +layout(binding = 1) buffer Input1 { + float bias_data[]; +}; +layout(binding = 2) buffer Input3{ + float weight_data[]; +}; +layout(binding = 3) buffer Output{ + float convolved_image_data[]; +}; +layout(binding = 4) uniform pushBlock { + int in_h; + int in_w; + int out_h; + int out_w; + int stride_h; + int stride_w; + int pad_h; + int pad_w; + int filter_h; + int filter_w; + int dilation_h; + int dilation_w; + int channels; + int batch; + int has_bias; + int M; + int K; + int N; + int basic_shader_batch_idx; + int basic_shader_partition_idx; + int basic_shader_partition_size; +} p; + +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; +void main() +{ + int gx = int(gl_GlobalInvocationID.x); + int gy = int(gl_GlobalInvocationID.y) + p.basic_shader_partition_idx * p.basic_shader_partition_size; + int gz = p.basic_shader_batch_idx; + if(gx < p.M && gy < p.N) + { + float sum = 0.0f; + int output_y = gx / p.out_w; + int output_x = gx % p.out_w; + int org_y = output_y * p.stride_h - p.pad_h; + int org_x = output_x * p.stride_w - p.pad_w; + int weight_off = gy * p.K; + int input_off = gz * p.in_h * p.in_w * p.channels + (org_y * p.in_w + org_x); + for(int c = 0; c < p.channels; c++) + { + for(int y = 0; y < p.filter_h; y++) + { + for(int x = 0; x < p.filter_w; x++) + { + if((org_y + y * p.dilation_h >= 0) && (org_y + y * p.dilation_h < p.in_h) && (org_x + x * p.dilation_w >= 0) && (org_x + x * p.dilation_w < p.in_w)) + { + sum += image_data[input_off + x * p.dilation_w] * weight_data[weight_off + x]; + } + } + input_off += p.in_w * p.dilation_h; + weight_off += p.filter_w; + } + input_off += p.in_h * p.in_w - p.in_w * p.filter_h * p.dilation_h; + } + int offset = gz * p.M * p.N + gx + gy * p.M; + if (p.has_bias == 1) + sum += bias_data[gy]; + convolved_image_data[offset] = sum; + } +} diff --git a/modules/dnn/src/webgpu/shader/conv48.comp b/modules/dnn/src/webgpu/shader/conv48.comp new file mode 100644 index 000000000000..eee2ff2ba164 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/conv48.comp @@ -0,0 +1,140 @@ +#version 450 + +#if defined(ACTIVATION_RELU) +#define ACTIVATION_FUNCTION(x) clamp(x, vec4(0.0), vec4(999999999.0)) +#elif defined(ACTIVATION_RELU1) +#define ACTIVATION_FUNCTION(x) clamp(x, vec4(-1.0), vec4(1.0)) +#elif defined(ACTIVATION_RELU6) +#define ACTIVATION_FUNCTION(x) clamp(x, vec4(0.0), vec4(6.0)) +#else +#define ACTIVATION_FUNCTION(x) (x) +#endif + +layout(binding = 0) buffer Input0{ + float data[]; +} src0; +layout(binding = 1) buffer Input1 { + vec4 data[]; +} bias; +layout(binding = 2) buffer Input3{ + vec4 data[]; +} src1; +layout(binding = 3) buffer Output{ + vec4 data[]; +} out0; +layout(binding = 4) uniform pushBlock{ + int LOCAL_SZ_X; + int LOCAL_SZ_Y; + int LOCAL_SZ_Z; + int IN_H; + int IN_W; + int OUT_W; + int STRIDE_H; + int STRIDE_W; + int PAD_H; + int PAD_W; + int FILTER_H; + int FILTER_W; + int CHANNELS; + int BATCH; + int M; + int K; + int N; + int TAIL_M; + int DILATION_H; + int DILATION_W; +} p; +layout(local_size_x = 1, local_size_y = 256, local_size_z = 1) in; + +#define VEC_SIZE 4 +#define BLOCK_H 4 +#define BLOCK_W 8 +#define FILTER_AREA (p.FILTER_H * p.FILTER_W) +#define LOAD_A(elm_idx, a_component) \ + src0_x = org_x + ((i * VEC_SIZE + elm_idx) % p.FILTER_W) * p.DILATION_W; \ + src0_y = org_y + (((i * VEC_SIZE + elm_idx) % FILTER_AREA) / p.FILTER_W) * p.DILATION_H; \ + src0_z = (i * VEC_SIZE + elm_idx) / FILTER_AREA; \ + if(src0_y >= 0 && src0_y < p.IN_H && src0_x >= 0 && src0_x < p.IN_W) \ + { \ + a_component = src0.data[input_batch_offset + src0_z * (p.IN_H * p.IN_W) + src0_y * p.IN_W + src0_x]; \ + } + +#define A_MULTIPLY_BTILE(a, sliver_num, comp) \ + dst_x = (out_y + sliver_num) % p.OUT_W; \ + dst_y = (out_y + sliver_num) / p.OUT_W; \ + org_y = dst_y * p.STRIDE_H - p.PAD_H; \ + org_x = dst_x * p.STRIDE_W - p.PAD_W; \ + LOAD_A(0, a.x); \ + LOAD_A(1, a.y); \ + LOAD_A(2, a.z); \ + LOAD_A(3, a.w); \ + dot0.comp += dot(brow0, a); \ + dot1.comp += dot(brow1, a); \ + dot2.comp += dot(brow2, a); \ + dot3.comp += dot(brow3, a); \ + dot4.comp += dot(brow4, a); \ + dot5.comp += dot(brow5, a); \ + dot6.comp += dot(brow6, a); \ + dot7.comp += dot(brow7, a); + +void main() +{ + int gx = int(gl_GlobalInvocationID.x); + int gy = int(gl_GlobalInvocationID.y); + int gz = int(gl_GlobalInvocationID.z); + int out_x = BLOCK_W * gx; + int out_y = BLOCK_H * gy; + int input_batch_offset = gz * p.IN_H * p.IN_W * p.CHANNELS; + int output_batch_offset = gz * p.M * p.N / VEC_SIZE; + if (out_x < p.N && gy < p.M / BLOCK_H) + { + int width0 = p.K / VEC_SIZE; + int width1 = p.N / VEC_SIZE; + int src1_read0_offset = out_x * width0; + vec4 dot0 = vec4(0.f); + vec4 dot1 = vec4(0.f); + vec4 dot2 = vec4(0.f); + vec4 dot3 = vec4(0.f); + vec4 dot4 = vec4(0.f); + vec4 dot5 = vec4(0.f); + vec4 dot6 = vec4(0.f); + vec4 dot7 = vec4(0.f); + int i = 0; + do + { + int dst_x, dst_y, org_x, org_y, src0_x, src0_y, src0_z; + vec4 a0 = vec4(0.f), a1 = vec4(0.f), a2 = vec4(0.f), a3 = vec4(0.f); + vec4 brow0 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow1 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow2 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow3 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow4 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow5 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow6 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + vec4 brow7 = src1.data[src1_read0_offset]; src1_read0_offset += width0; + src1_read0_offset += 1 - BLOCK_W * width0; + + A_MULTIPLY_BTILE(a0, 0, x); + A_MULTIPLY_BTILE(a1, 1, y); + A_MULTIPLY_BTILE(a2, 2, z); + A_MULTIPLY_BTILE(a3, 3, w); + i++; + } + while( i < width0 ); + + vec4 bias_val; + bias_val = bias.data[2 * int(gl_GlobalInvocationID.x)]; + dot0 += bias_val.xxxx; dot1 += bias_val.yyyy; dot2 += bias_val.zzzz; dot3 += bias_val.wwww; + bias_val = bias.data[2 * int(gl_GlobalInvocationID.x) + 1]; + dot4 += bias_val.xxxx; dot5 += bias_val.yyyy; dot6 += bias_val.zzzz; dot7 += bias_val.wwww; + + out0.data[output_batch_offset + (out_x + 0) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot0); + out0.data[output_batch_offset + (out_x + 1) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot1); + out0.data[output_batch_offset + (out_x + 2) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot2); + out0.data[output_batch_offset + (out_x + 3) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot3); + out0.data[output_batch_offset + (out_x + 4) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot4); + out0.data[output_batch_offset + (out_x + 5) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot5); + out0.data[output_batch_offset + (out_x + 6) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot6); + out0.data[output_batch_offset + (out_x + 7) * p.M / VEC_SIZE + gy] = ACTIVATION_FUNCTION(dot7); + } +} \ No newline at end of file diff --git a/modules/dnn/src/webgpu/shader/conv48_spv.cpp b/modules/dnn/src/webgpu/shader/conv48_spv.cpp new file mode 100644 index 000000000000..0e9e85428630 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/conv48_spv.cpp @@ -0,0 +1,1283 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int conv48_spv[10141] = { + 0x07230203,0x00010000,0x00080009,0x0000077a,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00060010,0x00000004, + 0x00000011,0x00000001,0x00000100,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, + 0x00000004,0x6e69616d,0x00000000,0x00030005,0x00000008,0x00007867,0x00080005,0x0000000c, + 0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00030005,0x00000012, + 0x00007967,0x00030005,0x00000017,0x00007a67,0x00040005,0x0000001c,0x5f74756f,0x00000078, + 0x00040005,0x00000020,0x5f74756f,0x00000079,0x00070005,0x00000024,0x75706e69,0x61625f74, + 0x5f686374,0x7366666f,0x00007465,0x00050005,0x00000026,0x68737570,0x636f6c42,0x0000006b, + 0x00060006,0x00000026,0x00000000,0x41434f4c,0x5a535f4c,0x0000585f,0x00060006,0x00000026, + 0x00000001,0x41434f4c,0x5a535f4c,0x0000595f,0x00060006,0x00000026,0x00000002,0x41434f4c, + 0x5a535f4c,0x00005a5f,0x00050006,0x00000026,0x00000003,0x485f4e49,0x00000000,0x00050006, + 0x00000026,0x00000004,0x575f4e49,0x00000000,0x00050006,0x00000026,0x00000005,0x5f54554f, + 0x00000057,0x00060006,0x00000026,0x00000006,0x49525453,0x485f4544,0x00000000,0x00060006, + 0x00000026,0x00000007,0x49525453,0x575f4544,0x00000000,0x00050006,0x00000026,0x00000008, + 0x5f444150,0x00000048,0x00050006,0x00000026,0x00000009,0x5f444150,0x00000057,0x00060006, + 0x00000026,0x0000000a,0x544c4946,0x485f5245,0x00000000,0x00060006,0x00000026,0x0000000b, + 0x544c4946,0x575f5245,0x00000000,0x00060006,0x00000026,0x0000000c,0x4e414843,0x534c454e, + 0x00000000,0x00050006,0x00000026,0x0000000d,0x43544142,0x00000048,0x00040006,0x00000026, + 0x0000000e,0x0000004d,0x00040006,0x00000026,0x0000000f,0x0000004b,0x00040006,0x00000026, + 0x00000010,0x0000004e,0x00050006,0x00000026,0x00000011,0x4c494154,0x00004d5f,0x00060006, + 0x00000026,0x00000012,0x414c4944,0x4e4f4954,0x0000485f,0x00060006,0x00000026,0x00000013, + 0x414c4944,0x4e4f4954,0x0000575f,0x00030005,0x00000028,0x00000070,0x00070005,0x00000035, + 0x7074756f,0x625f7475,0x68637461,0x66666f5f,0x00746573,0x00040005,0x0000004f,0x74646977, + 0x00003068,0x00040005,0x00000054,0x74646977,0x00003168,0x00070005,0x00000058,0x31637273, + 0x6165725f,0x6f5f3064,0x65736666,0x00000074,0x00040005,0x0000005f,0x30746f64,0x00000000, + 0x00040005,0x00000062,0x31746f64,0x00000000,0x00040005,0x00000063,0x32746f64,0x00000000, + 0x00040005,0x00000064,0x33746f64,0x00000000,0x00040005,0x00000065,0x34746f64,0x00000000, + 0x00040005,0x00000066,0x35746f64,0x00000000,0x00040005,0x00000067,0x36746f64,0x00000000, + 0x00040005,0x00000068,0x37746f64,0x00000000,0x00030005,0x00000069,0x00000069,0x00030005, + 0x0000006f,0x00003061,0x00030005,0x00000070,0x00003161,0x00030005,0x00000071,0x00003261, + 0x00030005,0x00000072,0x00003361,0x00040005,0x00000073,0x776f7262,0x00000030,0x00040005, + 0x00000075,0x75706e49,0x00003374,0x00050006,0x00000075,0x00000000,0x61746164,0x00000000, + 0x00040005,0x00000077,0x31637273,0x00000000,0x00040005,0x0000007f,0x776f7262,0x00000031, + 0x00040005,0x00000086,0x776f7262,0x00000032,0x00040005,0x0000008d,0x776f7262,0x00000033, + 0x00040005,0x00000094,0x776f7262,0x00000034,0x00040005,0x0000009b,0x776f7262,0x00000035, + 0x00040005,0x000000a2,0x776f7262,0x00000036,0x00040005,0x000000a9,0x776f7262,0x00000037, + 0x00040005,0x000000b6,0x5f747364,0x00000078,0x00040005,0x000000bd,0x5f747364,0x00000079, + 0x00040005,0x000000c3,0x5f67726f,0x00000079,0x00040005,0x000000cc,0x5f67726f,0x00000078, + 0x00040005,0x000000d6,0x30637273,0x0000785f,0x00040005,0x000000e4,0x30637273,0x0000795f, + 0x00040005,0x000000f8,0x30637273,0x00007a5f,0x00040005,0x00000118,0x75706e49,0x00003074, + 0x00050006,0x00000118,0x00000000,0x61746164,0x00000000,0x00040005,0x0000011a,0x30637273, + 0x00000000,0x00050005,0x000006e2,0x73616962,0x6c61765f,0x00000000,0x00040005,0x000006e4, + 0x75706e49,0x00003174,0x00050006,0x000006e4,0x00000000,0x61746164,0x00000000,0x00040005, + 0x000006e6,0x73616962,0x00000000,0x00040005,0x00000715,0x7074754f,0x00007475,0x00050006, + 0x00000715,0x00000000,0x61746164,0x00000000,0x00040005,0x00000717,0x3074756f,0x00000000, + 0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00050048,0x00000026,0x00000000,0x00000023, + 0x00000000,0x00050048,0x00000026,0x00000001,0x00000023,0x00000004,0x00050048,0x00000026, + 0x00000002,0x00000023,0x00000008,0x00050048,0x00000026,0x00000003,0x00000023,0x0000000c, + 0x00050048,0x00000026,0x00000004,0x00000023,0x00000010,0x00050048,0x00000026,0x00000005, + 0x00000023,0x00000014,0x00050048,0x00000026,0x00000006,0x00000023,0x00000018,0x00050048, + 0x00000026,0x00000007,0x00000023,0x0000001c,0x00050048,0x00000026,0x00000008,0x00000023, + 0x00000020,0x00050048,0x00000026,0x00000009,0x00000023,0x00000024,0x00050048,0x00000026, + 0x0000000a,0x00000023,0x00000028,0x00050048,0x00000026,0x0000000b,0x00000023,0x0000002c, + 0x00050048,0x00000026,0x0000000c,0x00000023,0x00000030,0x00050048,0x00000026,0x0000000d, + 0x00000023,0x00000034,0x00050048,0x00000026,0x0000000e,0x00000023,0x00000038,0x00050048, + 0x00000026,0x0000000f,0x00000023,0x0000003c,0x00050048,0x00000026,0x00000010,0x00000023, + 0x00000040,0x00050048,0x00000026,0x00000011,0x00000023,0x00000044,0x00050048,0x00000026, + 0x00000012,0x00000023,0x00000048,0x00050048,0x00000026,0x00000013,0x00000023,0x0000004c, + 0x00030047,0x00000026,0x00000002,0x00040047,0x00000028,0x00000022,0x00000000,0x00040047, + 0x00000028,0x00000021,0x00000004,0x00040047,0x00000074,0x00000006,0x00000010,0x00050048, + 0x00000075,0x00000000,0x00000023,0x00000000,0x00030047,0x00000075,0x00000003,0x00040047, + 0x00000077,0x00000022,0x00000000,0x00040047,0x00000077,0x00000021,0x00000002,0x00040047, + 0x00000117,0x00000006,0x00000004,0x00050048,0x00000118,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000118,0x00000003,0x00040047,0x0000011a,0x00000022,0x00000000,0x00040047, + 0x0000011a,0x00000021,0x00000000,0x00040047,0x000006e3,0x00000006,0x00000010,0x00050048, + 0x000006e4,0x00000000,0x00000023,0x00000000,0x00030047,0x000006e4,0x00000003,0x00040047, + 0x000006e6,0x00000022,0x00000000,0x00040047,0x000006e6,0x00000021,0x00000001,0x00040047, + 0x00000714,0x00000006,0x00000010,0x00050048,0x00000715,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000715,0x00000003,0x00040047,0x00000717,0x00000022,0x00000000,0x00040047, + 0x00000717,0x00000021,0x00000003,0x00040047,0x00000779,0x0000000b,0x00000019,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000001, + 0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020,0x00000000, + 0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a, + 0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000, + 0x00040020,0x0000000e,0x00000001,0x00000009,0x0004002b,0x00000009,0x00000013,0x00000001, + 0x0004002b,0x00000009,0x00000018,0x00000002,0x0004002b,0x00000006,0x0000001d,0x00000008, + 0x0004002b,0x00000006,0x00000021,0x00000004,0x0016001e,0x00000026,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00040020,0x00000027,0x00000002,0x00000026,0x0004003b,0x00000027, + 0x00000028,0x00000002,0x0004002b,0x00000006,0x00000029,0x00000003,0x00040020,0x0000002a, + 0x00000002,0x00000006,0x0004002b,0x00000006,0x00000031,0x0000000c,0x0004002b,0x00000006, + 0x00000037,0x0000000e,0x0004002b,0x00000006,0x0000003b,0x00000010,0x00020014,0x00000040, + 0x0004002b,0x00000006,0x00000050,0x0000000f,0x00030016,0x0000005c,0x00000020,0x00040017, + 0x0000005d,0x0000005c,0x00000004,0x00040020,0x0000005e,0x00000007,0x0000005d,0x0004002b, + 0x0000005c,0x00000060,0x00000000,0x0007002c,0x0000005d,0x00000061,0x00000060,0x00000060, + 0x00000060,0x00000060,0x0004002b,0x00000006,0x0000006a,0x00000000,0x0003001d,0x00000074, + 0x0000005d,0x0003001e,0x00000075,0x00000074,0x00040020,0x00000076,0x00000002,0x00000075, + 0x0004003b,0x00000076,0x00000077,0x00000002,0x00040020,0x00000079,0x00000002,0x0000005d, + 0x0004002b,0x00000006,0x000000b0,0x00000001,0x0004002b,0x00000006,0x000000b9,0x00000005, + 0x0004002b,0x00000006,0x000000c5,0x00000006,0x0004002b,0x00000006,0x000000ce,0x00000007, + 0x0004002b,0x00000006,0x000000d2,0x00000009,0x0004002b,0x00000006,0x000000db,0x0000000b, + 0x0004002b,0x00000006,0x000000df,0x00000013,0x0004002b,0x00000006,0x000000e9,0x0000000a, + 0x0004002b,0x00000006,0x000000f3,0x00000012,0x0003001d,0x00000117,0x0000005c,0x0003001e, + 0x00000118,0x00000117,0x00040020,0x00000119,0x00000002,0x00000118,0x0004003b,0x00000119, + 0x0000011a,0x00000002,0x00040020,0x0000012b,0x00000002,0x0000005c,0x00040020,0x0000012e, + 0x00000007,0x0000005c,0x0004002b,0x00000006,0x00000180,0x00000002,0x0004002b,0x00000009, + 0x00000217,0x00000003,0x0003001d,0x000006e3,0x0000005d,0x0003001e,0x000006e4,0x000006e3, + 0x00040020,0x000006e5,0x00000002,0x000006e4,0x0004003b,0x000006e5,0x000006e6,0x00000002, + 0x0003001d,0x00000714,0x0000005d,0x0003001e,0x00000715,0x00000714,0x00040020,0x00000716, + 0x00000002,0x00000715,0x0004003b,0x00000716,0x00000717,0x00000002,0x0004002b,0x00000009, + 0x00000778,0x00000100,0x0006002c,0x0000000a,0x00000779,0x00000013,0x00000778,0x00000013, + 0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b, + 0x00000007,0x00000008,0x00000007,0x0004003b,0x00000007,0x00000012,0x00000007,0x0004003b, + 0x00000007,0x00000017,0x00000007,0x0004003b,0x00000007,0x0000001c,0x00000007,0x0004003b, + 0x00000007,0x00000020,0x00000007,0x0004003b,0x00000007,0x00000024,0x00000007,0x0004003b, + 0x00000007,0x00000035,0x00000007,0x0004003b,0x00000007,0x0000004f,0x00000007,0x0004003b, + 0x00000007,0x00000054,0x00000007,0x0004003b,0x00000007,0x00000058,0x00000007,0x0004003b, + 0x0000005e,0x0000005f,0x00000007,0x0004003b,0x0000005e,0x00000062,0x00000007,0x0004003b, + 0x0000005e,0x00000063,0x00000007,0x0004003b,0x0000005e,0x00000064,0x00000007,0x0004003b, + 0x0000005e,0x00000065,0x00000007,0x0004003b,0x0000005e,0x00000066,0x00000007,0x0004003b, + 0x0000005e,0x00000067,0x00000007,0x0004003b,0x0000005e,0x00000068,0x00000007,0x0004003b, + 0x00000007,0x00000069,0x00000007,0x0004003b,0x0000005e,0x0000006f,0x00000007,0x0004003b, + 0x0000005e,0x00000070,0x00000007,0x0004003b,0x0000005e,0x00000071,0x00000007,0x0004003b, + 0x0000005e,0x00000072,0x00000007,0x0004003b,0x0000005e,0x00000073,0x00000007,0x0004003b, + 0x0000005e,0x0000007f,0x00000007,0x0004003b,0x0000005e,0x00000086,0x00000007,0x0004003b, + 0x0000005e,0x0000008d,0x00000007,0x0004003b,0x0000005e,0x00000094,0x00000007,0x0004003b, + 0x0000005e,0x0000009b,0x00000007,0x0004003b,0x0000005e,0x000000a2,0x00000007,0x0004003b, + 0x0000005e,0x000000a9,0x00000007,0x0004003b,0x00000007,0x000000b6,0x00000007,0x0004003b, + 0x00000007,0x000000bd,0x00000007,0x0004003b,0x00000007,0x000000c3,0x00000007,0x0004003b, + 0x00000007,0x000000cc,0x00000007,0x0004003b,0x00000007,0x000000d6,0x00000007,0x0004003b, + 0x00000007,0x000000e4,0x00000007,0x0004003b,0x00000007,0x000000f8,0x00000007,0x0004003b, + 0x0000005e,0x000006e2,0x00000007,0x00050041,0x0000000e,0x0000000f,0x0000000c,0x0000000d, + 0x0004003d,0x00000009,0x00000010,0x0000000f,0x0004007c,0x00000006,0x00000011,0x00000010, + 0x0003003e,0x00000008,0x00000011,0x00050041,0x0000000e,0x00000014,0x0000000c,0x00000013, + 0x0004003d,0x00000009,0x00000015,0x00000014,0x0004007c,0x00000006,0x00000016,0x00000015, + 0x0003003e,0x00000012,0x00000016,0x00050041,0x0000000e,0x00000019,0x0000000c,0x00000018, + 0x0004003d,0x00000009,0x0000001a,0x00000019,0x0004007c,0x00000006,0x0000001b,0x0000001a, + 0x0003003e,0x00000017,0x0000001b,0x0004003d,0x00000006,0x0000001e,0x00000008,0x00050084, + 0x00000006,0x0000001f,0x0000001d,0x0000001e,0x0003003e,0x0000001c,0x0000001f,0x0004003d, + 0x00000006,0x00000022,0x00000012,0x00050084,0x00000006,0x00000023,0x00000021,0x00000022, + 0x0003003e,0x00000020,0x00000023,0x0004003d,0x00000006,0x00000025,0x00000017,0x00050041, + 0x0000002a,0x0000002b,0x00000028,0x00000029,0x0004003d,0x00000006,0x0000002c,0x0000002b, + 0x00050084,0x00000006,0x0000002d,0x00000025,0x0000002c,0x00050041,0x0000002a,0x0000002e, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x0000002f,0x0000002e,0x00050084,0x00000006, + 0x00000030,0x0000002d,0x0000002f,0x00050041,0x0000002a,0x00000032,0x00000028,0x00000031, + 0x0004003d,0x00000006,0x00000033,0x00000032,0x00050084,0x00000006,0x00000034,0x00000030, + 0x00000033,0x0003003e,0x00000024,0x00000034,0x0004003d,0x00000006,0x00000036,0x00000017, + 0x00050041,0x0000002a,0x00000038,0x00000028,0x00000037,0x0004003d,0x00000006,0x00000039, + 0x00000038,0x00050084,0x00000006,0x0000003a,0x00000036,0x00000039,0x00050041,0x0000002a, + 0x0000003c,0x00000028,0x0000003b,0x0004003d,0x00000006,0x0000003d,0x0000003c,0x00050084, + 0x00000006,0x0000003e,0x0000003a,0x0000003d,0x00050087,0x00000006,0x0000003f,0x0000003e, + 0x00000021,0x0003003e,0x00000035,0x0000003f,0x0004003d,0x00000006,0x00000041,0x0000001c, + 0x00050041,0x0000002a,0x00000042,0x00000028,0x0000003b,0x0004003d,0x00000006,0x00000043, + 0x00000042,0x000500b1,0x00000040,0x00000044,0x00000041,0x00000043,0x000300f7,0x00000046, + 0x00000000,0x000400fa,0x00000044,0x00000045,0x00000046,0x000200f8,0x00000045,0x0004003d, + 0x00000006,0x00000047,0x00000012,0x00050041,0x0000002a,0x00000048,0x00000028,0x00000037, + 0x0004003d,0x00000006,0x00000049,0x00000048,0x00050087,0x00000006,0x0000004a,0x00000049, + 0x00000021,0x000500b1,0x00000040,0x0000004b,0x00000047,0x0000004a,0x000200f9,0x00000046, + 0x000200f8,0x00000046,0x000700f5,0x00000040,0x0000004c,0x00000044,0x00000005,0x0000004b, + 0x00000045,0x000300f7,0x0000004e,0x00000000,0x000400fa,0x0000004c,0x0000004d,0x0000004e, + 0x000200f8,0x0000004d,0x00050041,0x0000002a,0x00000051,0x00000028,0x00000050,0x0004003d, + 0x00000006,0x00000052,0x00000051,0x00050087,0x00000006,0x00000053,0x00000052,0x00000021, + 0x0003003e,0x0000004f,0x00000053,0x00050041,0x0000002a,0x00000055,0x00000028,0x0000003b, + 0x0004003d,0x00000006,0x00000056,0x00000055,0x00050087,0x00000006,0x00000057,0x00000056, + 0x00000021,0x0003003e,0x00000054,0x00000057,0x0004003d,0x00000006,0x00000059,0x0000001c, + 0x0004003d,0x00000006,0x0000005a,0x0000004f,0x00050084,0x00000006,0x0000005b,0x00000059, + 0x0000005a,0x0003003e,0x00000058,0x0000005b,0x0003003e,0x0000005f,0x00000061,0x0003003e, + 0x00000062,0x00000061,0x0003003e,0x00000063,0x00000061,0x0003003e,0x00000064,0x00000061, + 0x0003003e,0x00000065,0x00000061,0x0003003e,0x00000066,0x00000061,0x0003003e,0x00000067, + 0x00000061,0x0003003e,0x00000068,0x00000061,0x0003003e,0x00000069,0x0000006a,0x000200f9, + 0x0000006b,0x000200f8,0x0000006b,0x000400f6,0x0000006d,0x0000006e,0x00000000,0x000200f9, + 0x0000006c,0x000200f8,0x0000006c,0x0003003e,0x0000006f,0x00000061,0x0003003e,0x00000070, + 0x00000061,0x0003003e,0x00000071,0x00000061,0x0003003e,0x00000072,0x00000061,0x0004003d, + 0x00000006,0x00000078,0x00000058,0x00060041,0x00000079,0x0000007a,0x00000077,0x0000006a, + 0x00000078,0x0004003d,0x0000005d,0x0000007b,0x0000007a,0x0003003e,0x00000073,0x0000007b, + 0x0004003d,0x00000006,0x0000007c,0x0000004f,0x0004003d,0x00000006,0x0000007d,0x00000058, + 0x00050080,0x00000006,0x0000007e,0x0000007d,0x0000007c,0x0003003e,0x00000058,0x0000007e, + 0x0004003d,0x00000006,0x00000080,0x00000058,0x00060041,0x00000079,0x00000081,0x00000077, + 0x0000006a,0x00000080,0x0004003d,0x0000005d,0x00000082,0x00000081,0x0003003e,0x0000007f, + 0x00000082,0x0004003d,0x00000006,0x00000083,0x0000004f,0x0004003d,0x00000006,0x00000084, + 0x00000058,0x00050080,0x00000006,0x00000085,0x00000084,0x00000083,0x0003003e,0x00000058, + 0x00000085,0x0004003d,0x00000006,0x00000087,0x00000058,0x00060041,0x00000079,0x00000088, + 0x00000077,0x0000006a,0x00000087,0x0004003d,0x0000005d,0x00000089,0x00000088,0x0003003e, + 0x00000086,0x00000089,0x0004003d,0x00000006,0x0000008a,0x0000004f,0x0004003d,0x00000006, + 0x0000008b,0x00000058,0x00050080,0x00000006,0x0000008c,0x0000008b,0x0000008a,0x0003003e, + 0x00000058,0x0000008c,0x0004003d,0x00000006,0x0000008e,0x00000058,0x00060041,0x00000079, + 0x0000008f,0x00000077,0x0000006a,0x0000008e,0x0004003d,0x0000005d,0x00000090,0x0000008f, + 0x0003003e,0x0000008d,0x00000090,0x0004003d,0x00000006,0x00000091,0x0000004f,0x0004003d, + 0x00000006,0x00000092,0x00000058,0x00050080,0x00000006,0x00000093,0x00000092,0x00000091, + 0x0003003e,0x00000058,0x00000093,0x0004003d,0x00000006,0x00000095,0x00000058,0x00060041, + 0x00000079,0x00000096,0x00000077,0x0000006a,0x00000095,0x0004003d,0x0000005d,0x00000097, + 0x00000096,0x0003003e,0x00000094,0x00000097,0x0004003d,0x00000006,0x00000098,0x0000004f, + 0x0004003d,0x00000006,0x00000099,0x00000058,0x00050080,0x00000006,0x0000009a,0x00000099, + 0x00000098,0x0003003e,0x00000058,0x0000009a,0x0004003d,0x00000006,0x0000009c,0x00000058, + 0x00060041,0x00000079,0x0000009d,0x00000077,0x0000006a,0x0000009c,0x0004003d,0x0000005d, + 0x0000009e,0x0000009d,0x0003003e,0x0000009b,0x0000009e,0x0004003d,0x00000006,0x0000009f, + 0x0000004f,0x0004003d,0x00000006,0x000000a0,0x00000058,0x00050080,0x00000006,0x000000a1, + 0x000000a0,0x0000009f,0x0003003e,0x00000058,0x000000a1,0x0004003d,0x00000006,0x000000a3, + 0x00000058,0x00060041,0x00000079,0x000000a4,0x00000077,0x0000006a,0x000000a3,0x0004003d, + 0x0000005d,0x000000a5,0x000000a4,0x0003003e,0x000000a2,0x000000a5,0x0004003d,0x00000006, + 0x000000a6,0x0000004f,0x0004003d,0x00000006,0x000000a7,0x00000058,0x00050080,0x00000006, + 0x000000a8,0x000000a7,0x000000a6,0x0003003e,0x00000058,0x000000a8,0x0004003d,0x00000006, + 0x000000aa,0x00000058,0x00060041,0x00000079,0x000000ab,0x00000077,0x0000006a,0x000000aa, + 0x0004003d,0x0000005d,0x000000ac,0x000000ab,0x0003003e,0x000000a9,0x000000ac,0x0004003d, + 0x00000006,0x000000ad,0x0000004f,0x0004003d,0x00000006,0x000000ae,0x00000058,0x00050080, + 0x00000006,0x000000af,0x000000ae,0x000000ad,0x0003003e,0x00000058,0x000000af,0x0004003d, + 0x00000006,0x000000b1,0x0000004f,0x00050084,0x00000006,0x000000b2,0x0000001d,0x000000b1, + 0x00050082,0x00000006,0x000000b3,0x000000b0,0x000000b2,0x0004003d,0x00000006,0x000000b4, + 0x00000058,0x00050080,0x00000006,0x000000b5,0x000000b4,0x000000b3,0x0003003e,0x00000058, + 0x000000b5,0x0004003d,0x00000006,0x000000b7,0x00000020,0x00050080,0x00000006,0x000000b8, + 0x000000b7,0x0000006a,0x00050041,0x0000002a,0x000000ba,0x00000028,0x000000b9,0x0004003d, + 0x00000006,0x000000bb,0x000000ba,0x0005008b,0x00000006,0x000000bc,0x000000b8,0x000000bb, + 0x0003003e,0x000000b6,0x000000bc,0x0004003d,0x00000006,0x000000be,0x00000020,0x00050080, + 0x00000006,0x000000bf,0x000000be,0x0000006a,0x00050041,0x0000002a,0x000000c0,0x00000028, + 0x000000b9,0x0004003d,0x00000006,0x000000c1,0x000000c0,0x00050087,0x00000006,0x000000c2, + 0x000000bf,0x000000c1,0x0003003e,0x000000bd,0x000000c2,0x0004003d,0x00000006,0x000000c4, + 0x000000bd,0x00050041,0x0000002a,0x000000c6,0x00000028,0x000000c5,0x0004003d,0x00000006, + 0x000000c7,0x000000c6,0x00050084,0x00000006,0x000000c8,0x000000c4,0x000000c7,0x00050041, + 0x0000002a,0x000000c9,0x00000028,0x0000001d,0x0004003d,0x00000006,0x000000ca,0x000000c9, + 0x00050082,0x00000006,0x000000cb,0x000000c8,0x000000ca,0x0003003e,0x000000c3,0x000000cb, + 0x0004003d,0x00000006,0x000000cd,0x000000b6,0x00050041,0x0000002a,0x000000cf,0x00000028, + 0x000000ce,0x0004003d,0x00000006,0x000000d0,0x000000cf,0x00050084,0x00000006,0x000000d1, + 0x000000cd,0x000000d0,0x00050041,0x0000002a,0x000000d3,0x00000028,0x000000d2,0x0004003d, + 0x00000006,0x000000d4,0x000000d3,0x00050082,0x00000006,0x000000d5,0x000000d1,0x000000d4, + 0x0003003e,0x000000cc,0x000000d5,0x0004003d,0x00000006,0x000000d7,0x000000cc,0x0004003d, + 0x00000006,0x000000d8,0x00000069,0x00050084,0x00000006,0x000000d9,0x000000d8,0x00000021, + 0x00050080,0x00000006,0x000000da,0x000000d9,0x0000006a,0x00050041,0x0000002a,0x000000dc, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x000000dd,0x000000dc,0x0005008b,0x00000006, + 0x000000de,0x000000da,0x000000dd,0x00050041,0x0000002a,0x000000e0,0x00000028,0x000000df, + 0x0004003d,0x00000006,0x000000e1,0x000000e0,0x00050084,0x00000006,0x000000e2,0x000000de, + 0x000000e1,0x00050080,0x00000006,0x000000e3,0x000000d7,0x000000e2,0x0003003e,0x000000d6, + 0x000000e3,0x0004003d,0x00000006,0x000000e5,0x000000c3,0x0004003d,0x00000006,0x000000e6, + 0x00000069,0x00050084,0x00000006,0x000000e7,0x000000e6,0x00000021,0x00050080,0x00000006, + 0x000000e8,0x000000e7,0x0000006a,0x00050041,0x0000002a,0x000000ea,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x000000eb,0x000000ea,0x00050041,0x0000002a,0x000000ec,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x000000ed,0x000000ec,0x00050084,0x00000006,0x000000ee, + 0x000000eb,0x000000ed,0x0005008b,0x00000006,0x000000ef,0x000000e8,0x000000ee,0x00050041, + 0x0000002a,0x000000f0,0x00000028,0x000000db,0x0004003d,0x00000006,0x000000f1,0x000000f0, + 0x00050087,0x00000006,0x000000f2,0x000000ef,0x000000f1,0x00050041,0x0000002a,0x000000f4, + 0x00000028,0x000000f3,0x0004003d,0x00000006,0x000000f5,0x000000f4,0x00050084,0x00000006, + 0x000000f6,0x000000f2,0x000000f5,0x00050080,0x00000006,0x000000f7,0x000000e5,0x000000f6, + 0x0003003e,0x000000e4,0x000000f7,0x0004003d,0x00000006,0x000000f9,0x00000069,0x00050084, + 0x00000006,0x000000fa,0x000000f9,0x00000021,0x00050080,0x00000006,0x000000fb,0x000000fa, + 0x0000006a,0x00050041,0x0000002a,0x000000fc,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x000000fd,0x000000fc,0x00050041,0x0000002a,0x000000fe,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x000000ff,0x000000fe,0x00050084,0x00000006,0x00000100,0x000000fd,0x000000ff, + 0x00050087,0x00000006,0x00000101,0x000000fb,0x00000100,0x0003003e,0x000000f8,0x00000101, + 0x0004003d,0x00000006,0x00000102,0x000000e4,0x000500af,0x00000040,0x00000103,0x00000102, + 0x0000006a,0x000300f7,0x00000105,0x00000000,0x000400fa,0x00000103,0x00000104,0x00000105, + 0x000200f8,0x00000104,0x0004003d,0x00000006,0x00000106,0x000000e4,0x00050041,0x0000002a, + 0x00000107,0x00000028,0x00000029,0x0004003d,0x00000006,0x00000108,0x00000107,0x000500b1, + 0x00000040,0x00000109,0x00000106,0x00000108,0x000200f9,0x00000105,0x000200f8,0x00000105, + 0x000700f5,0x00000040,0x0000010a,0x00000103,0x0000006c,0x00000109,0x00000104,0x0004003d, + 0x00000006,0x0000010b,0x000000d6,0x000500af,0x00000040,0x0000010c,0x0000010b,0x0000006a, + 0x000500a7,0x00000040,0x0000010d,0x0000010a,0x0000010c,0x000300f7,0x0000010f,0x00000000, + 0x000400fa,0x0000010d,0x0000010e,0x0000010f,0x000200f8,0x0000010e,0x0004003d,0x00000006, + 0x00000110,0x000000d6,0x00050041,0x0000002a,0x00000111,0x00000028,0x00000021,0x0004003d, + 0x00000006,0x00000112,0x00000111,0x000500b1,0x00000040,0x00000113,0x00000110,0x00000112, + 0x000200f9,0x0000010f,0x000200f8,0x0000010f,0x000700f5,0x00000040,0x00000114,0x0000010d, + 0x00000105,0x00000113,0x0000010e,0x000300f7,0x00000116,0x00000000,0x000400fa,0x00000114, + 0x00000115,0x00000116,0x000200f8,0x00000115,0x0004003d,0x00000006,0x0000011b,0x00000024, + 0x0004003d,0x00000006,0x0000011c,0x000000f8,0x00050041,0x0000002a,0x0000011d,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x0000011e,0x0000011d,0x00050041,0x0000002a,0x0000011f, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x00000120,0x0000011f,0x00050084,0x00000006, + 0x00000121,0x0000011e,0x00000120,0x00050084,0x00000006,0x00000122,0x0000011c,0x00000121, + 0x00050080,0x00000006,0x00000123,0x0000011b,0x00000122,0x0004003d,0x00000006,0x00000124, + 0x000000e4,0x00050041,0x0000002a,0x00000125,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x00000126,0x00000125,0x00050084,0x00000006,0x00000127,0x00000124,0x00000126,0x00050080, + 0x00000006,0x00000128,0x00000123,0x00000127,0x0004003d,0x00000006,0x00000129,0x000000d6, + 0x00050080,0x00000006,0x0000012a,0x00000128,0x00000129,0x00060041,0x0000012b,0x0000012c, + 0x0000011a,0x0000006a,0x0000012a,0x0004003d,0x0000005c,0x0000012d,0x0000012c,0x00050041, + 0x0000012e,0x0000012f,0x0000006f,0x0000000d,0x0003003e,0x0000012f,0x0000012d,0x000200f9, + 0x00000116,0x000200f8,0x00000116,0x0004003d,0x00000006,0x00000130,0x000000cc,0x0004003d, + 0x00000006,0x00000131,0x00000069,0x00050084,0x00000006,0x00000132,0x00000131,0x00000021, + 0x00050080,0x00000006,0x00000133,0x00000132,0x000000b0,0x00050041,0x0000002a,0x00000134, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x00000135,0x00000134,0x0005008b,0x00000006, + 0x00000136,0x00000133,0x00000135,0x00050041,0x0000002a,0x00000137,0x00000028,0x000000df, + 0x0004003d,0x00000006,0x00000138,0x00000137,0x00050084,0x00000006,0x00000139,0x00000136, + 0x00000138,0x00050080,0x00000006,0x0000013a,0x00000130,0x00000139,0x0003003e,0x000000d6, + 0x0000013a,0x0004003d,0x00000006,0x0000013b,0x000000c3,0x0004003d,0x00000006,0x0000013c, + 0x00000069,0x00050084,0x00000006,0x0000013d,0x0000013c,0x00000021,0x00050080,0x00000006, + 0x0000013e,0x0000013d,0x000000b0,0x00050041,0x0000002a,0x0000013f,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x00000140,0x0000013f,0x00050041,0x0000002a,0x00000141,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x00000142,0x00000141,0x00050084,0x00000006,0x00000143, + 0x00000140,0x00000142,0x0005008b,0x00000006,0x00000144,0x0000013e,0x00000143,0x00050041, + 0x0000002a,0x00000145,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000146,0x00000145, + 0x00050087,0x00000006,0x00000147,0x00000144,0x00000146,0x00050041,0x0000002a,0x00000148, + 0x00000028,0x000000f3,0x0004003d,0x00000006,0x00000149,0x00000148,0x00050084,0x00000006, + 0x0000014a,0x00000147,0x00000149,0x00050080,0x00000006,0x0000014b,0x0000013b,0x0000014a, + 0x0003003e,0x000000e4,0x0000014b,0x0004003d,0x00000006,0x0000014c,0x00000069,0x00050084, + 0x00000006,0x0000014d,0x0000014c,0x00000021,0x00050080,0x00000006,0x0000014e,0x0000014d, + 0x000000b0,0x00050041,0x0000002a,0x0000014f,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x00000150,0x0000014f,0x00050041,0x0000002a,0x00000151,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x00000152,0x00000151,0x00050084,0x00000006,0x00000153,0x00000150,0x00000152, + 0x00050087,0x00000006,0x00000154,0x0000014e,0x00000153,0x0003003e,0x000000f8,0x00000154, + 0x0004003d,0x00000006,0x00000155,0x000000e4,0x000500af,0x00000040,0x00000156,0x00000155, + 0x0000006a,0x000300f7,0x00000158,0x00000000,0x000400fa,0x00000156,0x00000157,0x00000158, + 0x000200f8,0x00000157,0x0004003d,0x00000006,0x00000159,0x000000e4,0x00050041,0x0000002a, + 0x0000015a,0x00000028,0x00000029,0x0004003d,0x00000006,0x0000015b,0x0000015a,0x000500b1, + 0x00000040,0x0000015c,0x00000159,0x0000015b,0x000200f9,0x00000158,0x000200f8,0x00000158, + 0x000700f5,0x00000040,0x0000015d,0x00000156,0x00000116,0x0000015c,0x00000157,0x0004003d, + 0x00000006,0x0000015e,0x000000d6,0x000500af,0x00000040,0x0000015f,0x0000015e,0x0000006a, + 0x000500a7,0x00000040,0x00000160,0x0000015d,0x0000015f,0x000300f7,0x00000162,0x00000000, + 0x000400fa,0x00000160,0x00000161,0x00000162,0x000200f8,0x00000161,0x0004003d,0x00000006, + 0x00000163,0x000000d6,0x00050041,0x0000002a,0x00000164,0x00000028,0x00000021,0x0004003d, + 0x00000006,0x00000165,0x00000164,0x000500b1,0x00000040,0x00000166,0x00000163,0x00000165, + 0x000200f9,0x00000162,0x000200f8,0x00000162,0x000700f5,0x00000040,0x00000167,0x00000160, + 0x00000158,0x00000166,0x00000161,0x000300f7,0x00000169,0x00000000,0x000400fa,0x00000167, + 0x00000168,0x00000169,0x000200f8,0x00000168,0x0004003d,0x00000006,0x0000016a,0x00000024, + 0x0004003d,0x00000006,0x0000016b,0x000000f8,0x00050041,0x0000002a,0x0000016c,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x0000016d,0x0000016c,0x00050041,0x0000002a,0x0000016e, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x0000016f,0x0000016e,0x00050084,0x00000006, + 0x00000170,0x0000016d,0x0000016f,0x00050084,0x00000006,0x00000171,0x0000016b,0x00000170, + 0x00050080,0x00000006,0x00000172,0x0000016a,0x00000171,0x0004003d,0x00000006,0x00000173, + 0x000000e4,0x00050041,0x0000002a,0x00000174,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x00000175,0x00000174,0x00050084,0x00000006,0x00000176,0x00000173,0x00000175,0x00050080, + 0x00000006,0x00000177,0x00000172,0x00000176,0x0004003d,0x00000006,0x00000178,0x000000d6, + 0x00050080,0x00000006,0x00000179,0x00000177,0x00000178,0x00060041,0x0000012b,0x0000017a, + 0x0000011a,0x0000006a,0x00000179,0x0004003d,0x0000005c,0x0000017b,0x0000017a,0x00050041, + 0x0000012e,0x0000017c,0x0000006f,0x00000013,0x0003003e,0x0000017c,0x0000017b,0x000200f9, + 0x00000169,0x000200f8,0x00000169,0x0004003d,0x00000006,0x0000017d,0x000000cc,0x0004003d, + 0x00000006,0x0000017e,0x00000069,0x00050084,0x00000006,0x0000017f,0x0000017e,0x00000021, + 0x00050080,0x00000006,0x00000181,0x0000017f,0x00000180,0x00050041,0x0000002a,0x00000182, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x00000183,0x00000182,0x0005008b,0x00000006, + 0x00000184,0x00000181,0x00000183,0x00050041,0x0000002a,0x00000185,0x00000028,0x000000df, + 0x0004003d,0x00000006,0x00000186,0x00000185,0x00050084,0x00000006,0x00000187,0x00000184, + 0x00000186,0x00050080,0x00000006,0x00000188,0x0000017d,0x00000187,0x0003003e,0x000000d6, + 0x00000188,0x0004003d,0x00000006,0x00000189,0x000000c3,0x0004003d,0x00000006,0x0000018a, + 0x00000069,0x00050084,0x00000006,0x0000018b,0x0000018a,0x00000021,0x00050080,0x00000006, + 0x0000018c,0x0000018b,0x00000180,0x00050041,0x0000002a,0x0000018d,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x0000018e,0x0000018d,0x00050041,0x0000002a,0x0000018f,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x00000190,0x0000018f,0x00050084,0x00000006,0x00000191, + 0x0000018e,0x00000190,0x0005008b,0x00000006,0x00000192,0x0000018c,0x00000191,0x00050041, + 0x0000002a,0x00000193,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000194,0x00000193, + 0x00050087,0x00000006,0x00000195,0x00000192,0x00000194,0x00050041,0x0000002a,0x00000196, + 0x00000028,0x000000f3,0x0004003d,0x00000006,0x00000197,0x00000196,0x00050084,0x00000006, + 0x00000198,0x00000195,0x00000197,0x00050080,0x00000006,0x00000199,0x00000189,0x00000198, + 0x0003003e,0x000000e4,0x00000199,0x0004003d,0x00000006,0x0000019a,0x00000069,0x00050084, + 0x00000006,0x0000019b,0x0000019a,0x00000021,0x00050080,0x00000006,0x0000019c,0x0000019b, + 0x00000180,0x00050041,0x0000002a,0x0000019d,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x0000019e,0x0000019d,0x00050041,0x0000002a,0x0000019f,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x000001a0,0x0000019f,0x00050084,0x00000006,0x000001a1,0x0000019e,0x000001a0, + 0x00050087,0x00000006,0x000001a2,0x0000019c,0x000001a1,0x0003003e,0x000000f8,0x000001a2, + 0x0004003d,0x00000006,0x000001a3,0x000000e4,0x000500af,0x00000040,0x000001a4,0x000001a3, + 0x0000006a,0x000300f7,0x000001a6,0x00000000,0x000400fa,0x000001a4,0x000001a5,0x000001a6, + 0x000200f8,0x000001a5,0x0004003d,0x00000006,0x000001a7,0x000000e4,0x00050041,0x0000002a, + 0x000001a8,0x00000028,0x00000029,0x0004003d,0x00000006,0x000001a9,0x000001a8,0x000500b1, + 0x00000040,0x000001aa,0x000001a7,0x000001a9,0x000200f9,0x000001a6,0x000200f8,0x000001a6, + 0x000700f5,0x00000040,0x000001ab,0x000001a4,0x00000169,0x000001aa,0x000001a5,0x0004003d, + 0x00000006,0x000001ac,0x000000d6,0x000500af,0x00000040,0x000001ad,0x000001ac,0x0000006a, + 0x000500a7,0x00000040,0x000001ae,0x000001ab,0x000001ad,0x000300f7,0x000001b0,0x00000000, + 0x000400fa,0x000001ae,0x000001af,0x000001b0,0x000200f8,0x000001af,0x0004003d,0x00000006, + 0x000001b1,0x000000d6,0x00050041,0x0000002a,0x000001b2,0x00000028,0x00000021,0x0004003d, + 0x00000006,0x000001b3,0x000001b2,0x000500b1,0x00000040,0x000001b4,0x000001b1,0x000001b3, + 0x000200f9,0x000001b0,0x000200f8,0x000001b0,0x000700f5,0x00000040,0x000001b5,0x000001ae, + 0x000001a6,0x000001b4,0x000001af,0x000300f7,0x000001b7,0x00000000,0x000400fa,0x000001b5, + 0x000001b6,0x000001b7,0x000200f8,0x000001b6,0x0004003d,0x00000006,0x000001b8,0x00000024, + 0x0004003d,0x00000006,0x000001b9,0x000000f8,0x00050041,0x0000002a,0x000001ba,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x000001bb,0x000001ba,0x00050041,0x0000002a,0x000001bc, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x000001bd,0x000001bc,0x00050084,0x00000006, + 0x000001be,0x000001bb,0x000001bd,0x00050084,0x00000006,0x000001bf,0x000001b9,0x000001be, + 0x00050080,0x00000006,0x000001c0,0x000001b8,0x000001bf,0x0004003d,0x00000006,0x000001c1, + 0x000000e4,0x00050041,0x0000002a,0x000001c2,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x000001c3,0x000001c2,0x00050084,0x00000006,0x000001c4,0x000001c1,0x000001c3,0x00050080, + 0x00000006,0x000001c5,0x000001c0,0x000001c4,0x0004003d,0x00000006,0x000001c6,0x000000d6, + 0x00050080,0x00000006,0x000001c7,0x000001c5,0x000001c6,0x00060041,0x0000012b,0x000001c8, + 0x0000011a,0x0000006a,0x000001c7,0x0004003d,0x0000005c,0x000001c9,0x000001c8,0x00050041, + 0x0000012e,0x000001ca,0x0000006f,0x00000018,0x0003003e,0x000001ca,0x000001c9,0x000200f9, + 0x000001b7,0x000200f8,0x000001b7,0x0004003d,0x00000006,0x000001cb,0x000000cc,0x0004003d, + 0x00000006,0x000001cc,0x00000069,0x00050084,0x00000006,0x000001cd,0x000001cc,0x00000021, + 0x00050080,0x00000006,0x000001ce,0x000001cd,0x00000029,0x00050041,0x0000002a,0x000001cf, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x000001d0,0x000001cf,0x0005008b,0x00000006, + 0x000001d1,0x000001ce,0x000001d0,0x00050041,0x0000002a,0x000001d2,0x00000028,0x000000df, + 0x0004003d,0x00000006,0x000001d3,0x000001d2,0x00050084,0x00000006,0x000001d4,0x000001d1, + 0x000001d3,0x00050080,0x00000006,0x000001d5,0x000001cb,0x000001d4,0x0003003e,0x000000d6, + 0x000001d5,0x0004003d,0x00000006,0x000001d6,0x000000c3,0x0004003d,0x00000006,0x000001d7, + 0x00000069,0x00050084,0x00000006,0x000001d8,0x000001d7,0x00000021,0x00050080,0x00000006, + 0x000001d9,0x000001d8,0x00000029,0x00050041,0x0000002a,0x000001da,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x000001db,0x000001da,0x00050041,0x0000002a,0x000001dc,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x000001dd,0x000001dc,0x00050084,0x00000006,0x000001de, + 0x000001db,0x000001dd,0x0005008b,0x00000006,0x000001df,0x000001d9,0x000001de,0x00050041, + 0x0000002a,0x000001e0,0x00000028,0x000000db,0x0004003d,0x00000006,0x000001e1,0x000001e0, + 0x00050087,0x00000006,0x000001e2,0x000001df,0x000001e1,0x00050041,0x0000002a,0x000001e3, + 0x00000028,0x000000f3,0x0004003d,0x00000006,0x000001e4,0x000001e3,0x00050084,0x00000006, + 0x000001e5,0x000001e2,0x000001e4,0x00050080,0x00000006,0x000001e6,0x000001d6,0x000001e5, + 0x0003003e,0x000000e4,0x000001e6,0x0004003d,0x00000006,0x000001e7,0x00000069,0x00050084, + 0x00000006,0x000001e8,0x000001e7,0x00000021,0x00050080,0x00000006,0x000001e9,0x000001e8, + 0x00000029,0x00050041,0x0000002a,0x000001ea,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x000001eb,0x000001ea,0x00050041,0x0000002a,0x000001ec,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x000001ed,0x000001ec,0x00050084,0x00000006,0x000001ee,0x000001eb,0x000001ed, + 0x00050087,0x00000006,0x000001ef,0x000001e9,0x000001ee,0x0003003e,0x000000f8,0x000001ef, + 0x0004003d,0x00000006,0x000001f0,0x000000e4,0x000500af,0x00000040,0x000001f1,0x000001f0, + 0x0000006a,0x000300f7,0x000001f3,0x00000000,0x000400fa,0x000001f1,0x000001f2,0x000001f3, + 0x000200f8,0x000001f2,0x0004003d,0x00000006,0x000001f4,0x000000e4,0x00050041,0x0000002a, + 0x000001f5,0x00000028,0x00000029,0x0004003d,0x00000006,0x000001f6,0x000001f5,0x000500b1, + 0x00000040,0x000001f7,0x000001f4,0x000001f6,0x000200f9,0x000001f3,0x000200f8,0x000001f3, + 0x000700f5,0x00000040,0x000001f8,0x000001f1,0x000001b7,0x000001f7,0x000001f2,0x0004003d, + 0x00000006,0x000001f9,0x000000d6,0x000500af,0x00000040,0x000001fa,0x000001f9,0x0000006a, + 0x000500a7,0x00000040,0x000001fb,0x000001f8,0x000001fa,0x000300f7,0x000001fd,0x00000000, + 0x000400fa,0x000001fb,0x000001fc,0x000001fd,0x000200f8,0x000001fc,0x0004003d,0x00000006, + 0x000001fe,0x000000d6,0x00050041,0x0000002a,0x000001ff,0x00000028,0x00000021,0x0004003d, + 0x00000006,0x00000200,0x000001ff,0x000500b1,0x00000040,0x00000201,0x000001fe,0x00000200, + 0x000200f9,0x000001fd,0x000200f8,0x000001fd,0x000700f5,0x00000040,0x00000202,0x000001fb, + 0x000001f3,0x00000201,0x000001fc,0x000300f7,0x00000204,0x00000000,0x000400fa,0x00000202, + 0x00000203,0x00000204,0x000200f8,0x00000203,0x0004003d,0x00000006,0x00000205,0x00000024, + 0x0004003d,0x00000006,0x00000206,0x000000f8,0x00050041,0x0000002a,0x00000207,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x00000208,0x00000207,0x00050041,0x0000002a,0x00000209, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x0000020a,0x00000209,0x00050084,0x00000006, + 0x0000020b,0x00000208,0x0000020a,0x00050084,0x00000006,0x0000020c,0x00000206,0x0000020b, + 0x00050080,0x00000006,0x0000020d,0x00000205,0x0000020c,0x0004003d,0x00000006,0x0000020e, + 0x000000e4,0x00050041,0x0000002a,0x0000020f,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x00000210,0x0000020f,0x00050084,0x00000006,0x00000211,0x0000020e,0x00000210,0x00050080, + 0x00000006,0x00000212,0x0000020d,0x00000211,0x0004003d,0x00000006,0x00000213,0x000000d6, + 0x00050080,0x00000006,0x00000214,0x00000212,0x00000213,0x00060041,0x0000012b,0x00000215, + 0x0000011a,0x0000006a,0x00000214,0x0004003d,0x0000005c,0x00000216,0x00000215,0x00050041, + 0x0000012e,0x00000218,0x0000006f,0x00000217,0x0003003e,0x00000218,0x00000216,0x000200f9, + 0x00000204,0x000200f8,0x00000204,0x0004003d,0x0000005d,0x00000219,0x00000073,0x0004003d, + 0x0000005d,0x0000021a,0x0000006f,0x00050094,0x0000005c,0x0000021b,0x00000219,0x0000021a, + 0x00050041,0x0000012e,0x0000021c,0x0000005f,0x0000000d,0x0004003d,0x0000005c,0x0000021d, + 0x0000021c,0x00050081,0x0000005c,0x0000021e,0x0000021d,0x0000021b,0x00050041,0x0000012e, + 0x0000021f,0x0000005f,0x0000000d,0x0003003e,0x0000021f,0x0000021e,0x0004003d,0x0000005d, + 0x00000220,0x0000007f,0x0004003d,0x0000005d,0x00000221,0x0000006f,0x00050094,0x0000005c, + 0x00000222,0x00000220,0x00000221,0x00050041,0x0000012e,0x00000223,0x00000062,0x0000000d, + 0x0004003d,0x0000005c,0x00000224,0x00000223,0x00050081,0x0000005c,0x00000225,0x00000224, + 0x00000222,0x00050041,0x0000012e,0x00000226,0x00000062,0x0000000d,0x0003003e,0x00000226, + 0x00000225,0x0004003d,0x0000005d,0x00000227,0x00000086,0x0004003d,0x0000005d,0x00000228, + 0x0000006f,0x00050094,0x0000005c,0x00000229,0x00000227,0x00000228,0x00050041,0x0000012e, + 0x0000022a,0x00000063,0x0000000d,0x0004003d,0x0000005c,0x0000022b,0x0000022a,0x00050081, + 0x0000005c,0x0000022c,0x0000022b,0x00000229,0x00050041,0x0000012e,0x0000022d,0x00000063, + 0x0000000d,0x0003003e,0x0000022d,0x0000022c,0x0004003d,0x0000005d,0x0000022e,0x0000008d, + 0x0004003d,0x0000005d,0x0000022f,0x0000006f,0x00050094,0x0000005c,0x00000230,0x0000022e, + 0x0000022f,0x00050041,0x0000012e,0x00000231,0x00000064,0x0000000d,0x0004003d,0x0000005c, + 0x00000232,0x00000231,0x00050081,0x0000005c,0x00000233,0x00000232,0x00000230,0x00050041, + 0x0000012e,0x00000234,0x00000064,0x0000000d,0x0003003e,0x00000234,0x00000233,0x0004003d, + 0x0000005d,0x00000235,0x00000094,0x0004003d,0x0000005d,0x00000236,0x0000006f,0x00050094, + 0x0000005c,0x00000237,0x00000235,0x00000236,0x00050041,0x0000012e,0x00000238,0x00000065, + 0x0000000d,0x0004003d,0x0000005c,0x00000239,0x00000238,0x00050081,0x0000005c,0x0000023a, + 0x00000239,0x00000237,0x00050041,0x0000012e,0x0000023b,0x00000065,0x0000000d,0x0003003e, + 0x0000023b,0x0000023a,0x0004003d,0x0000005d,0x0000023c,0x0000009b,0x0004003d,0x0000005d, + 0x0000023d,0x0000006f,0x00050094,0x0000005c,0x0000023e,0x0000023c,0x0000023d,0x00050041, + 0x0000012e,0x0000023f,0x00000066,0x0000000d,0x0004003d,0x0000005c,0x00000240,0x0000023f, + 0x00050081,0x0000005c,0x00000241,0x00000240,0x0000023e,0x00050041,0x0000012e,0x00000242, + 0x00000066,0x0000000d,0x0003003e,0x00000242,0x00000241,0x0004003d,0x0000005d,0x00000243, + 0x000000a2,0x0004003d,0x0000005d,0x00000244,0x0000006f,0x00050094,0x0000005c,0x00000245, + 0x00000243,0x00000244,0x00050041,0x0000012e,0x00000246,0x00000067,0x0000000d,0x0004003d, + 0x0000005c,0x00000247,0x00000246,0x00050081,0x0000005c,0x00000248,0x00000247,0x00000245, + 0x00050041,0x0000012e,0x00000249,0x00000067,0x0000000d,0x0003003e,0x00000249,0x00000248, + 0x0004003d,0x0000005d,0x0000024a,0x000000a9,0x0004003d,0x0000005d,0x0000024b,0x0000006f, + 0x00050094,0x0000005c,0x0000024c,0x0000024a,0x0000024b,0x00050041,0x0000012e,0x0000024d, + 0x00000068,0x0000000d,0x0004003d,0x0000005c,0x0000024e,0x0000024d,0x00050081,0x0000005c, + 0x0000024f,0x0000024e,0x0000024c,0x00050041,0x0000012e,0x00000250,0x00000068,0x0000000d, + 0x0003003e,0x00000250,0x0000024f,0x0004003d,0x00000006,0x00000251,0x00000020,0x00050080, + 0x00000006,0x00000252,0x00000251,0x000000b0,0x00050041,0x0000002a,0x00000253,0x00000028, + 0x000000b9,0x0004003d,0x00000006,0x00000254,0x00000253,0x0005008b,0x00000006,0x00000255, + 0x00000252,0x00000254,0x0003003e,0x000000b6,0x00000255,0x0004003d,0x00000006,0x00000256, + 0x00000020,0x00050080,0x00000006,0x00000257,0x00000256,0x000000b0,0x00050041,0x0000002a, + 0x00000258,0x00000028,0x000000b9,0x0004003d,0x00000006,0x00000259,0x00000258,0x00050087, + 0x00000006,0x0000025a,0x00000257,0x00000259,0x0003003e,0x000000bd,0x0000025a,0x0004003d, + 0x00000006,0x0000025b,0x000000bd,0x00050041,0x0000002a,0x0000025c,0x00000028,0x000000c5, + 0x0004003d,0x00000006,0x0000025d,0x0000025c,0x00050084,0x00000006,0x0000025e,0x0000025b, + 0x0000025d,0x00050041,0x0000002a,0x0000025f,0x00000028,0x0000001d,0x0004003d,0x00000006, + 0x00000260,0x0000025f,0x00050082,0x00000006,0x00000261,0x0000025e,0x00000260,0x0003003e, + 0x000000c3,0x00000261,0x0004003d,0x00000006,0x00000262,0x000000b6,0x00050041,0x0000002a, + 0x00000263,0x00000028,0x000000ce,0x0004003d,0x00000006,0x00000264,0x00000263,0x00050084, + 0x00000006,0x00000265,0x00000262,0x00000264,0x00050041,0x0000002a,0x00000266,0x00000028, + 0x000000d2,0x0004003d,0x00000006,0x00000267,0x00000266,0x00050082,0x00000006,0x00000268, + 0x00000265,0x00000267,0x0003003e,0x000000cc,0x00000268,0x0004003d,0x00000006,0x00000269, + 0x000000cc,0x0004003d,0x00000006,0x0000026a,0x00000069,0x00050084,0x00000006,0x0000026b, + 0x0000026a,0x00000021,0x00050080,0x00000006,0x0000026c,0x0000026b,0x0000006a,0x00050041, + 0x0000002a,0x0000026d,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000026e,0x0000026d, + 0x0005008b,0x00000006,0x0000026f,0x0000026c,0x0000026e,0x00050041,0x0000002a,0x00000270, + 0x00000028,0x000000df,0x0004003d,0x00000006,0x00000271,0x00000270,0x00050084,0x00000006, + 0x00000272,0x0000026f,0x00000271,0x00050080,0x00000006,0x00000273,0x00000269,0x00000272, + 0x0003003e,0x000000d6,0x00000273,0x0004003d,0x00000006,0x00000274,0x000000c3,0x0004003d, + 0x00000006,0x00000275,0x00000069,0x00050084,0x00000006,0x00000276,0x00000275,0x00000021, + 0x00050080,0x00000006,0x00000277,0x00000276,0x0000006a,0x00050041,0x0000002a,0x00000278, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x00000279,0x00000278,0x00050041,0x0000002a, + 0x0000027a,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000027b,0x0000027a,0x00050084, + 0x00000006,0x0000027c,0x00000279,0x0000027b,0x0005008b,0x00000006,0x0000027d,0x00000277, + 0x0000027c,0x00050041,0x0000002a,0x0000027e,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x0000027f,0x0000027e,0x00050087,0x00000006,0x00000280,0x0000027d,0x0000027f,0x00050041, + 0x0000002a,0x00000281,0x00000028,0x000000f3,0x0004003d,0x00000006,0x00000282,0x00000281, + 0x00050084,0x00000006,0x00000283,0x00000280,0x00000282,0x00050080,0x00000006,0x00000284, + 0x00000274,0x00000283,0x0003003e,0x000000e4,0x00000284,0x0004003d,0x00000006,0x00000285, + 0x00000069,0x00050084,0x00000006,0x00000286,0x00000285,0x00000021,0x00050080,0x00000006, + 0x00000287,0x00000286,0x0000006a,0x00050041,0x0000002a,0x00000288,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x00000289,0x00000288,0x00050041,0x0000002a,0x0000028a,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x0000028b,0x0000028a,0x00050084,0x00000006,0x0000028c, + 0x00000289,0x0000028b,0x00050087,0x00000006,0x0000028d,0x00000287,0x0000028c,0x0003003e, + 0x000000f8,0x0000028d,0x0004003d,0x00000006,0x0000028e,0x000000e4,0x000500af,0x00000040, + 0x0000028f,0x0000028e,0x0000006a,0x000300f7,0x00000291,0x00000000,0x000400fa,0x0000028f, + 0x00000290,0x00000291,0x000200f8,0x00000290,0x0004003d,0x00000006,0x00000292,0x000000e4, + 0x00050041,0x0000002a,0x00000293,0x00000028,0x00000029,0x0004003d,0x00000006,0x00000294, + 0x00000293,0x000500b1,0x00000040,0x00000295,0x00000292,0x00000294,0x000200f9,0x00000291, + 0x000200f8,0x00000291,0x000700f5,0x00000040,0x00000296,0x0000028f,0x00000204,0x00000295, + 0x00000290,0x0004003d,0x00000006,0x00000297,0x000000d6,0x000500af,0x00000040,0x00000298, + 0x00000297,0x0000006a,0x000500a7,0x00000040,0x00000299,0x00000296,0x00000298,0x000300f7, + 0x0000029b,0x00000000,0x000400fa,0x00000299,0x0000029a,0x0000029b,0x000200f8,0x0000029a, + 0x0004003d,0x00000006,0x0000029c,0x000000d6,0x00050041,0x0000002a,0x0000029d,0x00000028, + 0x00000021,0x0004003d,0x00000006,0x0000029e,0x0000029d,0x000500b1,0x00000040,0x0000029f, + 0x0000029c,0x0000029e,0x000200f9,0x0000029b,0x000200f8,0x0000029b,0x000700f5,0x00000040, + 0x000002a0,0x00000299,0x00000291,0x0000029f,0x0000029a,0x000300f7,0x000002a2,0x00000000, + 0x000400fa,0x000002a0,0x000002a1,0x000002a2,0x000200f8,0x000002a1,0x0004003d,0x00000006, + 0x000002a3,0x00000024,0x0004003d,0x00000006,0x000002a4,0x000000f8,0x00050041,0x0000002a, + 0x000002a5,0x00000028,0x00000029,0x0004003d,0x00000006,0x000002a6,0x000002a5,0x00050041, + 0x0000002a,0x000002a7,0x00000028,0x00000021,0x0004003d,0x00000006,0x000002a8,0x000002a7, + 0x00050084,0x00000006,0x000002a9,0x000002a6,0x000002a8,0x00050084,0x00000006,0x000002aa, + 0x000002a4,0x000002a9,0x00050080,0x00000006,0x000002ab,0x000002a3,0x000002aa,0x0004003d, + 0x00000006,0x000002ac,0x000000e4,0x00050041,0x0000002a,0x000002ad,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x000002ae,0x000002ad,0x00050084,0x00000006,0x000002af,0x000002ac, + 0x000002ae,0x00050080,0x00000006,0x000002b0,0x000002ab,0x000002af,0x0004003d,0x00000006, + 0x000002b1,0x000000d6,0x00050080,0x00000006,0x000002b2,0x000002b0,0x000002b1,0x00060041, + 0x0000012b,0x000002b3,0x0000011a,0x0000006a,0x000002b2,0x0004003d,0x0000005c,0x000002b4, + 0x000002b3,0x00050041,0x0000012e,0x000002b5,0x00000070,0x0000000d,0x0003003e,0x000002b5, + 0x000002b4,0x000200f9,0x000002a2,0x000200f8,0x000002a2,0x0004003d,0x00000006,0x000002b6, + 0x000000cc,0x0004003d,0x00000006,0x000002b7,0x00000069,0x00050084,0x00000006,0x000002b8, + 0x000002b7,0x00000021,0x00050080,0x00000006,0x000002b9,0x000002b8,0x000000b0,0x00050041, + 0x0000002a,0x000002ba,0x00000028,0x000000db,0x0004003d,0x00000006,0x000002bb,0x000002ba, + 0x0005008b,0x00000006,0x000002bc,0x000002b9,0x000002bb,0x00050041,0x0000002a,0x000002bd, + 0x00000028,0x000000df,0x0004003d,0x00000006,0x000002be,0x000002bd,0x00050084,0x00000006, + 0x000002bf,0x000002bc,0x000002be,0x00050080,0x00000006,0x000002c0,0x000002b6,0x000002bf, + 0x0003003e,0x000000d6,0x000002c0,0x0004003d,0x00000006,0x000002c1,0x000000c3,0x0004003d, + 0x00000006,0x000002c2,0x00000069,0x00050084,0x00000006,0x000002c3,0x000002c2,0x00000021, + 0x00050080,0x00000006,0x000002c4,0x000002c3,0x000000b0,0x00050041,0x0000002a,0x000002c5, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x000002c6,0x000002c5,0x00050041,0x0000002a, + 0x000002c7,0x00000028,0x000000db,0x0004003d,0x00000006,0x000002c8,0x000002c7,0x00050084, + 0x00000006,0x000002c9,0x000002c6,0x000002c8,0x0005008b,0x00000006,0x000002ca,0x000002c4, + 0x000002c9,0x00050041,0x0000002a,0x000002cb,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x000002cc,0x000002cb,0x00050087,0x00000006,0x000002cd,0x000002ca,0x000002cc,0x00050041, + 0x0000002a,0x000002ce,0x00000028,0x000000f3,0x0004003d,0x00000006,0x000002cf,0x000002ce, + 0x00050084,0x00000006,0x000002d0,0x000002cd,0x000002cf,0x00050080,0x00000006,0x000002d1, + 0x000002c1,0x000002d0,0x0003003e,0x000000e4,0x000002d1,0x0004003d,0x00000006,0x000002d2, + 0x00000069,0x00050084,0x00000006,0x000002d3,0x000002d2,0x00000021,0x00050080,0x00000006, + 0x000002d4,0x000002d3,0x000000b0,0x00050041,0x0000002a,0x000002d5,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x000002d6,0x000002d5,0x00050041,0x0000002a,0x000002d7,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x000002d8,0x000002d7,0x00050084,0x00000006,0x000002d9, + 0x000002d6,0x000002d8,0x00050087,0x00000006,0x000002da,0x000002d4,0x000002d9,0x0003003e, + 0x000000f8,0x000002da,0x0004003d,0x00000006,0x000002db,0x000000e4,0x000500af,0x00000040, + 0x000002dc,0x000002db,0x0000006a,0x000300f7,0x000002de,0x00000000,0x000400fa,0x000002dc, + 0x000002dd,0x000002de,0x000200f8,0x000002dd,0x0004003d,0x00000006,0x000002df,0x000000e4, + 0x00050041,0x0000002a,0x000002e0,0x00000028,0x00000029,0x0004003d,0x00000006,0x000002e1, + 0x000002e0,0x000500b1,0x00000040,0x000002e2,0x000002df,0x000002e1,0x000200f9,0x000002de, + 0x000200f8,0x000002de,0x000700f5,0x00000040,0x000002e3,0x000002dc,0x000002a2,0x000002e2, + 0x000002dd,0x0004003d,0x00000006,0x000002e4,0x000000d6,0x000500af,0x00000040,0x000002e5, + 0x000002e4,0x0000006a,0x000500a7,0x00000040,0x000002e6,0x000002e3,0x000002e5,0x000300f7, + 0x000002e8,0x00000000,0x000400fa,0x000002e6,0x000002e7,0x000002e8,0x000200f8,0x000002e7, + 0x0004003d,0x00000006,0x000002e9,0x000000d6,0x00050041,0x0000002a,0x000002ea,0x00000028, + 0x00000021,0x0004003d,0x00000006,0x000002eb,0x000002ea,0x000500b1,0x00000040,0x000002ec, + 0x000002e9,0x000002eb,0x000200f9,0x000002e8,0x000200f8,0x000002e8,0x000700f5,0x00000040, + 0x000002ed,0x000002e6,0x000002de,0x000002ec,0x000002e7,0x000300f7,0x000002ef,0x00000000, + 0x000400fa,0x000002ed,0x000002ee,0x000002ef,0x000200f8,0x000002ee,0x0004003d,0x00000006, + 0x000002f0,0x00000024,0x0004003d,0x00000006,0x000002f1,0x000000f8,0x00050041,0x0000002a, + 0x000002f2,0x00000028,0x00000029,0x0004003d,0x00000006,0x000002f3,0x000002f2,0x00050041, + 0x0000002a,0x000002f4,0x00000028,0x00000021,0x0004003d,0x00000006,0x000002f5,0x000002f4, + 0x00050084,0x00000006,0x000002f6,0x000002f3,0x000002f5,0x00050084,0x00000006,0x000002f7, + 0x000002f1,0x000002f6,0x00050080,0x00000006,0x000002f8,0x000002f0,0x000002f7,0x0004003d, + 0x00000006,0x000002f9,0x000000e4,0x00050041,0x0000002a,0x000002fa,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x000002fb,0x000002fa,0x00050084,0x00000006,0x000002fc,0x000002f9, + 0x000002fb,0x00050080,0x00000006,0x000002fd,0x000002f8,0x000002fc,0x0004003d,0x00000006, + 0x000002fe,0x000000d6,0x00050080,0x00000006,0x000002ff,0x000002fd,0x000002fe,0x00060041, + 0x0000012b,0x00000300,0x0000011a,0x0000006a,0x000002ff,0x0004003d,0x0000005c,0x00000301, + 0x00000300,0x00050041,0x0000012e,0x00000302,0x00000070,0x00000013,0x0003003e,0x00000302, + 0x00000301,0x000200f9,0x000002ef,0x000200f8,0x000002ef,0x0004003d,0x00000006,0x00000303, + 0x000000cc,0x0004003d,0x00000006,0x00000304,0x00000069,0x00050084,0x00000006,0x00000305, + 0x00000304,0x00000021,0x00050080,0x00000006,0x00000306,0x00000305,0x00000180,0x00050041, + 0x0000002a,0x00000307,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000308,0x00000307, + 0x0005008b,0x00000006,0x00000309,0x00000306,0x00000308,0x00050041,0x0000002a,0x0000030a, + 0x00000028,0x000000df,0x0004003d,0x00000006,0x0000030b,0x0000030a,0x00050084,0x00000006, + 0x0000030c,0x00000309,0x0000030b,0x00050080,0x00000006,0x0000030d,0x00000303,0x0000030c, + 0x0003003e,0x000000d6,0x0000030d,0x0004003d,0x00000006,0x0000030e,0x000000c3,0x0004003d, + 0x00000006,0x0000030f,0x00000069,0x00050084,0x00000006,0x00000310,0x0000030f,0x00000021, + 0x00050080,0x00000006,0x00000311,0x00000310,0x00000180,0x00050041,0x0000002a,0x00000312, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x00000313,0x00000312,0x00050041,0x0000002a, + 0x00000314,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000315,0x00000314,0x00050084, + 0x00000006,0x00000316,0x00000313,0x00000315,0x0005008b,0x00000006,0x00000317,0x00000311, + 0x00000316,0x00050041,0x0000002a,0x00000318,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x00000319,0x00000318,0x00050087,0x00000006,0x0000031a,0x00000317,0x00000319,0x00050041, + 0x0000002a,0x0000031b,0x00000028,0x000000f3,0x0004003d,0x00000006,0x0000031c,0x0000031b, + 0x00050084,0x00000006,0x0000031d,0x0000031a,0x0000031c,0x00050080,0x00000006,0x0000031e, + 0x0000030e,0x0000031d,0x0003003e,0x000000e4,0x0000031e,0x0004003d,0x00000006,0x0000031f, + 0x00000069,0x00050084,0x00000006,0x00000320,0x0000031f,0x00000021,0x00050080,0x00000006, + 0x00000321,0x00000320,0x00000180,0x00050041,0x0000002a,0x00000322,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x00000323,0x00000322,0x00050041,0x0000002a,0x00000324,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x00000325,0x00000324,0x00050084,0x00000006,0x00000326, + 0x00000323,0x00000325,0x00050087,0x00000006,0x00000327,0x00000321,0x00000326,0x0003003e, + 0x000000f8,0x00000327,0x0004003d,0x00000006,0x00000328,0x000000e4,0x000500af,0x00000040, + 0x00000329,0x00000328,0x0000006a,0x000300f7,0x0000032b,0x00000000,0x000400fa,0x00000329, + 0x0000032a,0x0000032b,0x000200f8,0x0000032a,0x0004003d,0x00000006,0x0000032c,0x000000e4, + 0x00050041,0x0000002a,0x0000032d,0x00000028,0x00000029,0x0004003d,0x00000006,0x0000032e, + 0x0000032d,0x000500b1,0x00000040,0x0000032f,0x0000032c,0x0000032e,0x000200f9,0x0000032b, + 0x000200f8,0x0000032b,0x000700f5,0x00000040,0x00000330,0x00000329,0x000002ef,0x0000032f, + 0x0000032a,0x0004003d,0x00000006,0x00000331,0x000000d6,0x000500af,0x00000040,0x00000332, + 0x00000331,0x0000006a,0x000500a7,0x00000040,0x00000333,0x00000330,0x00000332,0x000300f7, + 0x00000335,0x00000000,0x000400fa,0x00000333,0x00000334,0x00000335,0x000200f8,0x00000334, + 0x0004003d,0x00000006,0x00000336,0x000000d6,0x00050041,0x0000002a,0x00000337,0x00000028, + 0x00000021,0x0004003d,0x00000006,0x00000338,0x00000337,0x000500b1,0x00000040,0x00000339, + 0x00000336,0x00000338,0x000200f9,0x00000335,0x000200f8,0x00000335,0x000700f5,0x00000040, + 0x0000033a,0x00000333,0x0000032b,0x00000339,0x00000334,0x000300f7,0x0000033c,0x00000000, + 0x000400fa,0x0000033a,0x0000033b,0x0000033c,0x000200f8,0x0000033b,0x0004003d,0x00000006, + 0x0000033d,0x00000024,0x0004003d,0x00000006,0x0000033e,0x000000f8,0x00050041,0x0000002a, + 0x0000033f,0x00000028,0x00000029,0x0004003d,0x00000006,0x00000340,0x0000033f,0x00050041, + 0x0000002a,0x00000341,0x00000028,0x00000021,0x0004003d,0x00000006,0x00000342,0x00000341, + 0x00050084,0x00000006,0x00000343,0x00000340,0x00000342,0x00050084,0x00000006,0x00000344, + 0x0000033e,0x00000343,0x00050080,0x00000006,0x00000345,0x0000033d,0x00000344,0x0004003d, + 0x00000006,0x00000346,0x000000e4,0x00050041,0x0000002a,0x00000347,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x00000348,0x00000347,0x00050084,0x00000006,0x00000349,0x00000346, + 0x00000348,0x00050080,0x00000006,0x0000034a,0x00000345,0x00000349,0x0004003d,0x00000006, + 0x0000034b,0x000000d6,0x00050080,0x00000006,0x0000034c,0x0000034a,0x0000034b,0x00060041, + 0x0000012b,0x0000034d,0x0000011a,0x0000006a,0x0000034c,0x0004003d,0x0000005c,0x0000034e, + 0x0000034d,0x00050041,0x0000012e,0x0000034f,0x00000070,0x00000018,0x0003003e,0x0000034f, + 0x0000034e,0x000200f9,0x0000033c,0x000200f8,0x0000033c,0x0004003d,0x00000006,0x00000350, + 0x000000cc,0x0004003d,0x00000006,0x00000351,0x00000069,0x00050084,0x00000006,0x00000352, + 0x00000351,0x00000021,0x00050080,0x00000006,0x00000353,0x00000352,0x00000029,0x00050041, + 0x0000002a,0x00000354,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000355,0x00000354, + 0x0005008b,0x00000006,0x00000356,0x00000353,0x00000355,0x00050041,0x0000002a,0x00000357, + 0x00000028,0x000000df,0x0004003d,0x00000006,0x00000358,0x00000357,0x00050084,0x00000006, + 0x00000359,0x00000356,0x00000358,0x00050080,0x00000006,0x0000035a,0x00000350,0x00000359, + 0x0003003e,0x000000d6,0x0000035a,0x0004003d,0x00000006,0x0000035b,0x000000c3,0x0004003d, + 0x00000006,0x0000035c,0x00000069,0x00050084,0x00000006,0x0000035d,0x0000035c,0x00000021, + 0x00050080,0x00000006,0x0000035e,0x0000035d,0x00000029,0x00050041,0x0000002a,0x0000035f, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x00000360,0x0000035f,0x00050041,0x0000002a, + 0x00000361,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000362,0x00000361,0x00050084, + 0x00000006,0x00000363,0x00000360,0x00000362,0x0005008b,0x00000006,0x00000364,0x0000035e, + 0x00000363,0x00050041,0x0000002a,0x00000365,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x00000366,0x00000365,0x00050087,0x00000006,0x00000367,0x00000364,0x00000366,0x00050041, + 0x0000002a,0x00000368,0x00000028,0x000000f3,0x0004003d,0x00000006,0x00000369,0x00000368, + 0x00050084,0x00000006,0x0000036a,0x00000367,0x00000369,0x00050080,0x00000006,0x0000036b, + 0x0000035b,0x0000036a,0x0003003e,0x000000e4,0x0000036b,0x0004003d,0x00000006,0x0000036c, + 0x00000069,0x00050084,0x00000006,0x0000036d,0x0000036c,0x00000021,0x00050080,0x00000006, + 0x0000036e,0x0000036d,0x00000029,0x00050041,0x0000002a,0x0000036f,0x00000028,0x000000e9, + 0x0004003d,0x00000006,0x00000370,0x0000036f,0x00050041,0x0000002a,0x00000371,0x00000028, + 0x000000db,0x0004003d,0x00000006,0x00000372,0x00000371,0x00050084,0x00000006,0x00000373, + 0x00000370,0x00000372,0x00050087,0x00000006,0x00000374,0x0000036e,0x00000373,0x0003003e, + 0x000000f8,0x00000374,0x0004003d,0x00000006,0x00000375,0x000000e4,0x000500af,0x00000040, + 0x00000376,0x00000375,0x0000006a,0x000300f7,0x00000378,0x00000000,0x000400fa,0x00000376, + 0x00000377,0x00000378,0x000200f8,0x00000377,0x0004003d,0x00000006,0x00000379,0x000000e4, + 0x00050041,0x0000002a,0x0000037a,0x00000028,0x00000029,0x0004003d,0x00000006,0x0000037b, + 0x0000037a,0x000500b1,0x00000040,0x0000037c,0x00000379,0x0000037b,0x000200f9,0x00000378, + 0x000200f8,0x00000378,0x000700f5,0x00000040,0x0000037d,0x00000376,0x0000033c,0x0000037c, + 0x00000377,0x0004003d,0x00000006,0x0000037e,0x000000d6,0x000500af,0x00000040,0x0000037f, + 0x0000037e,0x0000006a,0x000500a7,0x00000040,0x00000380,0x0000037d,0x0000037f,0x000300f7, + 0x00000382,0x00000000,0x000400fa,0x00000380,0x00000381,0x00000382,0x000200f8,0x00000381, + 0x0004003d,0x00000006,0x00000383,0x000000d6,0x00050041,0x0000002a,0x00000384,0x00000028, + 0x00000021,0x0004003d,0x00000006,0x00000385,0x00000384,0x000500b1,0x00000040,0x00000386, + 0x00000383,0x00000385,0x000200f9,0x00000382,0x000200f8,0x00000382,0x000700f5,0x00000040, + 0x00000387,0x00000380,0x00000378,0x00000386,0x00000381,0x000300f7,0x00000389,0x00000000, + 0x000400fa,0x00000387,0x00000388,0x00000389,0x000200f8,0x00000388,0x0004003d,0x00000006, + 0x0000038a,0x00000024,0x0004003d,0x00000006,0x0000038b,0x000000f8,0x00050041,0x0000002a, + 0x0000038c,0x00000028,0x00000029,0x0004003d,0x00000006,0x0000038d,0x0000038c,0x00050041, + 0x0000002a,0x0000038e,0x00000028,0x00000021,0x0004003d,0x00000006,0x0000038f,0x0000038e, + 0x00050084,0x00000006,0x00000390,0x0000038d,0x0000038f,0x00050084,0x00000006,0x00000391, + 0x0000038b,0x00000390,0x00050080,0x00000006,0x00000392,0x0000038a,0x00000391,0x0004003d, + 0x00000006,0x00000393,0x000000e4,0x00050041,0x0000002a,0x00000394,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x00000395,0x00000394,0x00050084,0x00000006,0x00000396,0x00000393, + 0x00000395,0x00050080,0x00000006,0x00000397,0x00000392,0x00000396,0x0004003d,0x00000006, + 0x00000398,0x000000d6,0x00050080,0x00000006,0x00000399,0x00000397,0x00000398,0x00060041, + 0x0000012b,0x0000039a,0x0000011a,0x0000006a,0x00000399,0x0004003d,0x0000005c,0x0000039b, + 0x0000039a,0x00050041,0x0000012e,0x0000039c,0x00000070,0x00000217,0x0003003e,0x0000039c, + 0x0000039b,0x000200f9,0x00000389,0x000200f8,0x00000389,0x0004003d,0x0000005d,0x0000039d, + 0x00000073,0x0004003d,0x0000005d,0x0000039e,0x00000070,0x00050094,0x0000005c,0x0000039f, + 0x0000039d,0x0000039e,0x00050041,0x0000012e,0x000003a0,0x0000005f,0x00000013,0x0004003d, + 0x0000005c,0x000003a1,0x000003a0,0x00050081,0x0000005c,0x000003a2,0x000003a1,0x0000039f, + 0x00050041,0x0000012e,0x000003a3,0x0000005f,0x00000013,0x0003003e,0x000003a3,0x000003a2, + 0x0004003d,0x0000005d,0x000003a4,0x0000007f,0x0004003d,0x0000005d,0x000003a5,0x00000070, + 0x00050094,0x0000005c,0x000003a6,0x000003a4,0x000003a5,0x00050041,0x0000012e,0x000003a7, + 0x00000062,0x00000013,0x0004003d,0x0000005c,0x000003a8,0x000003a7,0x00050081,0x0000005c, + 0x000003a9,0x000003a8,0x000003a6,0x00050041,0x0000012e,0x000003aa,0x00000062,0x00000013, + 0x0003003e,0x000003aa,0x000003a9,0x0004003d,0x0000005d,0x000003ab,0x00000086,0x0004003d, + 0x0000005d,0x000003ac,0x00000070,0x00050094,0x0000005c,0x000003ad,0x000003ab,0x000003ac, + 0x00050041,0x0000012e,0x000003ae,0x00000063,0x00000013,0x0004003d,0x0000005c,0x000003af, + 0x000003ae,0x00050081,0x0000005c,0x000003b0,0x000003af,0x000003ad,0x00050041,0x0000012e, + 0x000003b1,0x00000063,0x00000013,0x0003003e,0x000003b1,0x000003b0,0x0004003d,0x0000005d, + 0x000003b2,0x0000008d,0x0004003d,0x0000005d,0x000003b3,0x00000070,0x00050094,0x0000005c, + 0x000003b4,0x000003b2,0x000003b3,0x00050041,0x0000012e,0x000003b5,0x00000064,0x00000013, + 0x0004003d,0x0000005c,0x000003b6,0x000003b5,0x00050081,0x0000005c,0x000003b7,0x000003b6, + 0x000003b4,0x00050041,0x0000012e,0x000003b8,0x00000064,0x00000013,0x0003003e,0x000003b8, + 0x000003b7,0x0004003d,0x0000005d,0x000003b9,0x00000094,0x0004003d,0x0000005d,0x000003ba, + 0x00000070,0x00050094,0x0000005c,0x000003bb,0x000003b9,0x000003ba,0x00050041,0x0000012e, + 0x000003bc,0x00000065,0x00000013,0x0004003d,0x0000005c,0x000003bd,0x000003bc,0x00050081, + 0x0000005c,0x000003be,0x000003bd,0x000003bb,0x00050041,0x0000012e,0x000003bf,0x00000065, + 0x00000013,0x0003003e,0x000003bf,0x000003be,0x0004003d,0x0000005d,0x000003c0,0x0000009b, + 0x0004003d,0x0000005d,0x000003c1,0x00000070,0x00050094,0x0000005c,0x000003c2,0x000003c0, + 0x000003c1,0x00050041,0x0000012e,0x000003c3,0x00000066,0x00000013,0x0004003d,0x0000005c, + 0x000003c4,0x000003c3,0x00050081,0x0000005c,0x000003c5,0x000003c4,0x000003c2,0x00050041, + 0x0000012e,0x000003c6,0x00000066,0x00000013,0x0003003e,0x000003c6,0x000003c5,0x0004003d, + 0x0000005d,0x000003c7,0x000000a2,0x0004003d,0x0000005d,0x000003c8,0x00000070,0x00050094, + 0x0000005c,0x000003c9,0x000003c7,0x000003c8,0x00050041,0x0000012e,0x000003ca,0x00000067, + 0x00000013,0x0004003d,0x0000005c,0x000003cb,0x000003ca,0x00050081,0x0000005c,0x000003cc, + 0x000003cb,0x000003c9,0x00050041,0x0000012e,0x000003cd,0x00000067,0x00000013,0x0003003e, + 0x000003cd,0x000003cc,0x0004003d,0x0000005d,0x000003ce,0x000000a9,0x0004003d,0x0000005d, + 0x000003cf,0x00000070,0x00050094,0x0000005c,0x000003d0,0x000003ce,0x000003cf,0x00050041, + 0x0000012e,0x000003d1,0x00000068,0x00000013,0x0004003d,0x0000005c,0x000003d2,0x000003d1, + 0x00050081,0x0000005c,0x000003d3,0x000003d2,0x000003d0,0x00050041,0x0000012e,0x000003d4, + 0x00000068,0x00000013,0x0003003e,0x000003d4,0x000003d3,0x0004003d,0x00000006,0x000003d5, + 0x00000020,0x00050080,0x00000006,0x000003d6,0x000003d5,0x00000180,0x00050041,0x0000002a, + 0x000003d7,0x00000028,0x000000b9,0x0004003d,0x00000006,0x000003d8,0x000003d7,0x0005008b, + 0x00000006,0x000003d9,0x000003d6,0x000003d8,0x0003003e,0x000000b6,0x000003d9,0x0004003d, + 0x00000006,0x000003da,0x00000020,0x00050080,0x00000006,0x000003db,0x000003da,0x00000180, + 0x00050041,0x0000002a,0x000003dc,0x00000028,0x000000b9,0x0004003d,0x00000006,0x000003dd, + 0x000003dc,0x00050087,0x00000006,0x000003de,0x000003db,0x000003dd,0x0003003e,0x000000bd, + 0x000003de,0x0004003d,0x00000006,0x000003df,0x000000bd,0x00050041,0x0000002a,0x000003e0, + 0x00000028,0x000000c5,0x0004003d,0x00000006,0x000003e1,0x000003e0,0x00050084,0x00000006, + 0x000003e2,0x000003df,0x000003e1,0x00050041,0x0000002a,0x000003e3,0x00000028,0x0000001d, + 0x0004003d,0x00000006,0x000003e4,0x000003e3,0x00050082,0x00000006,0x000003e5,0x000003e2, + 0x000003e4,0x0003003e,0x000000c3,0x000003e5,0x0004003d,0x00000006,0x000003e6,0x000000b6, + 0x00050041,0x0000002a,0x000003e7,0x00000028,0x000000ce,0x0004003d,0x00000006,0x000003e8, + 0x000003e7,0x00050084,0x00000006,0x000003e9,0x000003e6,0x000003e8,0x00050041,0x0000002a, + 0x000003ea,0x00000028,0x000000d2,0x0004003d,0x00000006,0x000003eb,0x000003ea,0x00050082, + 0x00000006,0x000003ec,0x000003e9,0x000003eb,0x0003003e,0x000000cc,0x000003ec,0x0004003d, + 0x00000006,0x000003ed,0x000000cc,0x0004003d,0x00000006,0x000003ee,0x00000069,0x00050084, + 0x00000006,0x000003ef,0x000003ee,0x00000021,0x00050080,0x00000006,0x000003f0,0x000003ef, + 0x0000006a,0x00050041,0x0000002a,0x000003f1,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x000003f2,0x000003f1,0x0005008b,0x00000006,0x000003f3,0x000003f0,0x000003f2,0x00050041, + 0x0000002a,0x000003f4,0x00000028,0x000000df,0x0004003d,0x00000006,0x000003f5,0x000003f4, + 0x00050084,0x00000006,0x000003f6,0x000003f3,0x000003f5,0x00050080,0x00000006,0x000003f7, + 0x000003ed,0x000003f6,0x0003003e,0x000000d6,0x000003f7,0x0004003d,0x00000006,0x000003f8, + 0x000000c3,0x0004003d,0x00000006,0x000003f9,0x00000069,0x00050084,0x00000006,0x000003fa, + 0x000003f9,0x00000021,0x00050080,0x00000006,0x000003fb,0x000003fa,0x0000006a,0x00050041, + 0x0000002a,0x000003fc,0x00000028,0x000000e9,0x0004003d,0x00000006,0x000003fd,0x000003fc, + 0x00050041,0x0000002a,0x000003fe,0x00000028,0x000000db,0x0004003d,0x00000006,0x000003ff, + 0x000003fe,0x00050084,0x00000006,0x00000400,0x000003fd,0x000003ff,0x0005008b,0x00000006, + 0x00000401,0x000003fb,0x00000400,0x00050041,0x0000002a,0x00000402,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x00000403,0x00000402,0x00050087,0x00000006,0x00000404,0x00000401, + 0x00000403,0x00050041,0x0000002a,0x00000405,0x00000028,0x000000f3,0x0004003d,0x00000006, + 0x00000406,0x00000405,0x00050084,0x00000006,0x00000407,0x00000404,0x00000406,0x00050080, + 0x00000006,0x00000408,0x000003f8,0x00000407,0x0003003e,0x000000e4,0x00000408,0x0004003d, + 0x00000006,0x00000409,0x00000069,0x00050084,0x00000006,0x0000040a,0x00000409,0x00000021, + 0x00050080,0x00000006,0x0000040b,0x0000040a,0x0000006a,0x00050041,0x0000002a,0x0000040c, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x0000040d,0x0000040c,0x00050041,0x0000002a, + 0x0000040e,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000040f,0x0000040e,0x00050084, + 0x00000006,0x00000410,0x0000040d,0x0000040f,0x00050087,0x00000006,0x00000411,0x0000040b, + 0x00000410,0x0003003e,0x000000f8,0x00000411,0x0004003d,0x00000006,0x00000412,0x000000e4, + 0x000500af,0x00000040,0x00000413,0x00000412,0x0000006a,0x000300f7,0x00000415,0x00000000, + 0x000400fa,0x00000413,0x00000414,0x00000415,0x000200f8,0x00000414,0x0004003d,0x00000006, + 0x00000416,0x000000e4,0x00050041,0x0000002a,0x00000417,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x00000418,0x00000417,0x000500b1,0x00000040,0x00000419,0x00000416,0x00000418, + 0x000200f9,0x00000415,0x000200f8,0x00000415,0x000700f5,0x00000040,0x0000041a,0x00000413, + 0x00000389,0x00000419,0x00000414,0x0004003d,0x00000006,0x0000041b,0x000000d6,0x000500af, + 0x00000040,0x0000041c,0x0000041b,0x0000006a,0x000500a7,0x00000040,0x0000041d,0x0000041a, + 0x0000041c,0x000300f7,0x0000041f,0x00000000,0x000400fa,0x0000041d,0x0000041e,0x0000041f, + 0x000200f8,0x0000041e,0x0004003d,0x00000006,0x00000420,0x000000d6,0x00050041,0x0000002a, + 0x00000421,0x00000028,0x00000021,0x0004003d,0x00000006,0x00000422,0x00000421,0x000500b1, + 0x00000040,0x00000423,0x00000420,0x00000422,0x000200f9,0x0000041f,0x000200f8,0x0000041f, + 0x000700f5,0x00000040,0x00000424,0x0000041d,0x00000415,0x00000423,0x0000041e,0x000300f7, + 0x00000426,0x00000000,0x000400fa,0x00000424,0x00000425,0x00000426,0x000200f8,0x00000425, + 0x0004003d,0x00000006,0x00000427,0x00000024,0x0004003d,0x00000006,0x00000428,0x000000f8, + 0x00050041,0x0000002a,0x00000429,0x00000028,0x00000029,0x0004003d,0x00000006,0x0000042a, + 0x00000429,0x00050041,0x0000002a,0x0000042b,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x0000042c,0x0000042b,0x00050084,0x00000006,0x0000042d,0x0000042a,0x0000042c,0x00050084, + 0x00000006,0x0000042e,0x00000428,0x0000042d,0x00050080,0x00000006,0x0000042f,0x00000427, + 0x0000042e,0x0004003d,0x00000006,0x00000430,0x000000e4,0x00050041,0x0000002a,0x00000431, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x00000432,0x00000431,0x00050084,0x00000006, + 0x00000433,0x00000430,0x00000432,0x00050080,0x00000006,0x00000434,0x0000042f,0x00000433, + 0x0004003d,0x00000006,0x00000435,0x000000d6,0x00050080,0x00000006,0x00000436,0x00000434, + 0x00000435,0x00060041,0x0000012b,0x00000437,0x0000011a,0x0000006a,0x00000436,0x0004003d, + 0x0000005c,0x00000438,0x00000437,0x00050041,0x0000012e,0x00000439,0x00000071,0x0000000d, + 0x0003003e,0x00000439,0x00000438,0x000200f9,0x00000426,0x000200f8,0x00000426,0x0004003d, + 0x00000006,0x0000043a,0x000000cc,0x0004003d,0x00000006,0x0000043b,0x00000069,0x00050084, + 0x00000006,0x0000043c,0x0000043b,0x00000021,0x00050080,0x00000006,0x0000043d,0x0000043c, + 0x000000b0,0x00050041,0x0000002a,0x0000043e,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x0000043f,0x0000043e,0x0005008b,0x00000006,0x00000440,0x0000043d,0x0000043f,0x00050041, + 0x0000002a,0x00000441,0x00000028,0x000000df,0x0004003d,0x00000006,0x00000442,0x00000441, + 0x00050084,0x00000006,0x00000443,0x00000440,0x00000442,0x00050080,0x00000006,0x00000444, + 0x0000043a,0x00000443,0x0003003e,0x000000d6,0x00000444,0x0004003d,0x00000006,0x00000445, + 0x000000c3,0x0004003d,0x00000006,0x00000446,0x00000069,0x00050084,0x00000006,0x00000447, + 0x00000446,0x00000021,0x00050080,0x00000006,0x00000448,0x00000447,0x000000b0,0x00050041, + 0x0000002a,0x00000449,0x00000028,0x000000e9,0x0004003d,0x00000006,0x0000044a,0x00000449, + 0x00050041,0x0000002a,0x0000044b,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000044c, + 0x0000044b,0x00050084,0x00000006,0x0000044d,0x0000044a,0x0000044c,0x0005008b,0x00000006, + 0x0000044e,0x00000448,0x0000044d,0x00050041,0x0000002a,0x0000044f,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x00000450,0x0000044f,0x00050087,0x00000006,0x00000451,0x0000044e, + 0x00000450,0x00050041,0x0000002a,0x00000452,0x00000028,0x000000f3,0x0004003d,0x00000006, + 0x00000453,0x00000452,0x00050084,0x00000006,0x00000454,0x00000451,0x00000453,0x00050080, + 0x00000006,0x00000455,0x00000445,0x00000454,0x0003003e,0x000000e4,0x00000455,0x0004003d, + 0x00000006,0x00000456,0x00000069,0x00050084,0x00000006,0x00000457,0x00000456,0x00000021, + 0x00050080,0x00000006,0x00000458,0x00000457,0x000000b0,0x00050041,0x0000002a,0x00000459, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x0000045a,0x00000459,0x00050041,0x0000002a, + 0x0000045b,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000045c,0x0000045b,0x00050084, + 0x00000006,0x0000045d,0x0000045a,0x0000045c,0x00050087,0x00000006,0x0000045e,0x00000458, + 0x0000045d,0x0003003e,0x000000f8,0x0000045e,0x0004003d,0x00000006,0x0000045f,0x000000e4, + 0x000500af,0x00000040,0x00000460,0x0000045f,0x0000006a,0x000300f7,0x00000462,0x00000000, + 0x000400fa,0x00000460,0x00000461,0x00000462,0x000200f8,0x00000461,0x0004003d,0x00000006, + 0x00000463,0x000000e4,0x00050041,0x0000002a,0x00000464,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x00000465,0x00000464,0x000500b1,0x00000040,0x00000466,0x00000463,0x00000465, + 0x000200f9,0x00000462,0x000200f8,0x00000462,0x000700f5,0x00000040,0x00000467,0x00000460, + 0x00000426,0x00000466,0x00000461,0x0004003d,0x00000006,0x00000468,0x000000d6,0x000500af, + 0x00000040,0x00000469,0x00000468,0x0000006a,0x000500a7,0x00000040,0x0000046a,0x00000467, + 0x00000469,0x000300f7,0x0000046c,0x00000000,0x000400fa,0x0000046a,0x0000046b,0x0000046c, + 0x000200f8,0x0000046b,0x0004003d,0x00000006,0x0000046d,0x000000d6,0x00050041,0x0000002a, + 0x0000046e,0x00000028,0x00000021,0x0004003d,0x00000006,0x0000046f,0x0000046e,0x000500b1, + 0x00000040,0x00000470,0x0000046d,0x0000046f,0x000200f9,0x0000046c,0x000200f8,0x0000046c, + 0x000700f5,0x00000040,0x00000471,0x0000046a,0x00000462,0x00000470,0x0000046b,0x000300f7, + 0x00000473,0x00000000,0x000400fa,0x00000471,0x00000472,0x00000473,0x000200f8,0x00000472, + 0x0004003d,0x00000006,0x00000474,0x00000024,0x0004003d,0x00000006,0x00000475,0x000000f8, + 0x00050041,0x0000002a,0x00000476,0x00000028,0x00000029,0x0004003d,0x00000006,0x00000477, + 0x00000476,0x00050041,0x0000002a,0x00000478,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x00000479,0x00000478,0x00050084,0x00000006,0x0000047a,0x00000477,0x00000479,0x00050084, + 0x00000006,0x0000047b,0x00000475,0x0000047a,0x00050080,0x00000006,0x0000047c,0x00000474, + 0x0000047b,0x0004003d,0x00000006,0x0000047d,0x000000e4,0x00050041,0x0000002a,0x0000047e, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x0000047f,0x0000047e,0x00050084,0x00000006, + 0x00000480,0x0000047d,0x0000047f,0x00050080,0x00000006,0x00000481,0x0000047c,0x00000480, + 0x0004003d,0x00000006,0x00000482,0x000000d6,0x00050080,0x00000006,0x00000483,0x00000481, + 0x00000482,0x00060041,0x0000012b,0x00000484,0x0000011a,0x0000006a,0x00000483,0x0004003d, + 0x0000005c,0x00000485,0x00000484,0x00050041,0x0000012e,0x00000486,0x00000071,0x00000013, + 0x0003003e,0x00000486,0x00000485,0x000200f9,0x00000473,0x000200f8,0x00000473,0x0004003d, + 0x00000006,0x00000487,0x000000cc,0x0004003d,0x00000006,0x00000488,0x00000069,0x00050084, + 0x00000006,0x00000489,0x00000488,0x00000021,0x00050080,0x00000006,0x0000048a,0x00000489, + 0x00000180,0x00050041,0x0000002a,0x0000048b,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x0000048c,0x0000048b,0x0005008b,0x00000006,0x0000048d,0x0000048a,0x0000048c,0x00050041, + 0x0000002a,0x0000048e,0x00000028,0x000000df,0x0004003d,0x00000006,0x0000048f,0x0000048e, + 0x00050084,0x00000006,0x00000490,0x0000048d,0x0000048f,0x00050080,0x00000006,0x00000491, + 0x00000487,0x00000490,0x0003003e,0x000000d6,0x00000491,0x0004003d,0x00000006,0x00000492, + 0x000000c3,0x0004003d,0x00000006,0x00000493,0x00000069,0x00050084,0x00000006,0x00000494, + 0x00000493,0x00000021,0x00050080,0x00000006,0x00000495,0x00000494,0x00000180,0x00050041, + 0x0000002a,0x00000496,0x00000028,0x000000e9,0x0004003d,0x00000006,0x00000497,0x00000496, + 0x00050041,0x0000002a,0x00000498,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000499, + 0x00000498,0x00050084,0x00000006,0x0000049a,0x00000497,0x00000499,0x0005008b,0x00000006, + 0x0000049b,0x00000495,0x0000049a,0x00050041,0x0000002a,0x0000049c,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x0000049d,0x0000049c,0x00050087,0x00000006,0x0000049e,0x0000049b, + 0x0000049d,0x00050041,0x0000002a,0x0000049f,0x00000028,0x000000f3,0x0004003d,0x00000006, + 0x000004a0,0x0000049f,0x00050084,0x00000006,0x000004a1,0x0000049e,0x000004a0,0x00050080, + 0x00000006,0x000004a2,0x00000492,0x000004a1,0x0003003e,0x000000e4,0x000004a2,0x0004003d, + 0x00000006,0x000004a3,0x00000069,0x00050084,0x00000006,0x000004a4,0x000004a3,0x00000021, + 0x00050080,0x00000006,0x000004a5,0x000004a4,0x00000180,0x00050041,0x0000002a,0x000004a6, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x000004a7,0x000004a6,0x00050041,0x0000002a, + 0x000004a8,0x00000028,0x000000db,0x0004003d,0x00000006,0x000004a9,0x000004a8,0x00050084, + 0x00000006,0x000004aa,0x000004a7,0x000004a9,0x00050087,0x00000006,0x000004ab,0x000004a5, + 0x000004aa,0x0003003e,0x000000f8,0x000004ab,0x0004003d,0x00000006,0x000004ac,0x000000e4, + 0x000500af,0x00000040,0x000004ad,0x000004ac,0x0000006a,0x000300f7,0x000004af,0x00000000, + 0x000400fa,0x000004ad,0x000004ae,0x000004af,0x000200f8,0x000004ae,0x0004003d,0x00000006, + 0x000004b0,0x000000e4,0x00050041,0x0000002a,0x000004b1,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x000004b2,0x000004b1,0x000500b1,0x00000040,0x000004b3,0x000004b0,0x000004b2, + 0x000200f9,0x000004af,0x000200f8,0x000004af,0x000700f5,0x00000040,0x000004b4,0x000004ad, + 0x00000473,0x000004b3,0x000004ae,0x0004003d,0x00000006,0x000004b5,0x000000d6,0x000500af, + 0x00000040,0x000004b6,0x000004b5,0x0000006a,0x000500a7,0x00000040,0x000004b7,0x000004b4, + 0x000004b6,0x000300f7,0x000004b9,0x00000000,0x000400fa,0x000004b7,0x000004b8,0x000004b9, + 0x000200f8,0x000004b8,0x0004003d,0x00000006,0x000004ba,0x000000d6,0x00050041,0x0000002a, + 0x000004bb,0x00000028,0x00000021,0x0004003d,0x00000006,0x000004bc,0x000004bb,0x000500b1, + 0x00000040,0x000004bd,0x000004ba,0x000004bc,0x000200f9,0x000004b9,0x000200f8,0x000004b9, + 0x000700f5,0x00000040,0x000004be,0x000004b7,0x000004af,0x000004bd,0x000004b8,0x000300f7, + 0x000004c0,0x00000000,0x000400fa,0x000004be,0x000004bf,0x000004c0,0x000200f8,0x000004bf, + 0x0004003d,0x00000006,0x000004c1,0x00000024,0x0004003d,0x00000006,0x000004c2,0x000000f8, + 0x00050041,0x0000002a,0x000004c3,0x00000028,0x00000029,0x0004003d,0x00000006,0x000004c4, + 0x000004c3,0x00050041,0x0000002a,0x000004c5,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x000004c6,0x000004c5,0x00050084,0x00000006,0x000004c7,0x000004c4,0x000004c6,0x00050084, + 0x00000006,0x000004c8,0x000004c2,0x000004c7,0x00050080,0x00000006,0x000004c9,0x000004c1, + 0x000004c8,0x0004003d,0x00000006,0x000004ca,0x000000e4,0x00050041,0x0000002a,0x000004cb, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x000004cc,0x000004cb,0x00050084,0x00000006, + 0x000004cd,0x000004ca,0x000004cc,0x00050080,0x00000006,0x000004ce,0x000004c9,0x000004cd, + 0x0004003d,0x00000006,0x000004cf,0x000000d6,0x00050080,0x00000006,0x000004d0,0x000004ce, + 0x000004cf,0x00060041,0x0000012b,0x000004d1,0x0000011a,0x0000006a,0x000004d0,0x0004003d, + 0x0000005c,0x000004d2,0x000004d1,0x00050041,0x0000012e,0x000004d3,0x00000071,0x00000018, + 0x0003003e,0x000004d3,0x000004d2,0x000200f9,0x000004c0,0x000200f8,0x000004c0,0x0004003d, + 0x00000006,0x000004d4,0x000000cc,0x0004003d,0x00000006,0x000004d5,0x00000069,0x00050084, + 0x00000006,0x000004d6,0x000004d5,0x00000021,0x00050080,0x00000006,0x000004d7,0x000004d6, + 0x00000029,0x00050041,0x0000002a,0x000004d8,0x00000028,0x000000db,0x0004003d,0x00000006, + 0x000004d9,0x000004d8,0x0005008b,0x00000006,0x000004da,0x000004d7,0x000004d9,0x00050041, + 0x0000002a,0x000004db,0x00000028,0x000000df,0x0004003d,0x00000006,0x000004dc,0x000004db, + 0x00050084,0x00000006,0x000004dd,0x000004da,0x000004dc,0x00050080,0x00000006,0x000004de, + 0x000004d4,0x000004dd,0x0003003e,0x000000d6,0x000004de,0x0004003d,0x00000006,0x000004df, + 0x000000c3,0x0004003d,0x00000006,0x000004e0,0x00000069,0x00050084,0x00000006,0x000004e1, + 0x000004e0,0x00000021,0x00050080,0x00000006,0x000004e2,0x000004e1,0x00000029,0x00050041, + 0x0000002a,0x000004e3,0x00000028,0x000000e9,0x0004003d,0x00000006,0x000004e4,0x000004e3, + 0x00050041,0x0000002a,0x000004e5,0x00000028,0x000000db,0x0004003d,0x00000006,0x000004e6, + 0x000004e5,0x00050084,0x00000006,0x000004e7,0x000004e4,0x000004e6,0x0005008b,0x00000006, + 0x000004e8,0x000004e2,0x000004e7,0x00050041,0x0000002a,0x000004e9,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x000004ea,0x000004e9,0x00050087,0x00000006,0x000004eb,0x000004e8, + 0x000004ea,0x00050041,0x0000002a,0x000004ec,0x00000028,0x000000f3,0x0004003d,0x00000006, + 0x000004ed,0x000004ec,0x00050084,0x00000006,0x000004ee,0x000004eb,0x000004ed,0x00050080, + 0x00000006,0x000004ef,0x000004df,0x000004ee,0x0003003e,0x000000e4,0x000004ef,0x0004003d, + 0x00000006,0x000004f0,0x00000069,0x00050084,0x00000006,0x000004f1,0x000004f0,0x00000021, + 0x00050080,0x00000006,0x000004f2,0x000004f1,0x00000029,0x00050041,0x0000002a,0x000004f3, + 0x00000028,0x000000e9,0x0004003d,0x00000006,0x000004f4,0x000004f3,0x00050041,0x0000002a, + 0x000004f5,0x00000028,0x000000db,0x0004003d,0x00000006,0x000004f6,0x000004f5,0x00050084, + 0x00000006,0x000004f7,0x000004f4,0x000004f6,0x00050087,0x00000006,0x000004f8,0x000004f2, + 0x000004f7,0x0003003e,0x000000f8,0x000004f8,0x0004003d,0x00000006,0x000004f9,0x000000e4, + 0x000500af,0x00000040,0x000004fa,0x000004f9,0x0000006a,0x000300f7,0x000004fc,0x00000000, + 0x000400fa,0x000004fa,0x000004fb,0x000004fc,0x000200f8,0x000004fb,0x0004003d,0x00000006, + 0x000004fd,0x000000e4,0x00050041,0x0000002a,0x000004fe,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x000004ff,0x000004fe,0x000500b1,0x00000040,0x00000500,0x000004fd,0x000004ff, + 0x000200f9,0x000004fc,0x000200f8,0x000004fc,0x000700f5,0x00000040,0x00000501,0x000004fa, + 0x000004c0,0x00000500,0x000004fb,0x0004003d,0x00000006,0x00000502,0x000000d6,0x000500af, + 0x00000040,0x00000503,0x00000502,0x0000006a,0x000500a7,0x00000040,0x00000504,0x00000501, + 0x00000503,0x000300f7,0x00000506,0x00000000,0x000400fa,0x00000504,0x00000505,0x00000506, + 0x000200f8,0x00000505,0x0004003d,0x00000006,0x00000507,0x000000d6,0x00050041,0x0000002a, + 0x00000508,0x00000028,0x00000021,0x0004003d,0x00000006,0x00000509,0x00000508,0x000500b1, + 0x00000040,0x0000050a,0x00000507,0x00000509,0x000200f9,0x00000506,0x000200f8,0x00000506, + 0x000700f5,0x00000040,0x0000050b,0x00000504,0x000004fc,0x0000050a,0x00000505,0x000300f7, + 0x0000050d,0x00000000,0x000400fa,0x0000050b,0x0000050c,0x0000050d,0x000200f8,0x0000050c, + 0x0004003d,0x00000006,0x0000050e,0x00000024,0x0004003d,0x00000006,0x0000050f,0x000000f8, + 0x00050041,0x0000002a,0x00000510,0x00000028,0x00000029,0x0004003d,0x00000006,0x00000511, + 0x00000510,0x00050041,0x0000002a,0x00000512,0x00000028,0x00000021,0x0004003d,0x00000006, + 0x00000513,0x00000512,0x00050084,0x00000006,0x00000514,0x00000511,0x00000513,0x00050084, + 0x00000006,0x00000515,0x0000050f,0x00000514,0x00050080,0x00000006,0x00000516,0x0000050e, + 0x00000515,0x0004003d,0x00000006,0x00000517,0x000000e4,0x00050041,0x0000002a,0x00000518, + 0x00000028,0x00000021,0x0004003d,0x00000006,0x00000519,0x00000518,0x00050084,0x00000006, + 0x0000051a,0x00000517,0x00000519,0x00050080,0x00000006,0x0000051b,0x00000516,0x0000051a, + 0x0004003d,0x00000006,0x0000051c,0x000000d6,0x00050080,0x00000006,0x0000051d,0x0000051b, + 0x0000051c,0x00060041,0x0000012b,0x0000051e,0x0000011a,0x0000006a,0x0000051d,0x0004003d, + 0x0000005c,0x0000051f,0x0000051e,0x00050041,0x0000012e,0x00000520,0x00000071,0x00000217, + 0x0003003e,0x00000520,0x0000051f,0x000200f9,0x0000050d,0x000200f8,0x0000050d,0x0004003d, + 0x0000005d,0x00000521,0x00000073,0x0004003d,0x0000005d,0x00000522,0x00000071,0x00050094, + 0x0000005c,0x00000523,0x00000521,0x00000522,0x00050041,0x0000012e,0x00000524,0x0000005f, + 0x00000018,0x0004003d,0x0000005c,0x00000525,0x00000524,0x00050081,0x0000005c,0x00000526, + 0x00000525,0x00000523,0x00050041,0x0000012e,0x00000527,0x0000005f,0x00000018,0x0003003e, + 0x00000527,0x00000526,0x0004003d,0x0000005d,0x00000528,0x0000007f,0x0004003d,0x0000005d, + 0x00000529,0x00000071,0x00050094,0x0000005c,0x0000052a,0x00000528,0x00000529,0x00050041, + 0x0000012e,0x0000052b,0x00000062,0x00000018,0x0004003d,0x0000005c,0x0000052c,0x0000052b, + 0x00050081,0x0000005c,0x0000052d,0x0000052c,0x0000052a,0x00050041,0x0000012e,0x0000052e, + 0x00000062,0x00000018,0x0003003e,0x0000052e,0x0000052d,0x0004003d,0x0000005d,0x0000052f, + 0x00000086,0x0004003d,0x0000005d,0x00000530,0x00000071,0x00050094,0x0000005c,0x00000531, + 0x0000052f,0x00000530,0x00050041,0x0000012e,0x00000532,0x00000063,0x00000018,0x0004003d, + 0x0000005c,0x00000533,0x00000532,0x00050081,0x0000005c,0x00000534,0x00000533,0x00000531, + 0x00050041,0x0000012e,0x00000535,0x00000063,0x00000018,0x0003003e,0x00000535,0x00000534, + 0x0004003d,0x0000005d,0x00000536,0x0000008d,0x0004003d,0x0000005d,0x00000537,0x00000071, + 0x00050094,0x0000005c,0x00000538,0x00000536,0x00000537,0x00050041,0x0000012e,0x00000539, + 0x00000064,0x00000018,0x0004003d,0x0000005c,0x0000053a,0x00000539,0x00050081,0x0000005c, + 0x0000053b,0x0000053a,0x00000538,0x00050041,0x0000012e,0x0000053c,0x00000064,0x00000018, + 0x0003003e,0x0000053c,0x0000053b,0x0004003d,0x0000005d,0x0000053d,0x00000094,0x0004003d, + 0x0000005d,0x0000053e,0x00000071,0x00050094,0x0000005c,0x0000053f,0x0000053d,0x0000053e, + 0x00050041,0x0000012e,0x00000540,0x00000065,0x00000018,0x0004003d,0x0000005c,0x00000541, + 0x00000540,0x00050081,0x0000005c,0x00000542,0x00000541,0x0000053f,0x00050041,0x0000012e, + 0x00000543,0x00000065,0x00000018,0x0003003e,0x00000543,0x00000542,0x0004003d,0x0000005d, + 0x00000544,0x0000009b,0x0004003d,0x0000005d,0x00000545,0x00000071,0x00050094,0x0000005c, + 0x00000546,0x00000544,0x00000545,0x00050041,0x0000012e,0x00000547,0x00000066,0x00000018, + 0x0004003d,0x0000005c,0x00000548,0x00000547,0x00050081,0x0000005c,0x00000549,0x00000548, + 0x00000546,0x00050041,0x0000012e,0x0000054a,0x00000066,0x00000018,0x0003003e,0x0000054a, + 0x00000549,0x0004003d,0x0000005d,0x0000054b,0x000000a2,0x0004003d,0x0000005d,0x0000054c, + 0x00000071,0x00050094,0x0000005c,0x0000054d,0x0000054b,0x0000054c,0x00050041,0x0000012e, + 0x0000054e,0x00000067,0x00000018,0x0004003d,0x0000005c,0x0000054f,0x0000054e,0x00050081, + 0x0000005c,0x00000550,0x0000054f,0x0000054d,0x00050041,0x0000012e,0x00000551,0x00000067, + 0x00000018,0x0003003e,0x00000551,0x00000550,0x0004003d,0x0000005d,0x00000552,0x000000a9, + 0x0004003d,0x0000005d,0x00000553,0x00000071,0x00050094,0x0000005c,0x00000554,0x00000552, + 0x00000553,0x00050041,0x0000012e,0x00000555,0x00000068,0x00000018,0x0004003d,0x0000005c, + 0x00000556,0x00000555,0x00050081,0x0000005c,0x00000557,0x00000556,0x00000554,0x00050041, + 0x0000012e,0x00000558,0x00000068,0x00000018,0x0003003e,0x00000558,0x00000557,0x0004003d, + 0x00000006,0x00000559,0x00000020,0x00050080,0x00000006,0x0000055a,0x00000559,0x00000029, + 0x00050041,0x0000002a,0x0000055b,0x00000028,0x000000b9,0x0004003d,0x00000006,0x0000055c, + 0x0000055b,0x0005008b,0x00000006,0x0000055d,0x0000055a,0x0000055c,0x0003003e,0x000000b6, + 0x0000055d,0x0004003d,0x00000006,0x0000055e,0x00000020,0x00050080,0x00000006,0x0000055f, + 0x0000055e,0x00000029,0x00050041,0x0000002a,0x00000560,0x00000028,0x000000b9,0x0004003d, + 0x00000006,0x00000561,0x00000560,0x00050087,0x00000006,0x00000562,0x0000055f,0x00000561, + 0x0003003e,0x000000bd,0x00000562,0x0004003d,0x00000006,0x00000563,0x000000bd,0x00050041, + 0x0000002a,0x00000564,0x00000028,0x000000c5,0x0004003d,0x00000006,0x00000565,0x00000564, + 0x00050084,0x00000006,0x00000566,0x00000563,0x00000565,0x00050041,0x0000002a,0x00000567, + 0x00000028,0x0000001d,0x0004003d,0x00000006,0x00000568,0x00000567,0x00050082,0x00000006, + 0x00000569,0x00000566,0x00000568,0x0003003e,0x000000c3,0x00000569,0x0004003d,0x00000006, + 0x0000056a,0x000000b6,0x00050041,0x0000002a,0x0000056b,0x00000028,0x000000ce,0x0004003d, + 0x00000006,0x0000056c,0x0000056b,0x00050084,0x00000006,0x0000056d,0x0000056a,0x0000056c, + 0x00050041,0x0000002a,0x0000056e,0x00000028,0x000000d2,0x0004003d,0x00000006,0x0000056f, + 0x0000056e,0x00050082,0x00000006,0x00000570,0x0000056d,0x0000056f,0x0003003e,0x000000cc, + 0x00000570,0x0004003d,0x00000006,0x00000571,0x000000cc,0x0004003d,0x00000006,0x00000572, + 0x00000069,0x00050084,0x00000006,0x00000573,0x00000572,0x00000021,0x00050080,0x00000006, + 0x00000574,0x00000573,0x0000006a,0x00050041,0x0000002a,0x00000575,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x00000576,0x00000575,0x0005008b,0x00000006,0x00000577,0x00000574, + 0x00000576,0x00050041,0x0000002a,0x00000578,0x00000028,0x000000df,0x0004003d,0x00000006, + 0x00000579,0x00000578,0x00050084,0x00000006,0x0000057a,0x00000577,0x00000579,0x00050080, + 0x00000006,0x0000057b,0x00000571,0x0000057a,0x0003003e,0x000000d6,0x0000057b,0x0004003d, + 0x00000006,0x0000057c,0x000000c3,0x0004003d,0x00000006,0x0000057d,0x00000069,0x00050084, + 0x00000006,0x0000057e,0x0000057d,0x00000021,0x00050080,0x00000006,0x0000057f,0x0000057e, + 0x0000006a,0x00050041,0x0000002a,0x00000580,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x00000581,0x00000580,0x00050041,0x0000002a,0x00000582,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x00000583,0x00000582,0x00050084,0x00000006,0x00000584,0x00000581,0x00000583, + 0x0005008b,0x00000006,0x00000585,0x0000057f,0x00000584,0x00050041,0x0000002a,0x00000586, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x00000587,0x00000586,0x00050087,0x00000006, + 0x00000588,0x00000585,0x00000587,0x00050041,0x0000002a,0x00000589,0x00000028,0x000000f3, + 0x0004003d,0x00000006,0x0000058a,0x00000589,0x00050084,0x00000006,0x0000058b,0x00000588, + 0x0000058a,0x00050080,0x00000006,0x0000058c,0x0000057c,0x0000058b,0x0003003e,0x000000e4, + 0x0000058c,0x0004003d,0x00000006,0x0000058d,0x00000069,0x00050084,0x00000006,0x0000058e, + 0x0000058d,0x00000021,0x00050080,0x00000006,0x0000058f,0x0000058e,0x0000006a,0x00050041, + 0x0000002a,0x00000590,0x00000028,0x000000e9,0x0004003d,0x00000006,0x00000591,0x00000590, + 0x00050041,0x0000002a,0x00000592,0x00000028,0x000000db,0x0004003d,0x00000006,0x00000593, + 0x00000592,0x00050084,0x00000006,0x00000594,0x00000591,0x00000593,0x00050087,0x00000006, + 0x00000595,0x0000058f,0x00000594,0x0003003e,0x000000f8,0x00000595,0x0004003d,0x00000006, + 0x00000596,0x000000e4,0x000500af,0x00000040,0x00000597,0x00000596,0x0000006a,0x000300f7, + 0x00000599,0x00000000,0x000400fa,0x00000597,0x00000598,0x00000599,0x000200f8,0x00000598, + 0x0004003d,0x00000006,0x0000059a,0x000000e4,0x00050041,0x0000002a,0x0000059b,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x0000059c,0x0000059b,0x000500b1,0x00000040,0x0000059d, + 0x0000059a,0x0000059c,0x000200f9,0x00000599,0x000200f8,0x00000599,0x000700f5,0x00000040, + 0x0000059e,0x00000597,0x0000050d,0x0000059d,0x00000598,0x0004003d,0x00000006,0x0000059f, + 0x000000d6,0x000500af,0x00000040,0x000005a0,0x0000059f,0x0000006a,0x000500a7,0x00000040, + 0x000005a1,0x0000059e,0x000005a0,0x000300f7,0x000005a3,0x00000000,0x000400fa,0x000005a1, + 0x000005a2,0x000005a3,0x000200f8,0x000005a2,0x0004003d,0x00000006,0x000005a4,0x000000d6, + 0x00050041,0x0000002a,0x000005a5,0x00000028,0x00000021,0x0004003d,0x00000006,0x000005a6, + 0x000005a5,0x000500b1,0x00000040,0x000005a7,0x000005a4,0x000005a6,0x000200f9,0x000005a3, + 0x000200f8,0x000005a3,0x000700f5,0x00000040,0x000005a8,0x000005a1,0x00000599,0x000005a7, + 0x000005a2,0x000300f7,0x000005aa,0x00000000,0x000400fa,0x000005a8,0x000005a9,0x000005aa, + 0x000200f8,0x000005a9,0x0004003d,0x00000006,0x000005ab,0x00000024,0x0004003d,0x00000006, + 0x000005ac,0x000000f8,0x00050041,0x0000002a,0x000005ad,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x000005ae,0x000005ad,0x00050041,0x0000002a,0x000005af,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x000005b0,0x000005af,0x00050084,0x00000006,0x000005b1,0x000005ae, + 0x000005b0,0x00050084,0x00000006,0x000005b2,0x000005ac,0x000005b1,0x00050080,0x00000006, + 0x000005b3,0x000005ab,0x000005b2,0x0004003d,0x00000006,0x000005b4,0x000000e4,0x00050041, + 0x0000002a,0x000005b5,0x00000028,0x00000021,0x0004003d,0x00000006,0x000005b6,0x000005b5, + 0x00050084,0x00000006,0x000005b7,0x000005b4,0x000005b6,0x00050080,0x00000006,0x000005b8, + 0x000005b3,0x000005b7,0x0004003d,0x00000006,0x000005b9,0x000000d6,0x00050080,0x00000006, + 0x000005ba,0x000005b8,0x000005b9,0x00060041,0x0000012b,0x000005bb,0x0000011a,0x0000006a, + 0x000005ba,0x0004003d,0x0000005c,0x000005bc,0x000005bb,0x00050041,0x0000012e,0x000005bd, + 0x00000072,0x0000000d,0x0003003e,0x000005bd,0x000005bc,0x000200f9,0x000005aa,0x000200f8, + 0x000005aa,0x0004003d,0x00000006,0x000005be,0x000000cc,0x0004003d,0x00000006,0x000005bf, + 0x00000069,0x00050084,0x00000006,0x000005c0,0x000005bf,0x00000021,0x00050080,0x00000006, + 0x000005c1,0x000005c0,0x000000b0,0x00050041,0x0000002a,0x000005c2,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x000005c3,0x000005c2,0x0005008b,0x00000006,0x000005c4,0x000005c1, + 0x000005c3,0x00050041,0x0000002a,0x000005c5,0x00000028,0x000000df,0x0004003d,0x00000006, + 0x000005c6,0x000005c5,0x00050084,0x00000006,0x000005c7,0x000005c4,0x000005c6,0x00050080, + 0x00000006,0x000005c8,0x000005be,0x000005c7,0x0003003e,0x000000d6,0x000005c8,0x0004003d, + 0x00000006,0x000005c9,0x000000c3,0x0004003d,0x00000006,0x000005ca,0x00000069,0x00050084, + 0x00000006,0x000005cb,0x000005ca,0x00000021,0x00050080,0x00000006,0x000005cc,0x000005cb, + 0x000000b0,0x00050041,0x0000002a,0x000005cd,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x000005ce,0x000005cd,0x00050041,0x0000002a,0x000005cf,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x000005d0,0x000005cf,0x00050084,0x00000006,0x000005d1,0x000005ce,0x000005d0, + 0x0005008b,0x00000006,0x000005d2,0x000005cc,0x000005d1,0x00050041,0x0000002a,0x000005d3, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x000005d4,0x000005d3,0x00050087,0x00000006, + 0x000005d5,0x000005d2,0x000005d4,0x00050041,0x0000002a,0x000005d6,0x00000028,0x000000f3, + 0x0004003d,0x00000006,0x000005d7,0x000005d6,0x00050084,0x00000006,0x000005d8,0x000005d5, + 0x000005d7,0x00050080,0x00000006,0x000005d9,0x000005c9,0x000005d8,0x0003003e,0x000000e4, + 0x000005d9,0x0004003d,0x00000006,0x000005da,0x00000069,0x00050084,0x00000006,0x000005db, + 0x000005da,0x00000021,0x00050080,0x00000006,0x000005dc,0x000005db,0x000000b0,0x00050041, + 0x0000002a,0x000005dd,0x00000028,0x000000e9,0x0004003d,0x00000006,0x000005de,0x000005dd, + 0x00050041,0x0000002a,0x000005df,0x00000028,0x000000db,0x0004003d,0x00000006,0x000005e0, + 0x000005df,0x00050084,0x00000006,0x000005e1,0x000005de,0x000005e0,0x00050087,0x00000006, + 0x000005e2,0x000005dc,0x000005e1,0x0003003e,0x000000f8,0x000005e2,0x0004003d,0x00000006, + 0x000005e3,0x000000e4,0x000500af,0x00000040,0x000005e4,0x000005e3,0x0000006a,0x000300f7, + 0x000005e6,0x00000000,0x000400fa,0x000005e4,0x000005e5,0x000005e6,0x000200f8,0x000005e5, + 0x0004003d,0x00000006,0x000005e7,0x000000e4,0x00050041,0x0000002a,0x000005e8,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x000005e9,0x000005e8,0x000500b1,0x00000040,0x000005ea, + 0x000005e7,0x000005e9,0x000200f9,0x000005e6,0x000200f8,0x000005e6,0x000700f5,0x00000040, + 0x000005eb,0x000005e4,0x000005aa,0x000005ea,0x000005e5,0x0004003d,0x00000006,0x000005ec, + 0x000000d6,0x000500af,0x00000040,0x000005ed,0x000005ec,0x0000006a,0x000500a7,0x00000040, + 0x000005ee,0x000005eb,0x000005ed,0x000300f7,0x000005f0,0x00000000,0x000400fa,0x000005ee, + 0x000005ef,0x000005f0,0x000200f8,0x000005ef,0x0004003d,0x00000006,0x000005f1,0x000000d6, + 0x00050041,0x0000002a,0x000005f2,0x00000028,0x00000021,0x0004003d,0x00000006,0x000005f3, + 0x000005f2,0x000500b1,0x00000040,0x000005f4,0x000005f1,0x000005f3,0x000200f9,0x000005f0, + 0x000200f8,0x000005f0,0x000700f5,0x00000040,0x000005f5,0x000005ee,0x000005e6,0x000005f4, + 0x000005ef,0x000300f7,0x000005f7,0x00000000,0x000400fa,0x000005f5,0x000005f6,0x000005f7, + 0x000200f8,0x000005f6,0x0004003d,0x00000006,0x000005f8,0x00000024,0x0004003d,0x00000006, + 0x000005f9,0x000000f8,0x00050041,0x0000002a,0x000005fa,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x000005fb,0x000005fa,0x00050041,0x0000002a,0x000005fc,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x000005fd,0x000005fc,0x00050084,0x00000006,0x000005fe,0x000005fb, + 0x000005fd,0x00050084,0x00000006,0x000005ff,0x000005f9,0x000005fe,0x00050080,0x00000006, + 0x00000600,0x000005f8,0x000005ff,0x0004003d,0x00000006,0x00000601,0x000000e4,0x00050041, + 0x0000002a,0x00000602,0x00000028,0x00000021,0x0004003d,0x00000006,0x00000603,0x00000602, + 0x00050084,0x00000006,0x00000604,0x00000601,0x00000603,0x00050080,0x00000006,0x00000605, + 0x00000600,0x00000604,0x0004003d,0x00000006,0x00000606,0x000000d6,0x00050080,0x00000006, + 0x00000607,0x00000605,0x00000606,0x00060041,0x0000012b,0x00000608,0x0000011a,0x0000006a, + 0x00000607,0x0004003d,0x0000005c,0x00000609,0x00000608,0x00050041,0x0000012e,0x0000060a, + 0x00000072,0x00000013,0x0003003e,0x0000060a,0x00000609,0x000200f9,0x000005f7,0x000200f8, + 0x000005f7,0x0004003d,0x00000006,0x0000060b,0x000000cc,0x0004003d,0x00000006,0x0000060c, + 0x00000069,0x00050084,0x00000006,0x0000060d,0x0000060c,0x00000021,0x00050080,0x00000006, + 0x0000060e,0x0000060d,0x00000180,0x00050041,0x0000002a,0x0000060f,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x00000610,0x0000060f,0x0005008b,0x00000006,0x00000611,0x0000060e, + 0x00000610,0x00050041,0x0000002a,0x00000612,0x00000028,0x000000df,0x0004003d,0x00000006, + 0x00000613,0x00000612,0x00050084,0x00000006,0x00000614,0x00000611,0x00000613,0x00050080, + 0x00000006,0x00000615,0x0000060b,0x00000614,0x0003003e,0x000000d6,0x00000615,0x0004003d, + 0x00000006,0x00000616,0x000000c3,0x0004003d,0x00000006,0x00000617,0x00000069,0x00050084, + 0x00000006,0x00000618,0x00000617,0x00000021,0x00050080,0x00000006,0x00000619,0x00000618, + 0x00000180,0x00050041,0x0000002a,0x0000061a,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x0000061b,0x0000061a,0x00050041,0x0000002a,0x0000061c,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x0000061d,0x0000061c,0x00050084,0x00000006,0x0000061e,0x0000061b,0x0000061d, + 0x0005008b,0x00000006,0x0000061f,0x00000619,0x0000061e,0x00050041,0x0000002a,0x00000620, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x00000621,0x00000620,0x00050087,0x00000006, + 0x00000622,0x0000061f,0x00000621,0x00050041,0x0000002a,0x00000623,0x00000028,0x000000f3, + 0x0004003d,0x00000006,0x00000624,0x00000623,0x00050084,0x00000006,0x00000625,0x00000622, + 0x00000624,0x00050080,0x00000006,0x00000626,0x00000616,0x00000625,0x0003003e,0x000000e4, + 0x00000626,0x0004003d,0x00000006,0x00000627,0x00000069,0x00050084,0x00000006,0x00000628, + 0x00000627,0x00000021,0x00050080,0x00000006,0x00000629,0x00000628,0x00000180,0x00050041, + 0x0000002a,0x0000062a,0x00000028,0x000000e9,0x0004003d,0x00000006,0x0000062b,0x0000062a, + 0x00050041,0x0000002a,0x0000062c,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000062d, + 0x0000062c,0x00050084,0x00000006,0x0000062e,0x0000062b,0x0000062d,0x00050087,0x00000006, + 0x0000062f,0x00000629,0x0000062e,0x0003003e,0x000000f8,0x0000062f,0x0004003d,0x00000006, + 0x00000630,0x000000e4,0x000500af,0x00000040,0x00000631,0x00000630,0x0000006a,0x000300f7, + 0x00000633,0x00000000,0x000400fa,0x00000631,0x00000632,0x00000633,0x000200f8,0x00000632, + 0x0004003d,0x00000006,0x00000634,0x000000e4,0x00050041,0x0000002a,0x00000635,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x00000636,0x00000635,0x000500b1,0x00000040,0x00000637, + 0x00000634,0x00000636,0x000200f9,0x00000633,0x000200f8,0x00000633,0x000700f5,0x00000040, + 0x00000638,0x00000631,0x000005f7,0x00000637,0x00000632,0x0004003d,0x00000006,0x00000639, + 0x000000d6,0x000500af,0x00000040,0x0000063a,0x00000639,0x0000006a,0x000500a7,0x00000040, + 0x0000063b,0x00000638,0x0000063a,0x000300f7,0x0000063d,0x00000000,0x000400fa,0x0000063b, + 0x0000063c,0x0000063d,0x000200f8,0x0000063c,0x0004003d,0x00000006,0x0000063e,0x000000d6, + 0x00050041,0x0000002a,0x0000063f,0x00000028,0x00000021,0x0004003d,0x00000006,0x00000640, + 0x0000063f,0x000500b1,0x00000040,0x00000641,0x0000063e,0x00000640,0x000200f9,0x0000063d, + 0x000200f8,0x0000063d,0x000700f5,0x00000040,0x00000642,0x0000063b,0x00000633,0x00000641, + 0x0000063c,0x000300f7,0x00000644,0x00000000,0x000400fa,0x00000642,0x00000643,0x00000644, + 0x000200f8,0x00000643,0x0004003d,0x00000006,0x00000645,0x00000024,0x0004003d,0x00000006, + 0x00000646,0x000000f8,0x00050041,0x0000002a,0x00000647,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x00000648,0x00000647,0x00050041,0x0000002a,0x00000649,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x0000064a,0x00000649,0x00050084,0x00000006,0x0000064b,0x00000648, + 0x0000064a,0x00050084,0x00000006,0x0000064c,0x00000646,0x0000064b,0x00050080,0x00000006, + 0x0000064d,0x00000645,0x0000064c,0x0004003d,0x00000006,0x0000064e,0x000000e4,0x00050041, + 0x0000002a,0x0000064f,0x00000028,0x00000021,0x0004003d,0x00000006,0x00000650,0x0000064f, + 0x00050084,0x00000006,0x00000651,0x0000064e,0x00000650,0x00050080,0x00000006,0x00000652, + 0x0000064d,0x00000651,0x0004003d,0x00000006,0x00000653,0x000000d6,0x00050080,0x00000006, + 0x00000654,0x00000652,0x00000653,0x00060041,0x0000012b,0x00000655,0x0000011a,0x0000006a, + 0x00000654,0x0004003d,0x0000005c,0x00000656,0x00000655,0x00050041,0x0000012e,0x00000657, + 0x00000072,0x00000018,0x0003003e,0x00000657,0x00000656,0x000200f9,0x00000644,0x000200f8, + 0x00000644,0x0004003d,0x00000006,0x00000658,0x000000cc,0x0004003d,0x00000006,0x00000659, + 0x00000069,0x00050084,0x00000006,0x0000065a,0x00000659,0x00000021,0x00050080,0x00000006, + 0x0000065b,0x0000065a,0x00000029,0x00050041,0x0000002a,0x0000065c,0x00000028,0x000000db, + 0x0004003d,0x00000006,0x0000065d,0x0000065c,0x0005008b,0x00000006,0x0000065e,0x0000065b, + 0x0000065d,0x00050041,0x0000002a,0x0000065f,0x00000028,0x000000df,0x0004003d,0x00000006, + 0x00000660,0x0000065f,0x00050084,0x00000006,0x00000661,0x0000065e,0x00000660,0x00050080, + 0x00000006,0x00000662,0x00000658,0x00000661,0x0003003e,0x000000d6,0x00000662,0x0004003d, + 0x00000006,0x00000663,0x000000c3,0x0004003d,0x00000006,0x00000664,0x00000069,0x00050084, + 0x00000006,0x00000665,0x00000664,0x00000021,0x00050080,0x00000006,0x00000666,0x00000665, + 0x00000029,0x00050041,0x0000002a,0x00000667,0x00000028,0x000000e9,0x0004003d,0x00000006, + 0x00000668,0x00000667,0x00050041,0x0000002a,0x00000669,0x00000028,0x000000db,0x0004003d, + 0x00000006,0x0000066a,0x00000669,0x00050084,0x00000006,0x0000066b,0x00000668,0x0000066a, + 0x0005008b,0x00000006,0x0000066c,0x00000666,0x0000066b,0x00050041,0x0000002a,0x0000066d, + 0x00000028,0x000000db,0x0004003d,0x00000006,0x0000066e,0x0000066d,0x00050087,0x00000006, + 0x0000066f,0x0000066c,0x0000066e,0x00050041,0x0000002a,0x00000670,0x00000028,0x000000f3, + 0x0004003d,0x00000006,0x00000671,0x00000670,0x00050084,0x00000006,0x00000672,0x0000066f, + 0x00000671,0x00050080,0x00000006,0x00000673,0x00000663,0x00000672,0x0003003e,0x000000e4, + 0x00000673,0x0004003d,0x00000006,0x00000674,0x00000069,0x00050084,0x00000006,0x00000675, + 0x00000674,0x00000021,0x00050080,0x00000006,0x00000676,0x00000675,0x00000029,0x00050041, + 0x0000002a,0x00000677,0x00000028,0x000000e9,0x0004003d,0x00000006,0x00000678,0x00000677, + 0x00050041,0x0000002a,0x00000679,0x00000028,0x000000db,0x0004003d,0x00000006,0x0000067a, + 0x00000679,0x00050084,0x00000006,0x0000067b,0x00000678,0x0000067a,0x00050087,0x00000006, + 0x0000067c,0x00000676,0x0000067b,0x0003003e,0x000000f8,0x0000067c,0x0004003d,0x00000006, + 0x0000067d,0x000000e4,0x000500af,0x00000040,0x0000067e,0x0000067d,0x0000006a,0x000300f7, + 0x00000680,0x00000000,0x000400fa,0x0000067e,0x0000067f,0x00000680,0x000200f8,0x0000067f, + 0x0004003d,0x00000006,0x00000681,0x000000e4,0x00050041,0x0000002a,0x00000682,0x00000028, + 0x00000029,0x0004003d,0x00000006,0x00000683,0x00000682,0x000500b1,0x00000040,0x00000684, + 0x00000681,0x00000683,0x000200f9,0x00000680,0x000200f8,0x00000680,0x000700f5,0x00000040, + 0x00000685,0x0000067e,0x00000644,0x00000684,0x0000067f,0x0004003d,0x00000006,0x00000686, + 0x000000d6,0x000500af,0x00000040,0x00000687,0x00000686,0x0000006a,0x000500a7,0x00000040, + 0x00000688,0x00000685,0x00000687,0x000300f7,0x0000068a,0x00000000,0x000400fa,0x00000688, + 0x00000689,0x0000068a,0x000200f8,0x00000689,0x0004003d,0x00000006,0x0000068b,0x000000d6, + 0x00050041,0x0000002a,0x0000068c,0x00000028,0x00000021,0x0004003d,0x00000006,0x0000068d, + 0x0000068c,0x000500b1,0x00000040,0x0000068e,0x0000068b,0x0000068d,0x000200f9,0x0000068a, + 0x000200f8,0x0000068a,0x000700f5,0x00000040,0x0000068f,0x00000688,0x00000680,0x0000068e, + 0x00000689,0x000300f7,0x00000691,0x00000000,0x000400fa,0x0000068f,0x00000690,0x00000691, + 0x000200f8,0x00000690,0x0004003d,0x00000006,0x00000692,0x00000024,0x0004003d,0x00000006, + 0x00000693,0x000000f8,0x00050041,0x0000002a,0x00000694,0x00000028,0x00000029,0x0004003d, + 0x00000006,0x00000695,0x00000694,0x00050041,0x0000002a,0x00000696,0x00000028,0x00000021, + 0x0004003d,0x00000006,0x00000697,0x00000696,0x00050084,0x00000006,0x00000698,0x00000695, + 0x00000697,0x00050084,0x00000006,0x00000699,0x00000693,0x00000698,0x00050080,0x00000006, + 0x0000069a,0x00000692,0x00000699,0x0004003d,0x00000006,0x0000069b,0x000000e4,0x00050041, + 0x0000002a,0x0000069c,0x00000028,0x00000021,0x0004003d,0x00000006,0x0000069d,0x0000069c, + 0x00050084,0x00000006,0x0000069e,0x0000069b,0x0000069d,0x00050080,0x00000006,0x0000069f, + 0x0000069a,0x0000069e,0x0004003d,0x00000006,0x000006a0,0x000000d6,0x00050080,0x00000006, + 0x000006a1,0x0000069f,0x000006a0,0x00060041,0x0000012b,0x000006a2,0x0000011a,0x0000006a, + 0x000006a1,0x0004003d,0x0000005c,0x000006a3,0x000006a2,0x00050041,0x0000012e,0x000006a4, + 0x00000072,0x00000217,0x0003003e,0x000006a4,0x000006a3,0x000200f9,0x00000691,0x000200f8, + 0x00000691,0x0004003d,0x0000005d,0x000006a5,0x00000073,0x0004003d,0x0000005d,0x000006a6, + 0x00000072,0x00050094,0x0000005c,0x000006a7,0x000006a5,0x000006a6,0x00050041,0x0000012e, + 0x000006a8,0x0000005f,0x00000217,0x0004003d,0x0000005c,0x000006a9,0x000006a8,0x00050081, + 0x0000005c,0x000006aa,0x000006a9,0x000006a7,0x00050041,0x0000012e,0x000006ab,0x0000005f, + 0x00000217,0x0003003e,0x000006ab,0x000006aa,0x0004003d,0x0000005d,0x000006ac,0x0000007f, + 0x0004003d,0x0000005d,0x000006ad,0x00000072,0x00050094,0x0000005c,0x000006ae,0x000006ac, + 0x000006ad,0x00050041,0x0000012e,0x000006af,0x00000062,0x00000217,0x0004003d,0x0000005c, + 0x000006b0,0x000006af,0x00050081,0x0000005c,0x000006b1,0x000006b0,0x000006ae,0x00050041, + 0x0000012e,0x000006b2,0x00000062,0x00000217,0x0003003e,0x000006b2,0x000006b1,0x0004003d, + 0x0000005d,0x000006b3,0x00000086,0x0004003d,0x0000005d,0x000006b4,0x00000072,0x00050094, + 0x0000005c,0x000006b5,0x000006b3,0x000006b4,0x00050041,0x0000012e,0x000006b6,0x00000063, + 0x00000217,0x0004003d,0x0000005c,0x000006b7,0x000006b6,0x00050081,0x0000005c,0x000006b8, + 0x000006b7,0x000006b5,0x00050041,0x0000012e,0x000006b9,0x00000063,0x00000217,0x0003003e, + 0x000006b9,0x000006b8,0x0004003d,0x0000005d,0x000006ba,0x0000008d,0x0004003d,0x0000005d, + 0x000006bb,0x00000072,0x00050094,0x0000005c,0x000006bc,0x000006ba,0x000006bb,0x00050041, + 0x0000012e,0x000006bd,0x00000064,0x00000217,0x0004003d,0x0000005c,0x000006be,0x000006bd, + 0x00050081,0x0000005c,0x000006bf,0x000006be,0x000006bc,0x00050041,0x0000012e,0x000006c0, + 0x00000064,0x00000217,0x0003003e,0x000006c0,0x000006bf,0x0004003d,0x0000005d,0x000006c1, + 0x00000094,0x0004003d,0x0000005d,0x000006c2,0x00000072,0x00050094,0x0000005c,0x000006c3, + 0x000006c1,0x000006c2,0x00050041,0x0000012e,0x000006c4,0x00000065,0x00000217,0x0004003d, + 0x0000005c,0x000006c5,0x000006c4,0x00050081,0x0000005c,0x000006c6,0x000006c5,0x000006c3, + 0x00050041,0x0000012e,0x000006c7,0x00000065,0x00000217,0x0003003e,0x000006c7,0x000006c6, + 0x0004003d,0x0000005d,0x000006c8,0x0000009b,0x0004003d,0x0000005d,0x000006c9,0x00000072, + 0x00050094,0x0000005c,0x000006ca,0x000006c8,0x000006c9,0x00050041,0x0000012e,0x000006cb, + 0x00000066,0x00000217,0x0004003d,0x0000005c,0x000006cc,0x000006cb,0x00050081,0x0000005c, + 0x000006cd,0x000006cc,0x000006ca,0x00050041,0x0000012e,0x000006ce,0x00000066,0x00000217, + 0x0003003e,0x000006ce,0x000006cd,0x0004003d,0x0000005d,0x000006cf,0x000000a2,0x0004003d, + 0x0000005d,0x000006d0,0x00000072,0x00050094,0x0000005c,0x000006d1,0x000006cf,0x000006d0, + 0x00050041,0x0000012e,0x000006d2,0x00000067,0x00000217,0x0004003d,0x0000005c,0x000006d3, + 0x000006d2,0x00050081,0x0000005c,0x000006d4,0x000006d3,0x000006d1,0x00050041,0x0000012e, + 0x000006d5,0x00000067,0x00000217,0x0003003e,0x000006d5,0x000006d4,0x0004003d,0x0000005d, + 0x000006d6,0x000000a9,0x0004003d,0x0000005d,0x000006d7,0x00000072,0x00050094,0x0000005c, + 0x000006d8,0x000006d6,0x000006d7,0x00050041,0x0000012e,0x000006d9,0x00000068,0x00000217, + 0x0004003d,0x0000005c,0x000006da,0x000006d9,0x00050081,0x0000005c,0x000006db,0x000006da, + 0x000006d8,0x00050041,0x0000012e,0x000006dc,0x00000068,0x00000217,0x0003003e,0x000006dc, + 0x000006db,0x0004003d,0x00000006,0x000006dd,0x00000069,0x00050080,0x00000006,0x000006de, + 0x000006dd,0x000000b0,0x0003003e,0x00000069,0x000006de,0x000200f9,0x0000006e,0x000200f8, + 0x0000006e,0x0004003d,0x00000006,0x000006df,0x00000069,0x0004003d,0x00000006,0x000006e0, + 0x0000004f,0x000500b1,0x00000040,0x000006e1,0x000006df,0x000006e0,0x000400fa,0x000006e1, + 0x0000006b,0x0000006d,0x000200f8,0x0000006d,0x00050041,0x0000000e,0x000006e7,0x0000000c, + 0x0000000d,0x0004003d,0x00000009,0x000006e8,0x000006e7,0x0004007c,0x00000006,0x000006e9, + 0x000006e8,0x00050084,0x00000006,0x000006ea,0x00000180,0x000006e9,0x00060041,0x00000079, + 0x000006eb,0x000006e6,0x0000006a,0x000006ea,0x0004003d,0x0000005d,0x000006ec,0x000006eb, + 0x0003003e,0x000006e2,0x000006ec,0x0004003d,0x0000005d,0x000006ed,0x000006e2,0x0009004f, + 0x0000005d,0x000006ee,0x000006ed,0x000006ed,0x00000000,0x00000000,0x00000000,0x00000000, + 0x0004003d,0x0000005d,0x000006ef,0x0000005f,0x00050081,0x0000005d,0x000006f0,0x000006ef, + 0x000006ee,0x0003003e,0x0000005f,0x000006f0,0x0004003d,0x0000005d,0x000006f1,0x000006e2, + 0x0009004f,0x0000005d,0x000006f2,0x000006f1,0x000006f1,0x00000001,0x00000001,0x00000001, + 0x00000001,0x0004003d,0x0000005d,0x000006f3,0x00000062,0x00050081,0x0000005d,0x000006f4, + 0x000006f3,0x000006f2,0x0003003e,0x00000062,0x000006f4,0x0004003d,0x0000005d,0x000006f5, + 0x000006e2,0x0009004f,0x0000005d,0x000006f6,0x000006f5,0x000006f5,0x00000002,0x00000002, + 0x00000002,0x00000002,0x0004003d,0x0000005d,0x000006f7,0x00000063,0x00050081,0x0000005d, + 0x000006f8,0x000006f7,0x000006f6,0x0003003e,0x00000063,0x000006f8,0x0004003d,0x0000005d, + 0x000006f9,0x000006e2,0x0009004f,0x0000005d,0x000006fa,0x000006f9,0x000006f9,0x00000003, + 0x00000003,0x00000003,0x00000003,0x0004003d,0x0000005d,0x000006fb,0x00000064,0x00050081, + 0x0000005d,0x000006fc,0x000006fb,0x000006fa,0x0003003e,0x00000064,0x000006fc,0x00050041, + 0x0000000e,0x000006fd,0x0000000c,0x0000000d,0x0004003d,0x00000009,0x000006fe,0x000006fd, + 0x0004007c,0x00000006,0x000006ff,0x000006fe,0x00050084,0x00000006,0x00000700,0x00000180, + 0x000006ff,0x00050080,0x00000006,0x00000701,0x00000700,0x000000b0,0x00060041,0x00000079, + 0x00000702,0x000006e6,0x0000006a,0x00000701,0x0004003d,0x0000005d,0x00000703,0x00000702, + 0x0003003e,0x000006e2,0x00000703,0x0004003d,0x0000005d,0x00000704,0x000006e2,0x0009004f, + 0x0000005d,0x00000705,0x00000704,0x00000704,0x00000000,0x00000000,0x00000000,0x00000000, + 0x0004003d,0x0000005d,0x00000706,0x00000065,0x00050081,0x0000005d,0x00000707,0x00000706, + 0x00000705,0x0003003e,0x00000065,0x00000707,0x0004003d,0x0000005d,0x00000708,0x000006e2, + 0x0009004f,0x0000005d,0x00000709,0x00000708,0x00000708,0x00000001,0x00000001,0x00000001, + 0x00000001,0x0004003d,0x0000005d,0x0000070a,0x00000066,0x00050081,0x0000005d,0x0000070b, + 0x0000070a,0x00000709,0x0003003e,0x00000066,0x0000070b,0x0004003d,0x0000005d,0x0000070c, + 0x000006e2,0x0009004f,0x0000005d,0x0000070d,0x0000070c,0x0000070c,0x00000002,0x00000002, + 0x00000002,0x00000002,0x0004003d,0x0000005d,0x0000070e,0x00000067,0x00050081,0x0000005d, + 0x0000070f,0x0000070e,0x0000070d,0x0003003e,0x00000067,0x0000070f,0x0004003d,0x0000005d, + 0x00000710,0x000006e2,0x0009004f,0x0000005d,0x00000711,0x00000710,0x00000710,0x00000003, + 0x00000003,0x00000003,0x00000003,0x0004003d,0x0000005d,0x00000712,0x00000068,0x00050081, + 0x0000005d,0x00000713,0x00000712,0x00000711,0x0003003e,0x00000068,0x00000713,0x0004003d, + 0x00000006,0x00000718,0x00000035,0x0004003d,0x00000006,0x00000719,0x0000001c,0x00050080, + 0x00000006,0x0000071a,0x00000719,0x0000006a,0x00050041,0x0000002a,0x0000071b,0x00000028, + 0x00000037,0x0004003d,0x00000006,0x0000071c,0x0000071b,0x00050084,0x00000006,0x0000071d, + 0x0000071a,0x0000071c,0x00050087,0x00000006,0x0000071e,0x0000071d,0x00000021,0x00050080, + 0x00000006,0x0000071f,0x00000718,0x0000071e,0x0004003d,0x00000006,0x00000720,0x00000012, + 0x00050080,0x00000006,0x00000721,0x0000071f,0x00000720,0x0004003d,0x0000005d,0x00000722, + 0x0000005f,0x00060041,0x00000079,0x00000723,0x00000717,0x0000006a,0x00000721,0x0003003e, + 0x00000723,0x00000722,0x0004003d,0x00000006,0x00000724,0x00000035,0x0004003d,0x00000006, + 0x00000725,0x0000001c,0x00050080,0x00000006,0x00000726,0x00000725,0x000000b0,0x00050041, + 0x0000002a,0x00000727,0x00000028,0x00000037,0x0004003d,0x00000006,0x00000728,0x00000727, + 0x00050084,0x00000006,0x00000729,0x00000726,0x00000728,0x00050087,0x00000006,0x0000072a, + 0x00000729,0x00000021,0x00050080,0x00000006,0x0000072b,0x00000724,0x0000072a,0x0004003d, + 0x00000006,0x0000072c,0x00000012,0x00050080,0x00000006,0x0000072d,0x0000072b,0x0000072c, + 0x0004003d,0x0000005d,0x0000072e,0x00000062,0x00060041,0x00000079,0x0000072f,0x00000717, + 0x0000006a,0x0000072d,0x0003003e,0x0000072f,0x0000072e,0x0004003d,0x00000006,0x00000730, + 0x00000035,0x0004003d,0x00000006,0x00000731,0x0000001c,0x00050080,0x00000006,0x00000732, + 0x00000731,0x00000180,0x00050041,0x0000002a,0x00000733,0x00000028,0x00000037,0x0004003d, + 0x00000006,0x00000734,0x00000733,0x00050084,0x00000006,0x00000735,0x00000732,0x00000734, + 0x00050087,0x00000006,0x00000736,0x00000735,0x00000021,0x00050080,0x00000006,0x00000737, + 0x00000730,0x00000736,0x0004003d,0x00000006,0x00000738,0x00000012,0x00050080,0x00000006, + 0x00000739,0x00000737,0x00000738,0x0004003d,0x0000005d,0x0000073a,0x00000063,0x00060041, + 0x00000079,0x0000073b,0x00000717,0x0000006a,0x00000739,0x0003003e,0x0000073b,0x0000073a, + 0x0004003d,0x00000006,0x0000073c,0x00000035,0x0004003d,0x00000006,0x0000073d,0x0000001c, + 0x00050080,0x00000006,0x0000073e,0x0000073d,0x00000029,0x00050041,0x0000002a,0x0000073f, + 0x00000028,0x00000037,0x0004003d,0x00000006,0x00000740,0x0000073f,0x00050084,0x00000006, + 0x00000741,0x0000073e,0x00000740,0x00050087,0x00000006,0x00000742,0x00000741,0x00000021, + 0x00050080,0x00000006,0x00000743,0x0000073c,0x00000742,0x0004003d,0x00000006,0x00000744, + 0x00000012,0x00050080,0x00000006,0x00000745,0x00000743,0x00000744,0x0004003d,0x0000005d, + 0x00000746,0x00000064,0x00060041,0x00000079,0x00000747,0x00000717,0x0000006a,0x00000745, + 0x0003003e,0x00000747,0x00000746,0x0004003d,0x00000006,0x00000748,0x00000035,0x0004003d, + 0x00000006,0x00000749,0x0000001c,0x00050080,0x00000006,0x0000074a,0x00000749,0x00000021, + 0x00050041,0x0000002a,0x0000074b,0x00000028,0x00000037,0x0004003d,0x00000006,0x0000074c, + 0x0000074b,0x00050084,0x00000006,0x0000074d,0x0000074a,0x0000074c,0x00050087,0x00000006, + 0x0000074e,0x0000074d,0x00000021,0x00050080,0x00000006,0x0000074f,0x00000748,0x0000074e, + 0x0004003d,0x00000006,0x00000750,0x00000012,0x00050080,0x00000006,0x00000751,0x0000074f, + 0x00000750,0x0004003d,0x0000005d,0x00000752,0x00000065,0x00060041,0x00000079,0x00000753, + 0x00000717,0x0000006a,0x00000751,0x0003003e,0x00000753,0x00000752,0x0004003d,0x00000006, + 0x00000754,0x00000035,0x0004003d,0x00000006,0x00000755,0x0000001c,0x00050080,0x00000006, + 0x00000756,0x00000755,0x000000b9,0x00050041,0x0000002a,0x00000757,0x00000028,0x00000037, + 0x0004003d,0x00000006,0x00000758,0x00000757,0x00050084,0x00000006,0x00000759,0x00000756, + 0x00000758,0x00050087,0x00000006,0x0000075a,0x00000759,0x00000021,0x00050080,0x00000006, + 0x0000075b,0x00000754,0x0000075a,0x0004003d,0x00000006,0x0000075c,0x00000012,0x00050080, + 0x00000006,0x0000075d,0x0000075b,0x0000075c,0x0004003d,0x0000005d,0x0000075e,0x00000066, + 0x00060041,0x00000079,0x0000075f,0x00000717,0x0000006a,0x0000075d,0x0003003e,0x0000075f, + 0x0000075e,0x0004003d,0x00000006,0x00000760,0x00000035,0x0004003d,0x00000006,0x00000761, + 0x0000001c,0x00050080,0x00000006,0x00000762,0x00000761,0x000000c5,0x00050041,0x0000002a, + 0x00000763,0x00000028,0x00000037,0x0004003d,0x00000006,0x00000764,0x00000763,0x00050084, + 0x00000006,0x00000765,0x00000762,0x00000764,0x00050087,0x00000006,0x00000766,0x00000765, + 0x00000021,0x00050080,0x00000006,0x00000767,0x00000760,0x00000766,0x0004003d,0x00000006, + 0x00000768,0x00000012,0x00050080,0x00000006,0x00000769,0x00000767,0x00000768,0x0004003d, + 0x0000005d,0x0000076a,0x00000067,0x00060041,0x00000079,0x0000076b,0x00000717,0x0000006a, + 0x00000769,0x0003003e,0x0000076b,0x0000076a,0x0004003d,0x00000006,0x0000076c,0x00000035, + 0x0004003d,0x00000006,0x0000076d,0x0000001c,0x00050080,0x00000006,0x0000076e,0x0000076d, + 0x000000ce,0x00050041,0x0000002a,0x0000076f,0x00000028,0x00000037,0x0004003d,0x00000006, + 0x00000770,0x0000076f,0x00050084,0x00000006,0x00000771,0x0000076e,0x00000770,0x00050087, + 0x00000006,0x00000772,0x00000771,0x00000021,0x00050080,0x00000006,0x00000773,0x0000076c, + 0x00000772,0x0004003d,0x00000006,0x00000774,0x00000012,0x00050080,0x00000006,0x00000775, + 0x00000773,0x00000774,0x0004003d,0x0000005d,0x00000776,0x00000068,0x00060041,0x00000079, + 0x00000777,0x00000717,0x0000006a,0x00000775,0x0003003e,0x00000777,0x00000776,0x000200f9, + 0x0000004e,0x000200f8,0x0000004e,0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/conv_spv.cpp b/modules/dnn/src/webgpu/shader/conv_spv.cpp new file mode 100644 index 000000000000..ee7cfc5b4eba --- /dev/null +++ b/modules/dnn/src/webgpu/shader/conv_spv.cpp @@ -0,0 +1,251 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int conv_spv[1888] = { + 0x07230203,0x00010000,0x00080009,0x00000123,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00060010,0x00000004, + 0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, + 0x00000004,0x6e69616d,0x00000000,0x00030005,0x00000008,0x00007867,0x00080005,0x0000000c, + 0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00030005,0x00000012, + 0x00007967,0x00050005,0x00000017,0x68737570,0x636f6c42,0x0000006b,0x00050006,0x00000017, + 0x00000000,0x685f6e69,0x00000000,0x00050006,0x00000017,0x00000001,0x775f6e69,0x00000000, + 0x00050006,0x00000017,0x00000002,0x5f74756f,0x00000068,0x00050006,0x00000017,0x00000003, + 0x5f74756f,0x00000077,0x00060006,0x00000017,0x00000004,0x69727473,0x685f6564,0x00000000, + 0x00060006,0x00000017,0x00000005,0x69727473,0x775f6564,0x00000000,0x00050006,0x00000017, + 0x00000006,0x5f646170,0x00000068,0x00050006,0x00000017,0x00000007,0x5f646170,0x00000077, + 0x00060006,0x00000017,0x00000008,0x746c6966,0x685f7265,0x00000000,0x00060006,0x00000017, + 0x00000009,0x746c6966,0x775f7265,0x00000000,0x00060006,0x00000017,0x0000000a,0x616c6964, + 0x6e6f6974,0x0000685f,0x00060006,0x00000017,0x0000000b,0x616c6964,0x6e6f6974,0x0000775f, + 0x00060006,0x00000017,0x0000000c,0x6e616863,0x736c656e,0x00000000,0x00050006,0x00000017, + 0x0000000d,0x63746162,0x00000068,0x00060006,0x00000017,0x0000000e,0x5f736168,0x73616962, + 0x00000000,0x00040006,0x00000017,0x0000000f,0x0000004d,0x00040006,0x00000017,0x00000010, + 0x0000004b,0x00040006,0x00000017,0x00000011,0x0000004e,0x00090006,0x00000017,0x00000012, + 0x69736162,0x68735f63,0x72656461,0x7461625f,0x695f6863,0x00007864,0x000a0006,0x00000017, + 0x00000013,0x69736162,0x68735f63,0x72656461,0x7261705f,0x69746974,0x695f6e6f,0x00007864, + 0x000a0006,0x00000017,0x00000014,0x69736162,0x68735f63,0x72656461,0x7261705f,0x69746974, + 0x735f6e6f,0x00657a69,0x00030005,0x00000019,0x00000070,0x00030005,0x00000023,0x00007a67, + 0x00030005,0x00000039,0x006d7573,0x00050005,0x0000003b,0x7074756f,0x795f7475,0x00000000, + 0x00050005,0x00000041,0x7074756f,0x785f7475,0x00000000,0x00040005,0x00000046,0x5f67726f, + 0x00000079,0x00040005,0x00000050,0x5f67726f,0x00000078,0x00050005,0x0000005a,0x67696577, + 0x6f5f7468,0x00006666,0x00050005,0x00000060,0x75706e69,0x666f5f74,0x00000066,0x00030005, + 0x00000075,0x00000063,0x00030005,0x0000007f,0x00000079,0x00030005,0x0000008a,0x00000078, + 0x00040005,0x000000c3,0x75706e49,0x00003074,0x00060006,0x000000c3,0x00000000,0x67616d69, + 0x61645f65,0x00006174,0x00030005,0x000000c5,0x00000000,0x00040005,0x000000d0,0x75706e49, + 0x00003374,0x00060006,0x000000d0,0x00000000,0x67696577,0x645f7468,0x00617461,0x00030005, + 0x000000d2,0x00000000,0x00040005,0x000000fc,0x7366666f,0x00007465,0x00040005,0x00000112, + 0x75706e49,0x00003174,0x00060006,0x00000112,0x00000000,0x73616962,0x7461645f,0x00000061, + 0x00030005,0x00000114,0x00000000,0x00040005,0x0000011b,0x7074754f,0x00007475,0x00090006, + 0x0000011b,0x00000000,0x766e6f63,0x65766c6f,0x6d695f64,0x5f656761,0x61746164,0x00000000, + 0x00030005,0x0000011d,0x00000000,0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00050048, + 0x00000017,0x00000000,0x00000023,0x00000000,0x00050048,0x00000017,0x00000001,0x00000023, + 0x00000004,0x00050048,0x00000017,0x00000002,0x00000023,0x00000008,0x00050048,0x00000017, + 0x00000003,0x00000023,0x0000000c,0x00050048,0x00000017,0x00000004,0x00000023,0x00000010, + 0x00050048,0x00000017,0x00000005,0x00000023,0x00000014,0x00050048,0x00000017,0x00000006, + 0x00000023,0x00000018,0x00050048,0x00000017,0x00000007,0x00000023,0x0000001c,0x00050048, + 0x00000017,0x00000008,0x00000023,0x00000020,0x00050048,0x00000017,0x00000009,0x00000023, + 0x00000024,0x00050048,0x00000017,0x0000000a,0x00000023,0x00000028,0x00050048,0x00000017, + 0x0000000b,0x00000023,0x0000002c,0x00050048,0x00000017,0x0000000c,0x00000023,0x00000030, + 0x00050048,0x00000017,0x0000000d,0x00000023,0x00000034,0x00050048,0x00000017,0x0000000e, + 0x00000023,0x00000038,0x00050048,0x00000017,0x0000000f,0x00000023,0x0000003c,0x00050048, + 0x00000017,0x00000010,0x00000023,0x00000040,0x00050048,0x00000017,0x00000011,0x00000023, + 0x00000044,0x00050048,0x00000017,0x00000012,0x00000023,0x00000048,0x00050048,0x00000017, + 0x00000013,0x00000023,0x0000004c,0x00050048,0x00000017,0x00000014,0x00000023,0x00000050, + 0x00030047,0x00000017,0x00000002,0x00040047,0x00000019,0x00000022,0x00000000,0x00040047, + 0x00000019,0x00000021,0x00000004,0x00040047,0x000000c2,0x00000006,0x00000004,0x00050048, + 0x000000c3,0x00000000,0x00000023,0x00000000,0x00030047,0x000000c3,0x00000003,0x00040047, + 0x000000c5,0x00000022,0x00000000,0x00040047,0x000000c5,0x00000021,0x00000000,0x00040047, + 0x000000cf,0x00000006,0x00000004,0x00050048,0x000000d0,0x00000000,0x00000023,0x00000000, + 0x00030047,0x000000d0,0x00000003,0x00040047,0x000000d2,0x00000022,0x00000000,0x00040047, + 0x000000d2,0x00000021,0x00000002,0x00040047,0x00000111,0x00000006,0x00000004,0x00050048, + 0x00000112,0x00000000,0x00000023,0x00000000,0x00030047,0x00000112,0x00000003,0x00040047, + 0x00000114,0x00000022,0x00000000,0x00040047,0x00000114,0x00000021,0x00000001,0x00040047, + 0x0000011a,0x00000006,0x00000004,0x00050048,0x0000011b,0x00000000,0x00000023,0x00000000, + 0x00030047,0x0000011b,0x00000003,0x00040047,0x0000011d,0x00000022,0x00000000,0x00040047, + 0x0000011d,0x00000021,0x00000003,0x00040047,0x00000122,0x0000000b,0x00000019,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000001, + 0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020,0x00000000, + 0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a, + 0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000, + 0x00040020,0x0000000e,0x00000001,0x00000009,0x0004002b,0x00000009,0x00000013,0x00000001, + 0x0017001e,0x00000017,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00040020, + 0x00000018,0x00000002,0x00000017,0x0004003b,0x00000018,0x00000019,0x00000002,0x0004002b, + 0x00000006,0x0000001a,0x00000013,0x00040020,0x0000001b,0x00000002,0x00000006,0x0004002b, + 0x00000006,0x0000001e,0x00000014,0x0004002b,0x00000006,0x00000024,0x00000012,0x00020014, + 0x00000027,0x0004002b,0x00000006,0x00000029,0x0000000f,0x0004002b,0x00000006,0x00000030, + 0x00000011,0x00030016,0x00000037,0x00000020,0x00040020,0x00000038,0x00000007,0x00000037, + 0x0004002b,0x00000037,0x0000003a,0x00000000,0x0004002b,0x00000006,0x0000003d,0x00000003, + 0x0004002b,0x00000006,0x00000048,0x00000004,0x0004002b,0x00000006,0x0000004c,0x00000006, + 0x0004002b,0x00000006,0x00000052,0x00000005,0x0004002b,0x00000006,0x00000056,0x00000007, + 0x0004002b,0x00000006,0x0000005c,0x00000010,0x0004002b,0x00000006,0x00000062,0x00000000, + 0x0004002b,0x00000006,0x00000066,0x00000001,0x0004002b,0x00000006,0x0000006a,0x0000000c, + 0x0004002b,0x00000006,0x00000086,0x00000008,0x0004002b,0x00000006,0x00000091,0x00000009, + 0x0004002b,0x00000006,0x00000097,0x0000000a,0x0004002b,0x00000006,0x000000ad,0x0000000b, + 0x0003001d,0x000000c2,0x00000037,0x0003001e,0x000000c3,0x000000c2,0x00040020,0x000000c4, + 0x00000002,0x000000c3,0x0004003b,0x000000c4,0x000000c5,0x00000002,0x00040020,0x000000cc, + 0x00000002,0x00000037,0x0003001d,0x000000cf,0x00000037,0x0003001e,0x000000d0,0x000000cf, + 0x00040020,0x000000d1,0x00000002,0x000000d0,0x0004003b,0x000000d1,0x000000d2,0x00000002, + 0x0004002b,0x00000006,0x0000010b,0x0000000e,0x0003001d,0x00000111,0x00000037,0x0003001e, + 0x00000112,0x00000111,0x00040020,0x00000113,0x00000002,0x00000112,0x0004003b,0x00000113, + 0x00000114,0x00000002,0x0003001d,0x0000011a,0x00000037,0x0003001e,0x0000011b,0x0000011a, + 0x00040020,0x0000011c,0x00000002,0x0000011b,0x0004003b,0x0000011c,0x0000011d,0x00000002, + 0x0004002b,0x00000009,0x00000121,0x00000100,0x0006002c,0x0000000a,0x00000122,0x00000121, + 0x00000013,0x00000013,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8, + 0x00000005,0x0004003b,0x00000007,0x00000008,0x00000007,0x0004003b,0x00000007,0x00000012, + 0x00000007,0x0004003b,0x00000007,0x00000023,0x00000007,0x0004003b,0x00000038,0x00000039, + 0x00000007,0x0004003b,0x00000007,0x0000003b,0x00000007,0x0004003b,0x00000007,0x00000041, + 0x00000007,0x0004003b,0x00000007,0x00000046,0x00000007,0x0004003b,0x00000007,0x00000050, + 0x00000007,0x0004003b,0x00000007,0x0000005a,0x00000007,0x0004003b,0x00000007,0x00000060, + 0x00000007,0x0004003b,0x00000007,0x00000075,0x00000007,0x0004003b,0x00000007,0x0000007f, + 0x00000007,0x0004003b,0x00000007,0x0000008a,0x00000007,0x0004003b,0x00000007,0x000000fc, + 0x00000007,0x00050041,0x0000000e,0x0000000f,0x0000000c,0x0000000d,0x0004003d,0x00000009, + 0x00000010,0x0000000f,0x0004007c,0x00000006,0x00000011,0x00000010,0x0003003e,0x00000008, + 0x00000011,0x00050041,0x0000000e,0x00000014,0x0000000c,0x00000013,0x0004003d,0x00000009, + 0x00000015,0x00000014,0x0004007c,0x00000006,0x00000016,0x00000015,0x00050041,0x0000001b, + 0x0000001c,0x00000019,0x0000001a,0x0004003d,0x00000006,0x0000001d,0x0000001c,0x00050041, + 0x0000001b,0x0000001f,0x00000019,0x0000001e,0x0004003d,0x00000006,0x00000020,0x0000001f, + 0x00050084,0x00000006,0x00000021,0x0000001d,0x00000020,0x00050080,0x00000006,0x00000022, + 0x00000016,0x00000021,0x0003003e,0x00000012,0x00000022,0x00050041,0x0000001b,0x00000025, + 0x00000019,0x00000024,0x0004003d,0x00000006,0x00000026,0x00000025,0x0003003e,0x00000023, + 0x00000026,0x0004003d,0x00000006,0x00000028,0x00000008,0x00050041,0x0000001b,0x0000002a, + 0x00000019,0x00000029,0x0004003d,0x00000006,0x0000002b,0x0000002a,0x000500b1,0x00000027, + 0x0000002c,0x00000028,0x0000002b,0x000300f7,0x0000002e,0x00000000,0x000400fa,0x0000002c, + 0x0000002d,0x0000002e,0x000200f8,0x0000002d,0x0004003d,0x00000006,0x0000002f,0x00000012, + 0x00050041,0x0000001b,0x00000031,0x00000019,0x00000030,0x0004003d,0x00000006,0x00000032, + 0x00000031,0x000500b1,0x00000027,0x00000033,0x0000002f,0x00000032,0x000200f9,0x0000002e, + 0x000200f8,0x0000002e,0x000700f5,0x00000027,0x00000034,0x0000002c,0x00000005,0x00000033, + 0x0000002d,0x000300f7,0x00000036,0x00000000,0x000400fa,0x00000034,0x00000035,0x00000036, + 0x000200f8,0x00000035,0x0003003e,0x00000039,0x0000003a,0x0004003d,0x00000006,0x0000003c, + 0x00000008,0x00050041,0x0000001b,0x0000003e,0x00000019,0x0000003d,0x0004003d,0x00000006, + 0x0000003f,0x0000003e,0x00050087,0x00000006,0x00000040,0x0000003c,0x0000003f,0x0003003e, + 0x0000003b,0x00000040,0x0004003d,0x00000006,0x00000042,0x00000008,0x00050041,0x0000001b, + 0x00000043,0x00000019,0x0000003d,0x0004003d,0x00000006,0x00000044,0x00000043,0x0005008b, + 0x00000006,0x00000045,0x00000042,0x00000044,0x0003003e,0x00000041,0x00000045,0x0004003d, + 0x00000006,0x00000047,0x0000003b,0x00050041,0x0000001b,0x00000049,0x00000019,0x00000048, + 0x0004003d,0x00000006,0x0000004a,0x00000049,0x00050084,0x00000006,0x0000004b,0x00000047, + 0x0000004a,0x00050041,0x0000001b,0x0000004d,0x00000019,0x0000004c,0x0004003d,0x00000006, + 0x0000004e,0x0000004d,0x00050082,0x00000006,0x0000004f,0x0000004b,0x0000004e,0x0003003e, + 0x00000046,0x0000004f,0x0004003d,0x00000006,0x00000051,0x00000041,0x00050041,0x0000001b, + 0x00000053,0x00000019,0x00000052,0x0004003d,0x00000006,0x00000054,0x00000053,0x00050084, + 0x00000006,0x00000055,0x00000051,0x00000054,0x00050041,0x0000001b,0x00000057,0x00000019, + 0x00000056,0x0004003d,0x00000006,0x00000058,0x00000057,0x00050082,0x00000006,0x00000059, + 0x00000055,0x00000058,0x0003003e,0x00000050,0x00000059,0x0004003d,0x00000006,0x0000005b, + 0x00000012,0x00050041,0x0000001b,0x0000005d,0x00000019,0x0000005c,0x0004003d,0x00000006, + 0x0000005e,0x0000005d,0x00050084,0x00000006,0x0000005f,0x0000005b,0x0000005e,0x0003003e, + 0x0000005a,0x0000005f,0x0004003d,0x00000006,0x00000061,0x00000023,0x00050041,0x0000001b, + 0x00000063,0x00000019,0x00000062,0x0004003d,0x00000006,0x00000064,0x00000063,0x00050084, + 0x00000006,0x00000065,0x00000061,0x00000064,0x00050041,0x0000001b,0x00000067,0x00000019, + 0x00000066,0x0004003d,0x00000006,0x00000068,0x00000067,0x00050084,0x00000006,0x00000069, + 0x00000065,0x00000068,0x00050041,0x0000001b,0x0000006b,0x00000019,0x0000006a,0x0004003d, + 0x00000006,0x0000006c,0x0000006b,0x00050084,0x00000006,0x0000006d,0x00000069,0x0000006c, + 0x0004003d,0x00000006,0x0000006e,0x00000046,0x00050041,0x0000001b,0x0000006f,0x00000019, + 0x00000066,0x0004003d,0x00000006,0x00000070,0x0000006f,0x00050084,0x00000006,0x00000071, + 0x0000006e,0x00000070,0x0004003d,0x00000006,0x00000072,0x00000050,0x00050080,0x00000006, + 0x00000073,0x00000071,0x00000072,0x00050080,0x00000006,0x00000074,0x0000006d,0x00000073, + 0x0003003e,0x00000060,0x00000074,0x0003003e,0x00000075,0x00000062,0x000200f9,0x00000076, + 0x000200f8,0x00000076,0x000400f6,0x00000078,0x00000079,0x00000000,0x000200f9,0x0000007a, + 0x000200f8,0x0000007a,0x0004003d,0x00000006,0x0000007b,0x00000075,0x00050041,0x0000001b, + 0x0000007c,0x00000019,0x0000006a,0x0004003d,0x00000006,0x0000007d,0x0000007c,0x000500b1, + 0x00000027,0x0000007e,0x0000007b,0x0000007d,0x000400fa,0x0000007e,0x00000077,0x00000078, + 0x000200f8,0x00000077,0x0003003e,0x0000007f,0x00000062,0x000200f9,0x00000080,0x000200f8, + 0x00000080,0x000400f6,0x00000082,0x00000083,0x00000000,0x000200f9,0x00000084,0x000200f8, + 0x00000084,0x0004003d,0x00000006,0x00000085,0x0000007f,0x00050041,0x0000001b,0x00000087, + 0x00000019,0x00000086,0x0004003d,0x00000006,0x00000088,0x00000087,0x000500b1,0x00000027, + 0x00000089,0x00000085,0x00000088,0x000400fa,0x00000089,0x00000081,0x00000082,0x000200f8, + 0x00000081,0x0003003e,0x0000008a,0x00000062,0x000200f9,0x0000008b,0x000200f8,0x0000008b, + 0x000400f6,0x0000008d,0x0000008e,0x00000000,0x000200f9,0x0000008f,0x000200f8,0x0000008f, + 0x0004003d,0x00000006,0x00000090,0x0000008a,0x00050041,0x0000001b,0x00000092,0x00000019, + 0x00000091,0x0004003d,0x00000006,0x00000093,0x00000092,0x000500b1,0x00000027,0x00000094, + 0x00000090,0x00000093,0x000400fa,0x00000094,0x0000008c,0x0000008d,0x000200f8,0x0000008c, + 0x0004003d,0x00000006,0x00000095,0x00000046,0x0004003d,0x00000006,0x00000096,0x0000007f, + 0x00050041,0x0000001b,0x00000098,0x00000019,0x00000097,0x0004003d,0x00000006,0x00000099, + 0x00000098,0x00050084,0x00000006,0x0000009a,0x00000096,0x00000099,0x00050080,0x00000006, + 0x0000009b,0x00000095,0x0000009a,0x000500af,0x00000027,0x0000009c,0x0000009b,0x00000062, + 0x000300f7,0x0000009e,0x00000000,0x000400fa,0x0000009c,0x0000009d,0x0000009e,0x000200f8, + 0x0000009d,0x0004003d,0x00000006,0x0000009f,0x00000046,0x0004003d,0x00000006,0x000000a0, + 0x0000007f,0x00050041,0x0000001b,0x000000a1,0x00000019,0x00000097,0x0004003d,0x00000006, + 0x000000a2,0x000000a1,0x00050084,0x00000006,0x000000a3,0x000000a0,0x000000a2,0x00050080, + 0x00000006,0x000000a4,0x0000009f,0x000000a3,0x00050041,0x0000001b,0x000000a5,0x00000019, + 0x00000062,0x0004003d,0x00000006,0x000000a6,0x000000a5,0x000500b1,0x00000027,0x000000a7, + 0x000000a4,0x000000a6,0x000200f9,0x0000009e,0x000200f8,0x0000009e,0x000700f5,0x00000027, + 0x000000a8,0x0000009c,0x0000008c,0x000000a7,0x0000009d,0x000300f7,0x000000aa,0x00000000, + 0x000400fa,0x000000a8,0x000000a9,0x000000aa,0x000200f8,0x000000a9,0x0004003d,0x00000006, + 0x000000ab,0x00000050,0x0004003d,0x00000006,0x000000ac,0x0000008a,0x00050041,0x0000001b, + 0x000000ae,0x00000019,0x000000ad,0x0004003d,0x00000006,0x000000af,0x000000ae,0x00050084, + 0x00000006,0x000000b0,0x000000ac,0x000000af,0x00050080,0x00000006,0x000000b1,0x000000ab, + 0x000000b0,0x000500af,0x00000027,0x000000b2,0x000000b1,0x00000062,0x000200f9,0x000000aa, + 0x000200f8,0x000000aa,0x000700f5,0x00000027,0x000000b3,0x000000a8,0x0000009e,0x000000b2, + 0x000000a9,0x000300f7,0x000000b5,0x00000000,0x000400fa,0x000000b3,0x000000b4,0x000000b5, + 0x000200f8,0x000000b4,0x0004003d,0x00000006,0x000000b6,0x00000050,0x0004003d,0x00000006, + 0x000000b7,0x0000008a,0x00050041,0x0000001b,0x000000b8,0x00000019,0x000000ad,0x0004003d, + 0x00000006,0x000000b9,0x000000b8,0x00050084,0x00000006,0x000000ba,0x000000b7,0x000000b9, + 0x00050080,0x00000006,0x000000bb,0x000000b6,0x000000ba,0x00050041,0x0000001b,0x000000bc, + 0x00000019,0x00000066,0x0004003d,0x00000006,0x000000bd,0x000000bc,0x000500b1,0x00000027, + 0x000000be,0x000000bb,0x000000bd,0x000200f9,0x000000b5,0x000200f8,0x000000b5,0x000700f5, + 0x00000027,0x000000bf,0x000000b3,0x000000aa,0x000000be,0x000000b4,0x000300f7,0x000000c1, + 0x00000000,0x000400fa,0x000000bf,0x000000c0,0x000000c1,0x000200f8,0x000000c0,0x0004003d, + 0x00000006,0x000000c6,0x00000060,0x0004003d,0x00000006,0x000000c7,0x0000008a,0x00050041, + 0x0000001b,0x000000c8,0x00000019,0x000000ad,0x0004003d,0x00000006,0x000000c9,0x000000c8, + 0x00050084,0x00000006,0x000000ca,0x000000c7,0x000000c9,0x00050080,0x00000006,0x000000cb, + 0x000000c6,0x000000ca,0x00060041,0x000000cc,0x000000cd,0x000000c5,0x00000062,0x000000cb, + 0x0004003d,0x00000037,0x000000ce,0x000000cd,0x0004003d,0x00000006,0x000000d3,0x0000005a, + 0x0004003d,0x00000006,0x000000d4,0x0000008a,0x00050080,0x00000006,0x000000d5,0x000000d3, + 0x000000d4,0x00060041,0x000000cc,0x000000d6,0x000000d2,0x00000062,0x000000d5,0x0004003d, + 0x00000037,0x000000d7,0x000000d6,0x00050085,0x00000037,0x000000d8,0x000000ce,0x000000d7, + 0x0004003d,0x00000037,0x000000d9,0x00000039,0x00050081,0x00000037,0x000000da,0x000000d9, + 0x000000d8,0x0003003e,0x00000039,0x000000da,0x000200f9,0x000000c1,0x000200f8,0x000000c1, + 0x000200f9,0x0000008e,0x000200f8,0x0000008e,0x0004003d,0x00000006,0x000000db,0x0000008a, + 0x00050080,0x00000006,0x000000dc,0x000000db,0x00000066,0x0003003e,0x0000008a,0x000000dc, + 0x000200f9,0x0000008b,0x000200f8,0x0000008d,0x00050041,0x0000001b,0x000000dd,0x00000019, + 0x00000066,0x0004003d,0x00000006,0x000000de,0x000000dd,0x00050041,0x0000001b,0x000000df, + 0x00000019,0x00000097,0x0004003d,0x00000006,0x000000e0,0x000000df,0x00050084,0x00000006, + 0x000000e1,0x000000de,0x000000e0,0x0004003d,0x00000006,0x000000e2,0x00000060,0x00050080, + 0x00000006,0x000000e3,0x000000e2,0x000000e1,0x0003003e,0x00000060,0x000000e3,0x00050041, + 0x0000001b,0x000000e4,0x00000019,0x00000091,0x0004003d,0x00000006,0x000000e5,0x000000e4, + 0x0004003d,0x00000006,0x000000e6,0x0000005a,0x00050080,0x00000006,0x000000e7,0x000000e6, + 0x000000e5,0x0003003e,0x0000005a,0x000000e7,0x000200f9,0x00000083,0x000200f8,0x00000083, + 0x0004003d,0x00000006,0x000000e8,0x0000007f,0x00050080,0x00000006,0x000000e9,0x000000e8, + 0x00000066,0x0003003e,0x0000007f,0x000000e9,0x000200f9,0x00000080,0x000200f8,0x00000082, + 0x00050041,0x0000001b,0x000000ea,0x00000019,0x00000062,0x0004003d,0x00000006,0x000000eb, + 0x000000ea,0x00050041,0x0000001b,0x000000ec,0x00000019,0x00000066,0x0004003d,0x00000006, + 0x000000ed,0x000000ec,0x00050084,0x00000006,0x000000ee,0x000000eb,0x000000ed,0x00050041, + 0x0000001b,0x000000ef,0x00000019,0x00000066,0x0004003d,0x00000006,0x000000f0,0x000000ef, + 0x00050041,0x0000001b,0x000000f1,0x00000019,0x00000086,0x0004003d,0x00000006,0x000000f2, + 0x000000f1,0x00050084,0x00000006,0x000000f3,0x000000f0,0x000000f2,0x00050041,0x0000001b, + 0x000000f4,0x00000019,0x00000097,0x0004003d,0x00000006,0x000000f5,0x000000f4,0x00050084, + 0x00000006,0x000000f6,0x000000f3,0x000000f5,0x00050082,0x00000006,0x000000f7,0x000000ee, + 0x000000f6,0x0004003d,0x00000006,0x000000f8,0x00000060,0x00050080,0x00000006,0x000000f9, + 0x000000f8,0x000000f7,0x0003003e,0x00000060,0x000000f9,0x000200f9,0x00000079,0x000200f8, + 0x00000079,0x0004003d,0x00000006,0x000000fa,0x00000075,0x00050080,0x00000006,0x000000fb, + 0x000000fa,0x00000066,0x0003003e,0x00000075,0x000000fb,0x000200f9,0x00000076,0x000200f8, + 0x00000078,0x0004003d,0x00000006,0x000000fd,0x00000023,0x00050041,0x0000001b,0x000000fe, + 0x00000019,0x00000029,0x0004003d,0x00000006,0x000000ff,0x000000fe,0x00050084,0x00000006, + 0x00000100,0x000000fd,0x000000ff,0x00050041,0x0000001b,0x00000101,0x00000019,0x00000030, + 0x0004003d,0x00000006,0x00000102,0x00000101,0x00050084,0x00000006,0x00000103,0x00000100, + 0x00000102,0x0004003d,0x00000006,0x00000104,0x00000008,0x00050080,0x00000006,0x00000105, + 0x00000103,0x00000104,0x0004003d,0x00000006,0x00000106,0x00000012,0x00050041,0x0000001b, + 0x00000107,0x00000019,0x00000029,0x0004003d,0x00000006,0x00000108,0x00000107,0x00050084, + 0x00000006,0x00000109,0x00000106,0x00000108,0x00050080,0x00000006,0x0000010a,0x00000105, + 0x00000109,0x0003003e,0x000000fc,0x0000010a,0x00050041,0x0000001b,0x0000010c,0x00000019, + 0x0000010b,0x0004003d,0x00000006,0x0000010d,0x0000010c,0x000500aa,0x00000027,0x0000010e, + 0x0000010d,0x00000066,0x000300f7,0x00000110,0x00000000,0x000400fa,0x0000010e,0x0000010f, + 0x00000110,0x000200f8,0x0000010f,0x0004003d,0x00000006,0x00000115,0x00000012,0x00060041, + 0x000000cc,0x00000116,0x00000114,0x00000062,0x00000115,0x0004003d,0x00000037,0x00000117, + 0x00000116,0x0004003d,0x00000037,0x00000118,0x00000039,0x00050081,0x00000037,0x00000119, + 0x00000118,0x00000117,0x0003003e,0x00000039,0x00000119,0x000200f9,0x00000110,0x000200f8, + 0x00000110,0x0004003d,0x00000006,0x0000011e,0x000000fc,0x0004003d,0x00000037,0x0000011f, + 0x00000039,0x00060041,0x000000cc,0x00000120,0x0000011d,0x00000062,0x0000011e,0x0003003e, + 0x00000120,0x0000011f,0x000200f9,0x00000036,0x000200f8,0x00000036,0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/dw_conv.comp b/modules/dnn/src/webgpu/shader/dw_conv.comp new file mode 100644 index 000000000000..a92cf56f172f --- /dev/null +++ b/modules/dnn/src/webgpu/shader/dw_conv.comp @@ -0,0 +1,77 @@ +#version 450 +#define LOCAL_SZ_X 256 + +layout(binding = 0) buffer Input0{ + float in_buffer[]; +}; +layout(binding = 1) buffer Input1 { + float bias_data[]; +}; +layout(binding = 2) buffer Input3{ + float weight_data[]; +}; +layout(binding = 3) buffer Output{ + float out_buffer[]; +}; +layout(binding = 4) uniform pushBlock { + int in_h; + int in_w; + int out_h; + int out_w; + int stride_h; + int stride_w; + int pad_h; + int pad_w; + int filter_h; + int filter_w; + int dilation_h; + int dilation_w; + int channels; + int batch; + int has_bias; + int M; + int K; + int N; + int basic_shader_batch_idx; + int basic_shader_partition_idx; + int basic_shader_partition_size; +} p; +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; + +/* + Each work item compute one output cell +*/ +void main() +{ + int gx = int(gl_GlobalInvocationID.x); + int gy = int(gl_GlobalInvocationID.y); + int gz = int(gl_GlobalInvocationID.z); + if(gx < p.out_w && gy < p.out_h && gz < p.channels) + { + float sum = 0.0f; + + int org_y = gy * p.stride_h - p.pad_h; + int org_x = gx * p.stride_w - p.pad_w; + + int weight_off = gz * p.filter_h * p.filter_w; + int input_off = (p.basic_shader_batch_idx * p.channels + gz) * p.in_h * p.in_w + org_y * p.in_w + org_x; + for(int y = 0; y < p.filter_h; y++) + { + for(int x = 0; x < p.filter_w; x++) + { + if(org_y + y * p.dilation_h >= 0 && org_y + y * p.dilation_h < p.in_h && org_x + x * p.dilation_w >= 0 && org_x + x * p.dilation_w < p.in_w) + { + sum += in_buffer[input_off + x * p.dilation_w] * weight_data[weight_off + x]; + } + } + weight_off += p.filter_w; + input_off += p.in_w * p.dilation_h; + } + + int offset = (p.basic_shader_batch_idx * p.channels + gz) * p.out_h * p.out_w + gy * p.out_w + gx; + if (p.has_bias == 1) + out_buffer[offset] = sum + bias_data[gz]; + else + out_buffer[offset] = sum; + } +} diff --git a/modules/dnn/src/webgpu/shader/dw_conv_spv.cpp b/modules/dnn/src/webgpu/shader/dw_conv_spv.cpp new file mode 100644 index 000000000000..000488acd92e --- /dev/null +++ b/modules/dnn/src/webgpu/shader/dw_conv_spv.cpp @@ -0,0 +1,235 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int dw_conv_spv[1754] = { + 0x07230203,0x00010000,0x00080009,0x0000010b,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00060010,0x00000004, + 0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, + 0x00000004,0x6e69616d,0x00000000,0x00030005,0x00000008,0x00007867,0x00080005,0x0000000c, + 0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00030005,0x00000012, + 0x00007967,0x00030005,0x00000017,0x00007a67,0x00050005,0x0000001e,0x68737570,0x636f6c42, + 0x0000006b,0x00050006,0x0000001e,0x00000000,0x685f6e69,0x00000000,0x00050006,0x0000001e, + 0x00000001,0x775f6e69,0x00000000,0x00050006,0x0000001e,0x00000002,0x5f74756f,0x00000068, + 0x00050006,0x0000001e,0x00000003,0x5f74756f,0x00000077,0x00060006,0x0000001e,0x00000004, + 0x69727473,0x685f6564,0x00000000,0x00060006,0x0000001e,0x00000005,0x69727473,0x775f6564, + 0x00000000,0x00050006,0x0000001e,0x00000006,0x5f646170,0x00000068,0x00050006,0x0000001e, + 0x00000007,0x5f646170,0x00000077,0x00060006,0x0000001e,0x00000008,0x746c6966,0x685f7265, + 0x00000000,0x00060006,0x0000001e,0x00000009,0x746c6966,0x775f7265,0x00000000,0x00060006, + 0x0000001e,0x0000000a,0x616c6964,0x6e6f6974,0x0000685f,0x00060006,0x0000001e,0x0000000b, + 0x616c6964,0x6e6f6974,0x0000775f,0x00060006,0x0000001e,0x0000000c,0x6e616863,0x736c656e, + 0x00000000,0x00050006,0x0000001e,0x0000000d,0x63746162,0x00000068,0x00060006,0x0000001e, + 0x0000000e,0x5f736168,0x73616962,0x00000000,0x00040006,0x0000001e,0x0000000f,0x0000004d, + 0x00040006,0x0000001e,0x00000010,0x0000004b,0x00040006,0x0000001e,0x00000011,0x0000004e, + 0x00090006,0x0000001e,0x00000012,0x69736162,0x68735f63,0x72656461,0x7461625f,0x695f6863, + 0x00007864,0x000a0006,0x0000001e,0x00000013,0x69736162,0x68735f63,0x72656461,0x7261705f, + 0x69746974,0x695f6e6f,0x00007864,0x000a0006,0x0000001e,0x00000014,0x69736162,0x68735f63, + 0x72656461,0x7261705f,0x69746974,0x735f6e6f,0x00657a69,0x00030005,0x00000020,0x00000070, + 0x00030005,0x0000003a,0x006d7573,0x00040005,0x0000003c,0x5f67726f,0x00000079,0x00040005, + 0x00000046,0x5f67726f,0x00000078,0x00050005,0x00000050,0x67696577,0x6f5f7468,0x00006666, + 0x00050005,0x0000005a,0x75706e69,0x666f5f74,0x00000066,0x00030005,0x00000072,0x00000079, + 0x00030005,0x0000007c,0x00000078,0x00040005,0x000000b4,0x75706e49,0x00003074,0x00060006, + 0x000000b4,0x00000000,0x625f6e69,0x65666675,0x00000072,0x00030005,0x000000b6,0x00000000, + 0x00040005,0x000000c1,0x75706e49,0x00003374,0x00060006,0x000000c1,0x00000000,0x67696577, + 0x645f7468,0x00617461,0x00030005,0x000000c3,0x00000000,0x00040005,0x000000db,0x7366666f, + 0x00007465,0x00040005,0x000000f7,0x7074754f,0x00007475,0x00060006,0x000000f7,0x00000000, + 0x5f74756f,0x66667562,0x00007265,0x00030005,0x000000f9,0x00000000,0x00040005,0x000000fd, + 0x75706e49,0x00003174,0x00060006,0x000000fd,0x00000000,0x73616962,0x7461645f,0x00000061, + 0x00030005,0x000000ff,0x00000000,0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00050048, + 0x0000001e,0x00000000,0x00000023,0x00000000,0x00050048,0x0000001e,0x00000001,0x00000023, + 0x00000004,0x00050048,0x0000001e,0x00000002,0x00000023,0x00000008,0x00050048,0x0000001e, + 0x00000003,0x00000023,0x0000000c,0x00050048,0x0000001e,0x00000004,0x00000023,0x00000010, + 0x00050048,0x0000001e,0x00000005,0x00000023,0x00000014,0x00050048,0x0000001e,0x00000006, + 0x00000023,0x00000018,0x00050048,0x0000001e,0x00000007,0x00000023,0x0000001c,0x00050048, + 0x0000001e,0x00000008,0x00000023,0x00000020,0x00050048,0x0000001e,0x00000009,0x00000023, + 0x00000024,0x00050048,0x0000001e,0x0000000a,0x00000023,0x00000028,0x00050048,0x0000001e, + 0x0000000b,0x00000023,0x0000002c,0x00050048,0x0000001e,0x0000000c,0x00000023,0x00000030, + 0x00050048,0x0000001e,0x0000000d,0x00000023,0x00000034,0x00050048,0x0000001e,0x0000000e, + 0x00000023,0x00000038,0x00050048,0x0000001e,0x0000000f,0x00000023,0x0000003c,0x00050048, + 0x0000001e,0x00000010,0x00000023,0x00000040,0x00050048,0x0000001e,0x00000011,0x00000023, + 0x00000044,0x00050048,0x0000001e,0x00000012,0x00000023,0x00000048,0x00050048,0x0000001e, + 0x00000013,0x00000023,0x0000004c,0x00050048,0x0000001e,0x00000014,0x00000023,0x00000050, + 0x00030047,0x0000001e,0x00000002,0x00040047,0x00000020,0x00000022,0x00000000,0x00040047, + 0x00000020,0x00000021,0x00000004,0x00040047,0x000000b3,0x00000006,0x00000004,0x00050048, + 0x000000b4,0x00000000,0x00000023,0x00000000,0x00030047,0x000000b4,0x00000003,0x00040047, + 0x000000b6,0x00000022,0x00000000,0x00040047,0x000000b6,0x00000021,0x00000000,0x00040047, + 0x000000c0,0x00000006,0x00000004,0x00050048,0x000000c1,0x00000000,0x00000023,0x00000000, + 0x00030047,0x000000c1,0x00000003,0x00040047,0x000000c3,0x00000022,0x00000000,0x00040047, + 0x000000c3,0x00000021,0x00000002,0x00040047,0x000000f6,0x00000006,0x00000004,0x00050048, + 0x000000f7,0x00000000,0x00000023,0x00000000,0x00030047,0x000000f7,0x00000003,0x00040047, + 0x000000f9,0x00000022,0x00000000,0x00040047,0x000000f9,0x00000021,0x00000003,0x00040047, + 0x000000fc,0x00000006,0x00000004,0x00050048,0x000000fd,0x00000000,0x00000023,0x00000000, + 0x00030047,0x000000fd,0x00000003,0x00040047,0x000000ff,0x00000022,0x00000000,0x00040047, + 0x000000ff,0x00000021,0x00000001,0x00040047,0x0000010a,0x0000000b,0x00000019,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000001, + 0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020,0x00000000, + 0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a, + 0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000, + 0x00040020,0x0000000e,0x00000001,0x00000009,0x0004002b,0x00000009,0x00000013,0x00000001, + 0x0004002b,0x00000009,0x00000018,0x00000002,0x00020014,0x0000001c,0x0017001e,0x0000001e, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x0000001f,0x00000002, + 0x0000001e,0x0004003b,0x0000001f,0x00000020,0x00000002,0x0004002b,0x00000006,0x00000021, + 0x00000003,0x00040020,0x00000022,0x00000002,0x00000006,0x0004002b,0x00000006,0x00000029, + 0x00000002,0x0004002b,0x00000006,0x00000031,0x0000000c,0x00030016,0x00000038,0x00000020, + 0x00040020,0x00000039,0x00000007,0x00000038,0x0004002b,0x00000038,0x0000003b,0x00000000, + 0x0004002b,0x00000006,0x0000003e,0x00000004,0x0004002b,0x00000006,0x00000042,0x00000006, + 0x0004002b,0x00000006,0x00000048,0x00000005,0x0004002b,0x00000006,0x0000004c,0x00000007, + 0x0004002b,0x00000006,0x00000052,0x00000008,0x0004002b,0x00000006,0x00000056,0x00000009, + 0x0004002b,0x00000006,0x0000005b,0x00000012,0x0004002b,0x00000006,0x00000063,0x00000000, + 0x0004002b,0x00000006,0x00000067,0x00000001,0x0004002b,0x00000006,0x00000088,0x0000000a, + 0x0004002b,0x00000006,0x0000009e,0x0000000b,0x0003001d,0x000000b3,0x00000038,0x0003001e, + 0x000000b4,0x000000b3,0x00040020,0x000000b5,0x00000002,0x000000b4,0x0004003b,0x000000b5, + 0x000000b6,0x00000002,0x00040020,0x000000bd,0x00000002,0x00000038,0x0003001d,0x000000c0, + 0x00000038,0x0003001e,0x000000c1,0x000000c0,0x00040020,0x000000c2,0x00000002,0x000000c1, + 0x0004003b,0x000000c2,0x000000c3,0x00000002,0x0004002b,0x00000006,0x000000f0,0x0000000e, + 0x0003001d,0x000000f6,0x00000038,0x0003001e,0x000000f7,0x000000f6,0x00040020,0x000000f8, + 0x00000002,0x000000f7,0x0004003b,0x000000f8,0x000000f9,0x00000002,0x0003001d,0x000000fc, + 0x00000038,0x0003001e,0x000000fd,0x000000fc,0x00040020,0x000000fe,0x00000002,0x000000fd, + 0x0004003b,0x000000fe,0x000000ff,0x00000002,0x0004002b,0x00000009,0x00000109,0x00000100, + 0x0006002c,0x0000000a,0x0000010a,0x00000109,0x00000013,0x00000013,0x00050036,0x00000002, + 0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008, + 0x00000007,0x0004003b,0x00000007,0x00000012,0x00000007,0x0004003b,0x00000007,0x00000017, + 0x00000007,0x0004003b,0x00000039,0x0000003a,0x00000007,0x0004003b,0x00000007,0x0000003c, + 0x00000007,0x0004003b,0x00000007,0x00000046,0x00000007,0x0004003b,0x00000007,0x00000050, + 0x00000007,0x0004003b,0x00000007,0x0000005a,0x00000007,0x0004003b,0x00000007,0x00000072, + 0x00000007,0x0004003b,0x00000007,0x0000007c,0x00000007,0x0004003b,0x00000007,0x000000db, + 0x00000007,0x00050041,0x0000000e,0x0000000f,0x0000000c,0x0000000d,0x0004003d,0x00000009, + 0x00000010,0x0000000f,0x0004007c,0x00000006,0x00000011,0x00000010,0x0003003e,0x00000008, + 0x00000011,0x00050041,0x0000000e,0x00000014,0x0000000c,0x00000013,0x0004003d,0x00000009, + 0x00000015,0x00000014,0x0004007c,0x00000006,0x00000016,0x00000015,0x0003003e,0x00000012, + 0x00000016,0x00050041,0x0000000e,0x00000019,0x0000000c,0x00000018,0x0004003d,0x00000009, + 0x0000001a,0x00000019,0x0004007c,0x00000006,0x0000001b,0x0000001a,0x0003003e,0x00000017, + 0x0000001b,0x0004003d,0x00000006,0x0000001d,0x00000008,0x00050041,0x00000022,0x00000023, + 0x00000020,0x00000021,0x0004003d,0x00000006,0x00000024,0x00000023,0x000500b1,0x0000001c, + 0x00000025,0x0000001d,0x00000024,0x000300f7,0x00000027,0x00000000,0x000400fa,0x00000025, + 0x00000026,0x00000027,0x000200f8,0x00000026,0x0004003d,0x00000006,0x00000028,0x00000012, + 0x00050041,0x00000022,0x0000002a,0x00000020,0x00000029,0x0004003d,0x00000006,0x0000002b, + 0x0000002a,0x000500b1,0x0000001c,0x0000002c,0x00000028,0x0000002b,0x000200f9,0x00000027, + 0x000200f8,0x00000027,0x000700f5,0x0000001c,0x0000002d,0x00000025,0x00000005,0x0000002c, + 0x00000026,0x000300f7,0x0000002f,0x00000000,0x000400fa,0x0000002d,0x0000002e,0x0000002f, + 0x000200f8,0x0000002e,0x0004003d,0x00000006,0x00000030,0x00000017,0x00050041,0x00000022, + 0x00000032,0x00000020,0x00000031,0x0004003d,0x00000006,0x00000033,0x00000032,0x000500b1, + 0x0000001c,0x00000034,0x00000030,0x00000033,0x000200f9,0x0000002f,0x000200f8,0x0000002f, + 0x000700f5,0x0000001c,0x00000035,0x0000002d,0x00000027,0x00000034,0x0000002e,0x000300f7, + 0x00000037,0x00000000,0x000400fa,0x00000035,0x00000036,0x00000037,0x000200f8,0x00000036, + 0x0003003e,0x0000003a,0x0000003b,0x0004003d,0x00000006,0x0000003d,0x00000012,0x00050041, + 0x00000022,0x0000003f,0x00000020,0x0000003e,0x0004003d,0x00000006,0x00000040,0x0000003f, + 0x00050084,0x00000006,0x00000041,0x0000003d,0x00000040,0x00050041,0x00000022,0x00000043, + 0x00000020,0x00000042,0x0004003d,0x00000006,0x00000044,0x00000043,0x00050082,0x00000006, + 0x00000045,0x00000041,0x00000044,0x0003003e,0x0000003c,0x00000045,0x0004003d,0x00000006, + 0x00000047,0x00000008,0x00050041,0x00000022,0x00000049,0x00000020,0x00000048,0x0004003d, + 0x00000006,0x0000004a,0x00000049,0x00050084,0x00000006,0x0000004b,0x00000047,0x0000004a, + 0x00050041,0x00000022,0x0000004d,0x00000020,0x0000004c,0x0004003d,0x00000006,0x0000004e, + 0x0000004d,0x00050082,0x00000006,0x0000004f,0x0000004b,0x0000004e,0x0003003e,0x00000046, + 0x0000004f,0x0004003d,0x00000006,0x00000051,0x00000017,0x00050041,0x00000022,0x00000053, + 0x00000020,0x00000052,0x0004003d,0x00000006,0x00000054,0x00000053,0x00050084,0x00000006, + 0x00000055,0x00000051,0x00000054,0x00050041,0x00000022,0x00000057,0x00000020,0x00000056, + 0x0004003d,0x00000006,0x00000058,0x00000057,0x00050084,0x00000006,0x00000059,0x00000055, + 0x00000058,0x0003003e,0x00000050,0x00000059,0x00050041,0x00000022,0x0000005c,0x00000020, + 0x0000005b,0x0004003d,0x00000006,0x0000005d,0x0000005c,0x00050041,0x00000022,0x0000005e, + 0x00000020,0x00000031,0x0004003d,0x00000006,0x0000005f,0x0000005e,0x00050084,0x00000006, + 0x00000060,0x0000005d,0x0000005f,0x0004003d,0x00000006,0x00000061,0x00000017,0x00050080, + 0x00000006,0x00000062,0x00000060,0x00000061,0x00050041,0x00000022,0x00000064,0x00000020, + 0x00000063,0x0004003d,0x00000006,0x00000065,0x00000064,0x00050084,0x00000006,0x00000066, + 0x00000062,0x00000065,0x00050041,0x00000022,0x00000068,0x00000020,0x00000067,0x0004003d, + 0x00000006,0x00000069,0x00000068,0x00050084,0x00000006,0x0000006a,0x00000066,0x00000069, + 0x0004003d,0x00000006,0x0000006b,0x0000003c,0x00050041,0x00000022,0x0000006c,0x00000020, + 0x00000067,0x0004003d,0x00000006,0x0000006d,0x0000006c,0x00050084,0x00000006,0x0000006e, + 0x0000006b,0x0000006d,0x00050080,0x00000006,0x0000006f,0x0000006a,0x0000006e,0x0004003d, + 0x00000006,0x00000070,0x00000046,0x00050080,0x00000006,0x00000071,0x0000006f,0x00000070, + 0x0003003e,0x0000005a,0x00000071,0x0003003e,0x00000072,0x00000063,0x000200f9,0x00000073, + 0x000200f8,0x00000073,0x000400f6,0x00000075,0x00000076,0x00000000,0x000200f9,0x00000077, + 0x000200f8,0x00000077,0x0004003d,0x00000006,0x00000078,0x00000072,0x00050041,0x00000022, + 0x00000079,0x00000020,0x00000052,0x0004003d,0x00000006,0x0000007a,0x00000079,0x000500b1, + 0x0000001c,0x0000007b,0x00000078,0x0000007a,0x000400fa,0x0000007b,0x00000074,0x00000075, + 0x000200f8,0x00000074,0x0003003e,0x0000007c,0x00000063,0x000200f9,0x0000007d,0x000200f8, + 0x0000007d,0x000400f6,0x0000007f,0x00000080,0x00000000,0x000200f9,0x00000081,0x000200f8, + 0x00000081,0x0004003d,0x00000006,0x00000082,0x0000007c,0x00050041,0x00000022,0x00000083, + 0x00000020,0x00000056,0x0004003d,0x00000006,0x00000084,0x00000083,0x000500b1,0x0000001c, + 0x00000085,0x00000082,0x00000084,0x000400fa,0x00000085,0x0000007e,0x0000007f,0x000200f8, + 0x0000007e,0x0004003d,0x00000006,0x00000086,0x0000003c,0x0004003d,0x00000006,0x00000087, + 0x00000072,0x00050041,0x00000022,0x00000089,0x00000020,0x00000088,0x0004003d,0x00000006, + 0x0000008a,0x00000089,0x00050084,0x00000006,0x0000008b,0x00000087,0x0000008a,0x00050080, + 0x00000006,0x0000008c,0x00000086,0x0000008b,0x000500af,0x0000001c,0x0000008d,0x0000008c, + 0x00000063,0x000300f7,0x0000008f,0x00000000,0x000400fa,0x0000008d,0x0000008e,0x0000008f, + 0x000200f8,0x0000008e,0x0004003d,0x00000006,0x00000090,0x0000003c,0x0004003d,0x00000006, + 0x00000091,0x00000072,0x00050041,0x00000022,0x00000092,0x00000020,0x00000088,0x0004003d, + 0x00000006,0x00000093,0x00000092,0x00050084,0x00000006,0x00000094,0x00000091,0x00000093, + 0x00050080,0x00000006,0x00000095,0x00000090,0x00000094,0x00050041,0x00000022,0x00000096, + 0x00000020,0x00000063,0x0004003d,0x00000006,0x00000097,0x00000096,0x000500b1,0x0000001c, + 0x00000098,0x00000095,0x00000097,0x000200f9,0x0000008f,0x000200f8,0x0000008f,0x000700f5, + 0x0000001c,0x00000099,0x0000008d,0x0000007e,0x00000098,0x0000008e,0x000300f7,0x0000009b, + 0x00000000,0x000400fa,0x00000099,0x0000009a,0x0000009b,0x000200f8,0x0000009a,0x0004003d, + 0x00000006,0x0000009c,0x00000046,0x0004003d,0x00000006,0x0000009d,0x0000007c,0x00050041, + 0x00000022,0x0000009f,0x00000020,0x0000009e,0x0004003d,0x00000006,0x000000a0,0x0000009f, + 0x00050084,0x00000006,0x000000a1,0x0000009d,0x000000a0,0x00050080,0x00000006,0x000000a2, + 0x0000009c,0x000000a1,0x000500af,0x0000001c,0x000000a3,0x000000a2,0x00000063,0x000200f9, + 0x0000009b,0x000200f8,0x0000009b,0x000700f5,0x0000001c,0x000000a4,0x00000099,0x0000008f, + 0x000000a3,0x0000009a,0x000300f7,0x000000a6,0x00000000,0x000400fa,0x000000a4,0x000000a5, + 0x000000a6,0x000200f8,0x000000a5,0x0004003d,0x00000006,0x000000a7,0x00000046,0x0004003d, + 0x00000006,0x000000a8,0x0000007c,0x00050041,0x00000022,0x000000a9,0x00000020,0x0000009e, + 0x0004003d,0x00000006,0x000000aa,0x000000a9,0x00050084,0x00000006,0x000000ab,0x000000a8, + 0x000000aa,0x00050080,0x00000006,0x000000ac,0x000000a7,0x000000ab,0x00050041,0x00000022, + 0x000000ad,0x00000020,0x00000067,0x0004003d,0x00000006,0x000000ae,0x000000ad,0x000500b1, + 0x0000001c,0x000000af,0x000000ac,0x000000ae,0x000200f9,0x000000a6,0x000200f8,0x000000a6, + 0x000700f5,0x0000001c,0x000000b0,0x000000a4,0x0000009b,0x000000af,0x000000a5,0x000300f7, + 0x000000b2,0x00000000,0x000400fa,0x000000b0,0x000000b1,0x000000b2,0x000200f8,0x000000b1, + 0x0004003d,0x00000006,0x000000b7,0x0000005a,0x0004003d,0x00000006,0x000000b8,0x0000007c, + 0x00050041,0x00000022,0x000000b9,0x00000020,0x0000009e,0x0004003d,0x00000006,0x000000ba, + 0x000000b9,0x00050084,0x00000006,0x000000bb,0x000000b8,0x000000ba,0x00050080,0x00000006, + 0x000000bc,0x000000b7,0x000000bb,0x00060041,0x000000bd,0x000000be,0x000000b6,0x00000063, + 0x000000bc,0x0004003d,0x00000038,0x000000bf,0x000000be,0x0004003d,0x00000006,0x000000c4, + 0x00000050,0x0004003d,0x00000006,0x000000c5,0x0000007c,0x00050080,0x00000006,0x000000c6, + 0x000000c4,0x000000c5,0x00060041,0x000000bd,0x000000c7,0x000000c3,0x00000063,0x000000c6, + 0x0004003d,0x00000038,0x000000c8,0x000000c7,0x00050085,0x00000038,0x000000c9,0x000000bf, + 0x000000c8,0x0004003d,0x00000038,0x000000ca,0x0000003a,0x00050081,0x00000038,0x000000cb, + 0x000000ca,0x000000c9,0x0003003e,0x0000003a,0x000000cb,0x000200f9,0x000000b2,0x000200f8, + 0x000000b2,0x000200f9,0x00000080,0x000200f8,0x00000080,0x0004003d,0x00000006,0x000000cc, + 0x0000007c,0x00050080,0x00000006,0x000000cd,0x000000cc,0x00000067,0x0003003e,0x0000007c, + 0x000000cd,0x000200f9,0x0000007d,0x000200f8,0x0000007f,0x00050041,0x00000022,0x000000ce, + 0x00000020,0x00000056,0x0004003d,0x00000006,0x000000cf,0x000000ce,0x0004003d,0x00000006, + 0x000000d0,0x00000050,0x00050080,0x00000006,0x000000d1,0x000000d0,0x000000cf,0x0003003e, + 0x00000050,0x000000d1,0x00050041,0x00000022,0x000000d2,0x00000020,0x00000067,0x0004003d, + 0x00000006,0x000000d3,0x000000d2,0x00050041,0x00000022,0x000000d4,0x00000020,0x00000088, + 0x0004003d,0x00000006,0x000000d5,0x000000d4,0x00050084,0x00000006,0x000000d6,0x000000d3, + 0x000000d5,0x0004003d,0x00000006,0x000000d7,0x0000005a,0x00050080,0x00000006,0x000000d8, + 0x000000d7,0x000000d6,0x0003003e,0x0000005a,0x000000d8,0x000200f9,0x00000076,0x000200f8, + 0x00000076,0x0004003d,0x00000006,0x000000d9,0x00000072,0x00050080,0x00000006,0x000000da, + 0x000000d9,0x00000067,0x0003003e,0x00000072,0x000000da,0x000200f9,0x00000073,0x000200f8, + 0x00000075,0x00050041,0x00000022,0x000000dc,0x00000020,0x0000005b,0x0004003d,0x00000006, + 0x000000dd,0x000000dc,0x00050041,0x00000022,0x000000de,0x00000020,0x00000031,0x0004003d, + 0x00000006,0x000000df,0x000000de,0x00050084,0x00000006,0x000000e0,0x000000dd,0x000000df, + 0x0004003d,0x00000006,0x000000e1,0x00000017,0x00050080,0x00000006,0x000000e2,0x000000e0, + 0x000000e1,0x00050041,0x00000022,0x000000e3,0x00000020,0x00000029,0x0004003d,0x00000006, + 0x000000e4,0x000000e3,0x00050084,0x00000006,0x000000e5,0x000000e2,0x000000e4,0x00050041, + 0x00000022,0x000000e6,0x00000020,0x00000021,0x0004003d,0x00000006,0x000000e7,0x000000e6, + 0x00050084,0x00000006,0x000000e8,0x000000e5,0x000000e7,0x0004003d,0x00000006,0x000000e9, + 0x00000012,0x00050041,0x00000022,0x000000ea,0x00000020,0x00000021,0x0004003d,0x00000006, + 0x000000eb,0x000000ea,0x00050084,0x00000006,0x000000ec,0x000000e9,0x000000eb,0x00050080, + 0x00000006,0x000000ed,0x000000e8,0x000000ec,0x0004003d,0x00000006,0x000000ee,0x00000008, + 0x00050080,0x00000006,0x000000ef,0x000000ed,0x000000ee,0x0003003e,0x000000db,0x000000ef, + 0x00050041,0x00000022,0x000000f1,0x00000020,0x000000f0,0x0004003d,0x00000006,0x000000f2, + 0x000000f1,0x000500aa,0x0000001c,0x000000f3,0x000000f2,0x00000067,0x000300f7,0x000000f5, + 0x00000000,0x000400fa,0x000000f3,0x000000f4,0x00000105,0x000200f8,0x000000f4,0x0004003d, + 0x00000006,0x000000fa,0x000000db,0x0004003d,0x00000038,0x000000fb,0x0000003a,0x0004003d, + 0x00000006,0x00000100,0x00000017,0x00060041,0x000000bd,0x00000101,0x000000ff,0x00000063, + 0x00000100,0x0004003d,0x00000038,0x00000102,0x00000101,0x00050081,0x00000038,0x00000103, + 0x000000fb,0x00000102,0x00060041,0x000000bd,0x00000104,0x000000f9,0x00000063,0x000000fa, + 0x0003003e,0x00000104,0x00000103,0x000200f9,0x000000f5,0x000200f8,0x00000105,0x0004003d, + 0x00000006,0x00000106,0x000000db,0x0004003d,0x00000038,0x00000107,0x0000003a,0x00060041, + 0x000000bd,0x00000108,0x000000f9,0x00000063,0x00000106,0x0003003e,0x00000108,0x00000107, + 0x000200f9,0x000000f5,0x000200f8,0x000000f5,0x000200f9,0x00000037,0x000200f8,0x00000037, + 0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/lrn.comp b/modules/dnn/src/webgpu/shader/lrn.comp new file mode 100644 index 000000000000..3980638e33d5 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/lrn.comp @@ -0,0 +1,62 @@ +#version 450 +#define LOCAL_SZ_X 256 +layout(binding = 0) buffer Input0{ + float in_buffer[]; +}; +layout(binding = 1) buffer Output{ + float dst_buffer[]; +}; +layout(binding = 2) uniform pushBlock { + int thread_num; + int channels; + int height; + int width; + int filter_len; + int radius; + float alpha; + float bias; + float negative_beta; +} p; +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; +void main() +{ + int gid = int(gl_GlobalInvocationID.x); + int gsz = int(gl_NumWorkGroups.x * gl_WorkGroupSize.x); + for (int index = gid; index < p.thread_num; index += gsz) + { + int x = index % p.width; + int y = (index / p.width) % p.height; + int b = index / (p.width * p.height); + int offset = b * p.channels * p.height * p.width + y * p.width + x; + int channel_off = p.height * p.width; + float scale_val; + int head = 0; + float accum_scale = 0.0f; + int min_val = p.radius < p.channels ? p.radius : p.channels; + while (head < min_val) { + accum_scale += in_buffer[offset + head * channel_off] * in_buffer[offset + head * channel_off]; + ++head; + } + while (head < p.channels) { + accum_scale += in_buffer[offset + head * channel_off] * in_buffer[offset + head * channel_off]; + if (head - p.filter_len >= 0) { + accum_scale -= in_buffer[offset + (head - p.filter_len) * channel_off] + * in_buffer[offset + (head - p.filter_len) * channel_off]; + } + scale_val = p.bias + accum_scale * p.alpha; + dst_buffer[offset + (head - p.radius) * channel_off] = in_buffer[offset + (head - p.radius) * channel_off] * pow(scale_val, p.negative_beta); + ++head; + } + int pos = head - min_val; + while (pos >= 0 && pos < p.channels) { + if (head - p.filter_len >= 0) { + accum_scale -= in_buffer[offset + (head - p.filter_len) * channel_off] + * in_buffer[offset + (head - p.filter_len) * channel_off]; + } + scale_val = p.bias + accum_scale * p.alpha; + dst_buffer[offset + pos * channel_off] = in_buffer[offset + pos * channel_off] * pow(scale_val, p.negative_beta); + ++head; + ++pos; + } + } +} diff --git a/modules/dnn/src/webgpu/shader/lrn_spv.cpp b/modules/dnn/src/webgpu/shader/lrn_spv.cpp new file mode 100644 index 000000000000..d3b320a72515 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/lrn_spv.cpp @@ -0,0 +1,246 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int lrn_spv[1841] = { + 0x07230203,0x00010000,0x00080009,0x00000143,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0007000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00000013,0x00060010, + 0x00000004,0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2, + 0x00040005,0x00000004,0x6e69616d,0x00000000,0x00030005,0x00000008,0x00646967,0x00080005, + 0x0000000c,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00030005, + 0x00000012,0x007a7367,0x00070005,0x00000013,0x4e5f6c67,0x6f576d75,0x72476b72,0x7370756f, + 0x00000000,0x00040005,0x00000019,0x65646e69,0x00000078,0x00050005,0x00000022,0x68737570, + 0x636f6c42,0x0000006b,0x00060006,0x00000022,0x00000000,0x65726874,0x6e5f6461,0x00006d75, + 0x00060006,0x00000022,0x00000001,0x6e616863,0x736c656e,0x00000000,0x00050006,0x00000022, + 0x00000002,0x67696568,0x00007468,0x00050006,0x00000022,0x00000003,0x74646977,0x00000068, + 0x00060006,0x00000022,0x00000004,0x746c6966,0x6c5f7265,0x00006e65,0x00050006,0x00000022, + 0x00000005,0x69646172,0x00007375,0x00050006,0x00000022,0x00000006,0x68706c61,0x00000061, + 0x00050006,0x00000022,0x00000007,0x73616962,0x00000000,0x00070006,0x00000022,0x00000008, + 0x6167656e,0x65766974,0x7465625f,0x00000061,0x00030005,0x00000024,0x00000070,0x00030005, + 0x0000002b,0x00000078,0x00030005,0x00000031,0x00000079,0x00030005,0x0000003a,0x00000062, + 0x00040005,0x00000042,0x7366666f,0x00007465,0x00050005,0x00000055,0x6e616863,0x5f6c656e, + 0x0066666f,0x00040005,0x0000005b,0x64616568,0x00000000,0x00050005,0x0000005d,0x75636361, + 0x63735f6d,0x00656c61,0x00040005,0x0000005f,0x5f6e696d,0x006c6176,0x00040005,0x00000078, + 0x75706e49,0x00003074,0x00060006,0x00000078,0x00000000,0x625f6e69,0x65666675,0x00000072, + 0x00030005,0x0000007a,0x00000000,0x00050005,0x000000c8,0x6c616373,0x61765f65,0x0000006c, + 0x00040005,0x000000d3,0x7074754f,0x00007475,0x00060006,0x000000d3,0x00000000,0x5f747364, + 0x66667562,0x00007265,0x00030005,0x000000d5,0x00000000,0x00030005,0x000000f1,0x00736f70, + 0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00040047,0x00000013,0x0000000b,0x00000018, + 0x00050048,0x00000022,0x00000000,0x00000023,0x00000000,0x00050048,0x00000022,0x00000001, + 0x00000023,0x00000004,0x00050048,0x00000022,0x00000002,0x00000023,0x00000008,0x00050048, + 0x00000022,0x00000003,0x00000023,0x0000000c,0x00050048,0x00000022,0x00000004,0x00000023, + 0x00000010,0x00050048,0x00000022,0x00000005,0x00000023,0x00000014,0x00050048,0x00000022, + 0x00000006,0x00000023,0x00000018,0x00050048,0x00000022,0x00000007,0x00000023,0x0000001c, + 0x00050048,0x00000022,0x00000008,0x00000023,0x00000020,0x00030047,0x00000022,0x00000002, + 0x00040047,0x00000024,0x00000022,0x00000000,0x00040047,0x00000024,0x00000021,0x00000002, + 0x00040047,0x00000077,0x00000006,0x00000004,0x00050048,0x00000078,0x00000000,0x00000023, + 0x00000000,0x00030047,0x00000078,0x00000003,0x00040047,0x0000007a,0x00000022,0x00000000, + 0x00040047,0x0000007a,0x00000021,0x00000000,0x00040047,0x000000d2,0x00000006,0x00000004, + 0x00050048,0x000000d3,0x00000000,0x00000023,0x00000000,0x00030047,0x000000d3,0x00000003, + 0x00040047,0x000000d5,0x00000022,0x00000000,0x00040047,0x000000d5,0x00000021,0x00000001, + 0x00040047,0x00000142,0x0000000b,0x00000019,0x00020013,0x00000002,0x00030021,0x00000003, + 0x00000002,0x00040015,0x00000006,0x00000020,0x00000001,0x00040020,0x00000007,0x00000007, + 0x00000006,0x00040015,0x00000009,0x00000020,0x00000000,0x00040017,0x0000000a,0x00000009, + 0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a,0x0004003b,0x0000000b,0x0000000c, + 0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000,0x00040020,0x0000000e,0x00000001, + 0x00000009,0x0004003b,0x0000000b,0x00000013,0x00000001,0x0004002b,0x00000009,0x00000016, + 0x00000100,0x00030016,0x00000021,0x00000020,0x000b001e,0x00000022,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000021,0x00000021,0x00000021,0x00040020, + 0x00000023,0x00000002,0x00000022,0x0004003b,0x00000023,0x00000024,0x00000002,0x0004002b, + 0x00000006,0x00000025,0x00000000,0x00040020,0x00000026,0x00000002,0x00000006,0x00020014, + 0x00000029,0x0004002b,0x00000006,0x0000002d,0x00000003,0x0004002b,0x00000006,0x00000036, + 0x00000002,0x0004002b,0x00000006,0x00000044,0x00000001,0x00040020,0x0000005c,0x00000007, + 0x00000021,0x0004002b,0x00000021,0x0000005e,0x00000000,0x0004002b,0x00000006,0x00000060, + 0x00000005,0x0003001d,0x00000077,0x00000021,0x0003001e,0x00000078,0x00000077,0x00040020, + 0x00000079,0x00000002,0x00000078,0x0004003b,0x00000079,0x0000007a,0x00000002,0x00040020, + 0x00000080,0x00000002,0x00000021,0x0004002b,0x00000006,0x000000aa,0x00000004,0x0004002b, + 0x00000006,0x000000c9,0x00000007,0x0004002b,0x00000006,0x000000cd,0x00000006,0x0003001d, + 0x000000d2,0x00000021,0x0003001e,0x000000d3,0x000000d2,0x00040020,0x000000d4,0x00000002, + 0x000000d3,0x0004003b,0x000000d4,0x000000d5,0x00000002,0x0004002b,0x00000006,0x000000e9, + 0x00000008,0x0004002b,0x00000009,0x00000141,0x00000001,0x0006002c,0x0000000a,0x00000142, + 0x00000016,0x00000141,0x00000141,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003, + 0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008,0x00000007,0x0004003b,0x00000007, + 0x00000012,0x00000007,0x0004003b,0x00000007,0x00000019,0x00000007,0x0004003b,0x00000007, + 0x0000002b,0x00000007,0x0004003b,0x00000007,0x00000031,0x00000007,0x0004003b,0x00000007, + 0x0000003a,0x00000007,0x0004003b,0x00000007,0x00000042,0x00000007,0x0004003b,0x00000007, + 0x00000055,0x00000007,0x0004003b,0x00000007,0x0000005b,0x00000007,0x0004003b,0x0000005c, + 0x0000005d,0x00000007,0x0004003b,0x00000007,0x0000005f,0x00000007,0x0004003b,0x00000007, + 0x00000066,0x00000007,0x0004003b,0x0000005c,0x000000c8,0x00000007,0x0004003b,0x00000007, + 0x000000f1,0x00000007,0x00050041,0x0000000e,0x0000000f,0x0000000c,0x0000000d,0x0004003d, + 0x00000009,0x00000010,0x0000000f,0x0004007c,0x00000006,0x00000011,0x00000010,0x0003003e, + 0x00000008,0x00000011,0x00050041,0x0000000e,0x00000014,0x00000013,0x0000000d,0x0004003d, + 0x00000009,0x00000015,0x00000014,0x00050084,0x00000009,0x00000017,0x00000015,0x00000016, + 0x0004007c,0x00000006,0x00000018,0x00000017,0x0003003e,0x00000012,0x00000018,0x0004003d, + 0x00000006,0x0000001a,0x00000008,0x0003003e,0x00000019,0x0000001a,0x000200f9,0x0000001b, + 0x000200f8,0x0000001b,0x000400f6,0x0000001d,0x0000001e,0x00000000,0x000200f9,0x0000001f, + 0x000200f8,0x0000001f,0x0004003d,0x00000006,0x00000020,0x00000019,0x00050041,0x00000026, + 0x00000027,0x00000024,0x00000025,0x0004003d,0x00000006,0x00000028,0x00000027,0x000500b1, + 0x00000029,0x0000002a,0x00000020,0x00000028,0x000400fa,0x0000002a,0x0000001c,0x0000001d, + 0x000200f8,0x0000001c,0x0004003d,0x00000006,0x0000002c,0x00000019,0x00050041,0x00000026, + 0x0000002e,0x00000024,0x0000002d,0x0004003d,0x00000006,0x0000002f,0x0000002e,0x0005008b, + 0x00000006,0x00000030,0x0000002c,0x0000002f,0x0003003e,0x0000002b,0x00000030,0x0004003d, + 0x00000006,0x00000032,0x00000019,0x00050041,0x00000026,0x00000033,0x00000024,0x0000002d, + 0x0004003d,0x00000006,0x00000034,0x00000033,0x00050087,0x00000006,0x00000035,0x00000032, + 0x00000034,0x00050041,0x00000026,0x00000037,0x00000024,0x00000036,0x0004003d,0x00000006, + 0x00000038,0x00000037,0x0005008b,0x00000006,0x00000039,0x00000035,0x00000038,0x0003003e, + 0x00000031,0x00000039,0x0004003d,0x00000006,0x0000003b,0x00000019,0x00050041,0x00000026, + 0x0000003c,0x00000024,0x0000002d,0x0004003d,0x00000006,0x0000003d,0x0000003c,0x00050041, + 0x00000026,0x0000003e,0x00000024,0x00000036,0x0004003d,0x00000006,0x0000003f,0x0000003e, + 0x00050084,0x00000006,0x00000040,0x0000003d,0x0000003f,0x00050087,0x00000006,0x00000041, + 0x0000003b,0x00000040,0x0003003e,0x0000003a,0x00000041,0x0004003d,0x00000006,0x00000043, + 0x0000003a,0x00050041,0x00000026,0x00000045,0x00000024,0x00000044,0x0004003d,0x00000006, + 0x00000046,0x00000045,0x00050084,0x00000006,0x00000047,0x00000043,0x00000046,0x00050041, + 0x00000026,0x00000048,0x00000024,0x00000036,0x0004003d,0x00000006,0x00000049,0x00000048, + 0x00050084,0x00000006,0x0000004a,0x00000047,0x00000049,0x00050041,0x00000026,0x0000004b, + 0x00000024,0x0000002d,0x0004003d,0x00000006,0x0000004c,0x0000004b,0x00050084,0x00000006, + 0x0000004d,0x0000004a,0x0000004c,0x0004003d,0x00000006,0x0000004e,0x00000031,0x00050041, + 0x00000026,0x0000004f,0x00000024,0x0000002d,0x0004003d,0x00000006,0x00000050,0x0000004f, + 0x00050084,0x00000006,0x00000051,0x0000004e,0x00000050,0x00050080,0x00000006,0x00000052, + 0x0000004d,0x00000051,0x0004003d,0x00000006,0x00000053,0x0000002b,0x00050080,0x00000006, + 0x00000054,0x00000052,0x00000053,0x0003003e,0x00000042,0x00000054,0x00050041,0x00000026, + 0x00000056,0x00000024,0x00000036,0x0004003d,0x00000006,0x00000057,0x00000056,0x00050041, + 0x00000026,0x00000058,0x00000024,0x0000002d,0x0004003d,0x00000006,0x00000059,0x00000058, + 0x00050084,0x00000006,0x0000005a,0x00000057,0x00000059,0x0003003e,0x00000055,0x0000005a, + 0x0003003e,0x0000005b,0x00000025,0x0003003e,0x0000005d,0x0000005e,0x00050041,0x00000026, + 0x00000061,0x00000024,0x00000060,0x0004003d,0x00000006,0x00000062,0x00000061,0x00050041, + 0x00000026,0x00000063,0x00000024,0x00000044,0x0004003d,0x00000006,0x00000064,0x00000063, + 0x000500b1,0x00000029,0x00000065,0x00000062,0x00000064,0x000300f7,0x00000068,0x00000000, + 0x000400fa,0x00000065,0x00000067,0x0000006b,0x000200f8,0x00000067,0x00050041,0x00000026, + 0x00000069,0x00000024,0x00000060,0x0004003d,0x00000006,0x0000006a,0x00000069,0x0003003e, + 0x00000066,0x0000006a,0x000200f9,0x00000068,0x000200f8,0x0000006b,0x00050041,0x00000026, + 0x0000006c,0x00000024,0x00000044,0x0004003d,0x00000006,0x0000006d,0x0000006c,0x0003003e, + 0x00000066,0x0000006d,0x000200f9,0x00000068,0x000200f8,0x00000068,0x0004003d,0x00000006, + 0x0000006e,0x00000066,0x0003003e,0x0000005f,0x0000006e,0x000200f9,0x0000006f,0x000200f8, + 0x0000006f,0x000400f6,0x00000071,0x00000072,0x00000000,0x000200f9,0x00000073,0x000200f8, + 0x00000073,0x0004003d,0x00000006,0x00000074,0x0000005b,0x0004003d,0x00000006,0x00000075, + 0x0000005f,0x000500b1,0x00000029,0x00000076,0x00000074,0x00000075,0x000400fa,0x00000076, + 0x00000070,0x00000071,0x000200f8,0x00000070,0x0004003d,0x00000006,0x0000007b,0x00000042, + 0x0004003d,0x00000006,0x0000007c,0x0000005b,0x0004003d,0x00000006,0x0000007d,0x00000055, + 0x00050084,0x00000006,0x0000007e,0x0000007c,0x0000007d,0x00050080,0x00000006,0x0000007f, + 0x0000007b,0x0000007e,0x00060041,0x00000080,0x00000081,0x0000007a,0x00000025,0x0000007f, + 0x0004003d,0x00000021,0x00000082,0x00000081,0x0004003d,0x00000006,0x00000083,0x00000042, + 0x0004003d,0x00000006,0x00000084,0x0000005b,0x0004003d,0x00000006,0x00000085,0x00000055, + 0x00050084,0x00000006,0x00000086,0x00000084,0x00000085,0x00050080,0x00000006,0x00000087, + 0x00000083,0x00000086,0x00060041,0x00000080,0x00000088,0x0000007a,0x00000025,0x00000087, + 0x0004003d,0x00000021,0x00000089,0x00000088,0x00050085,0x00000021,0x0000008a,0x00000082, + 0x00000089,0x0004003d,0x00000021,0x0000008b,0x0000005d,0x00050081,0x00000021,0x0000008c, + 0x0000008b,0x0000008a,0x0003003e,0x0000005d,0x0000008c,0x0004003d,0x00000006,0x0000008d, + 0x0000005b,0x00050080,0x00000006,0x0000008e,0x0000008d,0x00000044,0x0003003e,0x0000005b, + 0x0000008e,0x000200f9,0x00000072,0x000200f8,0x00000072,0x000200f9,0x0000006f,0x000200f8, + 0x00000071,0x000200f9,0x0000008f,0x000200f8,0x0000008f,0x000400f6,0x00000091,0x00000092, + 0x00000000,0x000200f9,0x00000093,0x000200f8,0x00000093,0x0004003d,0x00000006,0x00000094, + 0x0000005b,0x00050041,0x00000026,0x00000095,0x00000024,0x00000044,0x0004003d,0x00000006, + 0x00000096,0x00000095,0x000500b1,0x00000029,0x00000097,0x00000094,0x00000096,0x000400fa, + 0x00000097,0x00000090,0x00000091,0x000200f8,0x00000090,0x0004003d,0x00000006,0x00000098, + 0x00000042,0x0004003d,0x00000006,0x00000099,0x0000005b,0x0004003d,0x00000006,0x0000009a, + 0x00000055,0x00050084,0x00000006,0x0000009b,0x00000099,0x0000009a,0x00050080,0x00000006, + 0x0000009c,0x00000098,0x0000009b,0x00060041,0x00000080,0x0000009d,0x0000007a,0x00000025, + 0x0000009c,0x0004003d,0x00000021,0x0000009e,0x0000009d,0x0004003d,0x00000006,0x0000009f, + 0x00000042,0x0004003d,0x00000006,0x000000a0,0x0000005b,0x0004003d,0x00000006,0x000000a1, + 0x00000055,0x00050084,0x00000006,0x000000a2,0x000000a0,0x000000a1,0x00050080,0x00000006, + 0x000000a3,0x0000009f,0x000000a2,0x00060041,0x00000080,0x000000a4,0x0000007a,0x00000025, + 0x000000a3,0x0004003d,0x00000021,0x000000a5,0x000000a4,0x00050085,0x00000021,0x000000a6, + 0x0000009e,0x000000a5,0x0004003d,0x00000021,0x000000a7,0x0000005d,0x00050081,0x00000021, + 0x000000a8,0x000000a7,0x000000a6,0x0003003e,0x0000005d,0x000000a8,0x0004003d,0x00000006, + 0x000000a9,0x0000005b,0x00050041,0x00000026,0x000000ab,0x00000024,0x000000aa,0x0004003d, + 0x00000006,0x000000ac,0x000000ab,0x00050082,0x00000006,0x000000ad,0x000000a9,0x000000ac, + 0x000500af,0x00000029,0x000000ae,0x000000ad,0x00000025,0x000300f7,0x000000b0,0x00000000, + 0x000400fa,0x000000ae,0x000000af,0x000000b0,0x000200f8,0x000000af,0x0004003d,0x00000006, + 0x000000b1,0x00000042,0x0004003d,0x00000006,0x000000b2,0x0000005b,0x00050041,0x00000026, + 0x000000b3,0x00000024,0x000000aa,0x0004003d,0x00000006,0x000000b4,0x000000b3,0x00050082, + 0x00000006,0x000000b5,0x000000b2,0x000000b4,0x0004003d,0x00000006,0x000000b6,0x00000055, + 0x00050084,0x00000006,0x000000b7,0x000000b5,0x000000b6,0x00050080,0x00000006,0x000000b8, + 0x000000b1,0x000000b7,0x00060041,0x00000080,0x000000b9,0x0000007a,0x00000025,0x000000b8, + 0x0004003d,0x00000021,0x000000ba,0x000000b9,0x0004003d,0x00000006,0x000000bb,0x00000042, + 0x0004003d,0x00000006,0x000000bc,0x0000005b,0x00050041,0x00000026,0x000000bd,0x00000024, + 0x000000aa,0x0004003d,0x00000006,0x000000be,0x000000bd,0x00050082,0x00000006,0x000000bf, + 0x000000bc,0x000000be,0x0004003d,0x00000006,0x000000c0,0x00000055,0x00050084,0x00000006, + 0x000000c1,0x000000bf,0x000000c0,0x00050080,0x00000006,0x000000c2,0x000000bb,0x000000c1, + 0x00060041,0x00000080,0x000000c3,0x0000007a,0x00000025,0x000000c2,0x0004003d,0x00000021, + 0x000000c4,0x000000c3,0x00050085,0x00000021,0x000000c5,0x000000ba,0x000000c4,0x0004003d, + 0x00000021,0x000000c6,0x0000005d,0x00050083,0x00000021,0x000000c7,0x000000c6,0x000000c5, + 0x0003003e,0x0000005d,0x000000c7,0x000200f9,0x000000b0,0x000200f8,0x000000b0,0x00050041, + 0x00000080,0x000000ca,0x00000024,0x000000c9,0x0004003d,0x00000021,0x000000cb,0x000000ca, + 0x0004003d,0x00000021,0x000000cc,0x0000005d,0x00050041,0x00000080,0x000000ce,0x00000024, + 0x000000cd,0x0004003d,0x00000021,0x000000cf,0x000000ce,0x00050085,0x00000021,0x000000d0, + 0x000000cc,0x000000cf,0x00050081,0x00000021,0x000000d1,0x000000cb,0x000000d0,0x0003003e, + 0x000000c8,0x000000d1,0x0004003d,0x00000006,0x000000d6,0x00000042,0x0004003d,0x00000006, + 0x000000d7,0x0000005b,0x00050041,0x00000026,0x000000d8,0x00000024,0x00000060,0x0004003d, + 0x00000006,0x000000d9,0x000000d8,0x00050082,0x00000006,0x000000da,0x000000d7,0x000000d9, + 0x0004003d,0x00000006,0x000000db,0x00000055,0x00050084,0x00000006,0x000000dc,0x000000da, + 0x000000db,0x00050080,0x00000006,0x000000dd,0x000000d6,0x000000dc,0x0004003d,0x00000006, + 0x000000de,0x00000042,0x0004003d,0x00000006,0x000000df,0x0000005b,0x00050041,0x00000026, + 0x000000e0,0x00000024,0x00000060,0x0004003d,0x00000006,0x000000e1,0x000000e0,0x00050082, + 0x00000006,0x000000e2,0x000000df,0x000000e1,0x0004003d,0x00000006,0x000000e3,0x00000055, + 0x00050084,0x00000006,0x000000e4,0x000000e2,0x000000e3,0x00050080,0x00000006,0x000000e5, + 0x000000de,0x000000e4,0x00060041,0x00000080,0x000000e6,0x0000007a,0x00000025,0x000000e5, + 0x0004003d,0x00000021,0x000000e7,0x000000e6,0x0004003d,0x00000021,0x000000e8,0x000000c8, + 0x00050041,0x00000080,0x000000ea,0x00000024,0x000000e9,0x0004003d,0x00000021,0x000000eb, + 0x000000ea,0x0007000c,0x00000021,0x000000ec,0x00000001,0x0000001a,0x000000e8,0x000000eb, + 0x00050085,0x00000021,0x000000ed,0x000000e7,0x000000ec,0x00060041,0x00000080,0x000000ee, + 0x000000d5,0x00000025,0x000000dd,0x0003003e,0x000000ee,0x000000ed,0x0004003d,0x00000006, + 0x000000ef,0x0000005b,0x00050080,0x00000006,0x000000f0,0x000000ef,0x00000044,0x0003003e, + 0x0000005b,0x000000f0,0x000200f9,0x00000092,0x000200f8,0x00000092,0x000200f9,0x0000008f, + 0x000200f8,0x00000091,0x0004003d,0x00000006,0x000000f2,0x0000005b,0x0004003d,0x00000006, + 0x000000f3,0x0000005f,0x00050082,0x00000006,0x000000f4,0x000000f2,0x000000f3,0x0003003e, + 0x000000f1,0x000000f4,0x000200f9,0x000000f5,0x000200f8,0x000000f5,0x000400f6,0x000000f7, + 0x000000f8,0x00000000,0x000200f9,0x000000f9,0x000200f8,0x000000f9,0x0004003d,0x00000006, + 0x000000fa,0x000000f1,0x000500af,0x00000029,0x000000fb,0x000000fa,0x00000025,0x000300f7, + 0x000000fd,0x00000000,0x000400fa,0x000000fb,0x000000fc,0x000000fd,0x000200f8,0x000000fc, + 0x0004003d,0x00000006,0x000000fe,0x000000f1,0x00050041,0x00000026,0x000000ff,0x00000024, + 0x00000044,0x0004003d,0x00000006,0x00000100,0x000000ff,0x000500b1,0x00000029,0x00000101, + 0x000000fe,0x00000100,0x000200f9,0x000000fd,0x000200f8,0x000000fd,0x000700f5,0x00000029, + 0x00000102,0x000000fb,0x000000f9,0x00000101,0x000000fc,0x000400fa,0x00000102,0x000000f6, + 0x000000f7,0x000200f8,0x000000f6,0x0004003d,0x00000006,0x00000103,0x0000005b,0x00050041, + 0x00000026,0x00000104,0x00000024,0x000000aa,0x0004003d,0x00000006,0x00000105,0x00000104, + 0x00050082,0x00000006,0x00000106,0x00000103,0x00000105,0x000500af,0x00000029,0x00000107, + 0x00000106,0x00000025,0x000300f7,0x00000109,0x00000000,0x000400fa,0x00000107,0x00000108, + 0x00000109,0x000200f8,0x00000108,0x0004003d,0x00000006,0x0000010a,0x00000042,0x0004003d, + 0x00000006,0x0000010b,0x0000005b,0x00050041,0x00000026,0x0000010c,0x00000024,0x000000aa, + 0x0004003d,0x00000006,0x0000010d,0x0000010c,0x00050082,0x00000006,0x0000010e,0x0000010b, + 0x0000010d,0x0004003d,0x00000006,0x0000010f,0x00000055,0x00050084,0x00000006,0x00000110, + 0x0000010e,0x0000010f,0x00050080,0x00000006,0x00000111,0x0000010a,0x00000110,0x00060041, + 0x00000080,0x00000112,0x0000007a,0x00000025,0x00000111,0x0004003d,0x00000021,0x00000113, + 0x00000112,0x0004003d,0x00000006,0x00000114,0x00000042,0x0004003d,0x00000006,0x00000115, + 0x0000005b,0x00050041,0x00000026,0x00000116,0x00000024,0x000000aa,0x0004003d,0x00000006, + 0x00000117,0x00000116,0x00050082,0x00000006,0x00000118,0x00000115,0x00000117,0x0004003d, + 0x00000006,0x00000119,0x00000055,0x00050084,0x00000006,0x0000011a,0x00000118,0x00000119, + 0x00050080,0x00000006,0x0000011b,0x00000114,0x0000011a,0x00060041,0x00000080,0x0000011c, + 0x0000007a,0x00000025,0x0000011b,0x0004003d,0x00000021,0x0000011d,0x0000011c,0x00050085, + 0x00000021,0x0000011e,0x00000113,0x0000011d,0x0004003d,0x00000021,0x0000011f,0x0000005d, + 0x00050083,0x00000021,0x00000120,0x0000011f,0x0000011e,0x0003003e,0x0000005d,0x00000120, + 0x000200f9,0x00000109,0x000200f8,0x00000109,0x00050041,0x00000080,0x00000121,0x00000024, + 0x000000c9,0x0004003d,0x00000021,0x00000122,0x00000121,0x0004003d,0x00000021,0x00000123, + 0x0000005d,0x00050041,0x00000080,0x00000124,0x00000024,0x000000cd,0x0004003d,0x00000021, + 0x00000125,0x00000124,0x00050085,0x00000021,0x00000126,0x00000123,0x00000125,0x00050081, + 0x00000021,0x00000127,0x00000122,0x00000126,0x0003003e,0x000000c8,0x00000127,0x0004003d, + 0x00000006,0x00000128,0x00000042,0x0004003d,0x00000006,0x00000129,0x000000f1,0x0004003d, + 0x00000006,0x0000012a,0x00000055,0x00050084,0x00000006,0x0000012b,0x00000129,0x0000012a, + 0x00050080,0x00000006,0x0000012c,0x00000128,0x0000012b,0x0004003d,0x00000006,0x0000012d, + 0x00000042,0x0004003d,0x00000006,0x0000012e,0x000000f1,0x0004003d,0x00000006,0x0000012f, + 0x00000055,0x00050084,0x00000006,0x00000130,0x0000012e,0x0000012f,0x00050080,0x00000006, + 0x00000131,0x0000012d,0x00000130,0x00060041,0x00000080,0x00000132,0x0000007a,0x00000025, + 0x00000131,0x0004003d,0x00000021,0x00000133,0x00000132,0x0004003d,0x00000021,0x00000134, + 0x000000c8,0x00050041,0x00000080,0x00000135,0x00000024,0x000000e9,0x0004003d,0x00000021, + 0x00000136,0x00000135,0x0007000c,0x00000021,0x00000137,0x00000001,0x0000001a,0x00000134, + 0x00000136,0x00050085,0x00000021,0x00000138,0x00000133,0x00000137,0x00060041,0x00000080, + 0x00000139,0x000000d5,0x00000025,0x0000012c,0x0003003e,0x00000139,0x00000138,0x0004003d, + 0x00000006,0x0000013a,0x0000005b,0x00050080,0x00000006,0x0000013b,0x0000013a,0x00000044, + 0x0003003e,0x0000005b,0x0000013b,0x0004003d,0x00000006,0x0000013c,0x000000f1,0x00050080, + 0x00000006,0x0000013d,0x0000013c,0x00000044,0x0003003e,0x000000f1,0x0000013d,0x000200f9, + 0x000000f8,0x000200f8,0x000000f8,0x000200f9,0x000000f5,0x000200f8,0x000000f7,0x000200f9, + 0x0000001e,0x000200f8,0x0000001e,0x0004003d,0x00000006,0x0000013e,0x00000012,0x0004003d, + 0x00000006,0x0000013f,0x00000019,0x00050080,0x00000006,0x00000140,0x0000013f,0x0000013e, + 0x0003003e,0x00000019,0x00000140,0x000200f9,0x0000001b,0x000200f8,0x0000001d,0x000100fd, + 0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/max_pool.comp b/modules/dnn/src/webgpu/shader/max_pool.comp new file mode 100644 index 000000000000..b1877b8d3551 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/max_pool.comp @@ -0,0 +1,64 @@ +#version 450 +#define LOCAL_SZ_X 256 + +layout(binding = 0) buffer Input0{ + float in_buffer[]; +}; + +layout(binding = 1) buffer Output{ + float out_buffer[]; +}; + +layout(binding = 2) buffer Mask{ + float mask_buffer[]; +}; +layout(binding = 3) uniform pushBlock { + int channels; + int in_h; + int in_w; + int out_h; + int out_w; + int padding_h; + int padding_w; + int filter_h; + int filter_w; + int stride_h; + int stride_w; + int total; + int need_mask; +} p; + +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; + +void main() +{ + int global_size = int(gl_WorkGroupSize.x * gl_NumWorkGroups.x); + int gid = int(gl_GlobalInvocationID.x); + for (int index = gid; index < p.total; index += global_size) + { + const int pw = index % p.out_w; + const int ph = (index / p.out_w) % p.out_h; + const int c = (index / p.out_w / p.out_h) % p.channels; + const int n = index / p.out_w / p.out_h / p.channels; + int hstart = ph * p.stride_h - p.padding_h; + int wstart = pw * p.stride_w - p.padding_w; + const int hend = min(hstart + p.filter_h, p.in_h); + const int wend = min(wstart + p.filter_w, p.in_w); + hstart = max(hstart, 0); + wstart = max(wstart, 0); + float maxval = -1./0.; + int maxidx = -1; + int off = (n * p.channels + c) * p.in_h * p.in_w; + for (int h = hstart; h < hend; ++h) { + for (int w = wstart; w < wend; ++w) { + if (in_buffer[off + h * p.in_w + w] > maxval) { + maxidx = h * p.in_w + w; + maxval = in_buffer[off + maxidx]; + } + } + } + out_buffer[index] = maxval; + if (p.need_mask == 1) + mask_buffer[index] = maxidx; + } +} diff --git a/modules/dnn/src/webgpu/shader/max_pool_spv.cpp b/modules/dnn/src/webgpu/shader/max_pool_spv.cpp new file mode 100644 index 000000000000..86d7e3e6e4a8 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/max_pool_spv.cpp @@ -0,0 +1,196 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int max_pool_spv[1445] = { + 0x07230203,0x00010000,0x00080009,0x000000df,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0007000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000015,0x00060010, + 0x00000004,0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2, + 0x00040005,0x00000004,0x6e69616d,0x00000000,0x00050005,0x00000008,0x626f6c67,0x735f6c61, + 0x00657a69,0x00070005,0x0000000d,0x4e5f6c67,0x6f576d75,0x72476b72,0x7370756f,0x00000000, + 0x00030005,0x00000014,0x00646967,0x00080005,0x00000015,0x475f6c67,0x61626f6c,0x766e496c, + 0x7461636f,0x496e6f69,0x00000044,0x00040005,0x00000019,0x65646e69,0x00000078,0x00050005, + 0x00000021,0x68737570,0x636f6c42,0x0000006b,0x00060006,0x00000021,0x00000000,0x6e616863, + 0x736c656e,0x00000000,0x00050006,0x00000021,0x00000001,0x685f6e69,0x00000000,0x00050006, + 0x00000021,0x00000002,0x775f6e69,0x00000000,0x00050006,0x00000021,0x00000003,0x5f74756f, + 0x00000068,0x00050006,0x00000021,0x00000004,0x5f74756f,0x00000077,0x00060006,0x00000021, + 0x00000005,0x64646170,0x5f676e69,0x00000068,0x00060006,0x00000021,0x00000006,0x64646170, + 0x5f676e69,0x00000077,0x00060006,0x00000021,0x00000007,0x746c6966,0x685f7265,0x00000000, + 0x00060006,0x00000021,0x00000008,0x746c6966,0x775f7265,0x00000000,0x00060006,0x00000021, + 0x00000009,0x69727473,0x685f6564,0x00000000,0x00060006,0x00000021,0x0000000a,0x69727473, + 0x775f6564,0x00000000,0x00050006,0x00000021,0x0000000b,0x61746f74,0x0000006c,0x00060006, + 0x00000021,0x0000000c,0x6465656e,0x73616d5f,0x0000006b,0x00030005,0x00000023,0x00000070, + 0x00030005,0x0000002a,0x00007770,0x00030005,0x00000030,0x00006870,0x00030005,0x00000039, + 0x00000063,0x00030005,0x00000045,0x0000006e,0x00040005,0x00000050,0x61747368,0x00007472, + 0x00040005,0x0000005a,0x61747377,0x00007472,0x00040005,0x00000064,0x646e6568,0x00000000, + 0x00040005,0x0000006e,0x646e6577,0x00000000,0x00040005,0x0000007e,0x7678616d,0x00006c61, + 0x00040005,0x00000080,0x6978616d,0x00007864,0x00030005,0x00000082,0x0066666f,0x00030005, + 0x0000008f,0x00000068,0x00030005,0x00000099,0x00000077,0x00040005,0x000000a4,0x75706e49, + 0x00003074,0x00060006,0x000000a4,0x00000000,0x625f6e69,0x65666675,0x00000072,0x00030005, + 0x000000a6,0x00000000,0x00040005,0x000000c6,0x7074754f,0x00007475,0x00060006,0x000000c6, + 0x00000000,0x5f74756f,0x66667562,0x00007265,0x00030005,0x000000c8,0x00000000,0x00040005, + 0x000000d3,0x6b73614d,0x00000000,0x00060006,0x000000d3,0x00000000,0x6b73616d,0x6675625f, + 0x00726566,0x00030005,0x000000d5,0x00000000,0x00040047,0x0000000d,0x0000000b,0x00000018, + 0x00040047,0x00000015,0x0000000b,0x0000001c,0x00050048,0x00000021,0x00000000,0x00000023, + 0x00000000,0x00050048,0x00000021,0x00000001,0x00000023,0x00000004,0x00050048,0x00000021, + 0x00000002,0x00000023,0x00000008,0x00050048,0x00000021,0x00000003,0x00000023,0x0000000c, + 0x00050048,0x00000021,0x00000004,0x00000023,0x00000010,0x00050048,0x00000021,0x00000005, + 0x00000023,0x00000014,0x00050048,0x00000021,0x00000006,0x00000023,0x00000018,0x00050048, + 0x00000021,0x00000007,0x00000023,0x0000001c,0x00050048,0x00000021,0x00000008,0x00000023, + 0x00000020,0x00050048,0x00000021,0x00000009,0x00000023,0x00000024,0x00050048,0x00000021, + 0x0000000a,0x00000023,0x00000028,0x00050048,0x00000021,0x0000000b,0x00000023,0x0000002c, + 0x00050048,0x00000021,0x0000000c,0x00000023,0x00000030,0x00030047,0x00000021,0x00000002, + 0x00040047,0x00000023,0x00000022,0x00000000,0x00040047,0x00000023,0x00000021,0x00000003, + 0x00040047,0x000000a3,0x00000006,0x00000004,0x00050048,0x000000a4,0x00000000,0x00000023, + 0x00000000,0x00030047,0x000000a4,0x00000003,0x00040047,0x000000a6,0x00000022,0x00000000, + 0x00040047,0x000000a6,0x00000021,0x00000000,0x00040047,0x000000c5,0x00000006,0x00000004, + 0x00050048,0x000000c6,0x00000000,0x00000023,0x00000000,0x00030047,0x000000c6,0x00000003, + 0x00040047,0x000000c8,0x00000022,0x00000000,0x00040047,0x000000c8,0x00000021,0x00000001, + 0x00040047,0x000000d2,0x00000006,0x00000004,0x00050048,0x000000d3,0x00000000,0x00000023, + 0x00000000,0x00030047,0x000000d3,0x00000003,0x00040047,0x000000d5,0x00000022,0x00000000, + 0x00040047,0x000000d5,0x00000021,0x00000002,0x00040047,0x000000de,0x0000000b,0x00000019, + 0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020, + 0x00000001,0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020, + 0x00000000,0x0004002b,0x00000009,0x0000000a,0x00000100,0x00040017,0x0000000b,0x00000009, + 0x00000003,0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d, + 0x00000001,0x0004002b,0x00000009,0x0000000e,0x00000000,0x00040020,0x0000000f,0x00000001, + 0x00000009,0x0004003b,0x0000000c,0x00000015,0x00000001,0x000f001e,0x00000021,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x00000022,0x00000002,0x00000021, + 0x0004003b,0x00000022,0x00000023,0x00000002,0x0004002b,0x00000006,0x00000024,0x0000000b, + 0x00040020,0x00000025,0x00000002,0x00000006,0x00020014,0x00000028,0x0004002b,0x00000006, + 0x0000002c,0x00000004,0x0004002b,0x00000006,0x00000035,0x00000003,0x0004002b,0x00000006, + 0x00000041,0x00000000,0x0004002b,0x00000006,0x00000052,0x00000009,0x0004002b,0x00000006, + 0x00000056,0x00000005,0x0004002b,0x00000006,0x0000005c,0x0000000a,0x0004002b,0x00000006, + 0x00000060,0x00000006,0x0004002b,0x00000006,0x00000066,0x00000007,0x0004002b,0x00000006, + 0x0000006a,0x00000001,0x0004002b,0x00000006,0x00000070,0x00000008,0x0004002b,0x00000006, + 0x00000074,0x00000002,0x00030016,0x0000007c,0x00000020,0x00040020,0x0000007d,0x00000007, + 0x0000007c,0x0004002b,0x0000007c,0x0000007f,0xff800000,0x0004002b,0x00000006,0x00000081, + 0xffffffff,0x0003001d,0x000000a3,0x0000007c,0x0003001e,0x000000a4,0x000000a3,0x00040020, + 0x000000a5,0x00000002,0x000000a4,0x0004003b,0x000000a5,0x000000a6,0x00000002,0x00040020, + 0x000000af,0x00000002,0x0000007c,0x0003001d,0x000000c5,0x0000007c,0x0003001e,0x000000c6, + 0x000000c5,0x00040020,0x000000c7,0x00000002,0x000000c6,0x0004003b,0x000000c7,0x000000c8, + 0x00000002,0x0004002b,0x00000006,0x000000cc,0x0000000c,0x0003001d,0x000000d2,0x0000007c, + 0x0003001e,0x000000d3,0x000000d2,0x00040020,0x000000d4,0x00000002,0x000000d3,0x0004003b, + 0x000000d4,0x000000d5,0x00000002,0x0004002b,0x00000009,0x000000dd,0x00000001,0x0006002c, + 0x0000000b,0x000000de,0x0000000a,0x000000dd,0x000000dd,0x00050036,0x00000002,0x00000004, + 0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008,0x00000007, + 0x0004003b,0x00000007,0x00000014,0x00000007,0x0004003b,0x00000007,0x00000019,0x00000007, + 0x0004003b,0x00000007,0x0000002a,0x00000007,0x0004003b,0x00000007,0x00000030,0x00000007, + 0x0004003b,0x00000007,0x00000039,0x00000007,0x0004003b,0x00000007,0x00000045,0x00000007, + 0x0004003b,0x00000007,0x00000050,0x00000007,0x0004003b,0x00000007,0x0000005a,0x00000007, + 0x0004003b,0x00000007,0x00000064,0x00000007,0x0004003b,0x00000007,0x0000006e,0x00000007, + 0x0004003b,0x0000007d,0x0000007e,0x00000007,0x0004003b,0x00000007,0x00000080,0x00000007, + 0x0004003b,0x00000007,0x00000082,0x00000007,0x0004003b,0x00000007,0x0000008f,0x00000007, + 0x0004003b,0x00000007,0x00000099,0x00000007,0x00050041,0x0000000f,0x00000010,0x0000000d, + 0x0000000e,0x0004003d,0x00000009,0x00000011,0x00000010,0x00050084,0x00000009,0x00000012, + 0x0000000a,0x00000011,0x0004007c,0x00000006,0x00000013,0x00000012,0x0003003e,0x00000008, + 0x00000013,0x00050041,0x0000000f,0x00000016,0x00000015,0x0000000e,0x0004003d,0x00000009, + 0x00000017,0x00000016,0x0004007c,0x00000006,0x00000018,0x00000017,0x0003003e,0x00000014, + 0x00000018,0x0004003d,0x00000006,0x0000001a,0x00000014,0x0003003e,0x00000019,0x0000001a, + 0x000200f9,0x0000001b,0x000200f8,0x0000001b,0x000400f6,0x0000001d,0x0000001e,0x00000000, + 0x000200f9,0x0000001f,0x000200f8,0x0000001f,0x0004003d,0x00000006,0x00000020,0x00000019, + 0x00050041,0x00000025,0x00000026,0x00000023,0x00000024,0x0004003d,0x00000006,0x00000027, + 0x00000026,0x000500b1,0x00000028,0x00000029,0x00000020,0x00000027,0x000400fa,0x00000029, + 0x0000001c,0x0000001d,0x000200f8,0x0000001c,0x0004003d,0x00000006,0x0000002b,0x00000019, + 0x00050041,0x00000025,0x0000002d,0x00000023,0x0000002c,0x0004003d,0x00000006,0x0000002e, + 0x0000002d,0x0005008b,0x00000006,0x0000002f,0x0000002b,0x0000002e,0x0003003e,0x0000002a, + 0x0000002f,0x0004003d,0x00000006,0x00000031,0x00000019,0x00050041,0x00000025,0x00000032, + 0x00000023,0x0000002c,0x0004003d,0x00000006,0x00000033,0x00000032,0x00050087,0x00000006, + 0x00000034,0x00000031,0x00000033,0x00050041,0x00000025,0x00000036,0x00000023,0x00000035, + 0x0004003d,0x00000006,0x00000037,0x00000036,0x0005008b,0x00000006,0x00000038,0x00000034, + 0x00000037,0x0003003e,0x00000030,0x00000038,0x0004003d,0x00000006,0x0000003a,0x00000019, + 0x00050041,0x00000025,0x0000003b,0x00000023,0x0000002c,0x0004003d,0x00000006,0x0000003c, + 0x0000003b,0x00050087,0x00000006,0x0000003d,0x0000003a,0x0000003c,0x00050041,0x00000025, + 0x0000003e,0x00000023,0x00000035,0x0004003d,0x00000006,0x0000003f,0x0000003e,0x00050087, + 0x00000006,0x00000040,0x0000003d,0x0000003f,0x00050041,0x00000025,0x00000042,0x00000023, + 0x00000041,0x0004003d,0x00000006,0x00000043,0x00000042,0x0005008b,0x00000006,0x00000044, + 0x00000040,0x00000043,0x0003003e,0x00000039,0x00000044,0x0004003d,0x00000006,0x00000046, + 0x00000019,0x00050041,0x00000025,0x00000047,0x00000023,0x0000002c,0x0004003d,0x00000006, + 0x00000048,0x00000047,0x00050087,0x00000006,0x00000049,0x00000046,0x00000048,0x00050041, + 0x00000025,0x0000004a,0x00000023,0x00000035,0x0004003d,0x00000006,0x0000004b,0x0000004a, + 0x00050087,0x00000006,0x0000004c,0x00000049,0x0000004b,0x00050041,0x00000025,0x0000004d, + 0x00000023,0x00000041,0x0004003d,0x00000006,0x0000004e,0x0000004d,0x00050087,0x00000006, + 0x0000004f,0x0000004c,0x0000004e,0x0003003e,0x00000045,0x0000004f,0x0004003d,0x00000006, + 0x00000051,0x00000030,0x00050041,0x00000025,0x00000053,0x00000023,0x00000052,0x0004003d, + 0x00000006,0x00000054,0x00000053,0x00050084,0x00000006,0x00000055,0x00000051,0x00000054, + 0x00050041,0x00000025,0x00000057,0x00000023,0x00000056,0x0004003d,0x00000006,0x00000058, + 0x00000057,0x00050082,0x00000006,0x00000059,0x00000055,0x00000058,0x0003003e,0x00000050, + 0x00000059,0x0004003d,0x00000006,0x0000005b,0x0000002a,0x00050041,0x00000025,0x0000005d, + 0x00000023,0x0000005c,0x0004003d,0x00000006,0x0000005e,0x0000005d,0x00050084,0x00000006, + 0x0000005f,0x0000005b,0x0000005e,0x00050041,0x00000025,0x00000061,0x00000023,0x00000060, + 0x0004003d,0x00000006,0x00000062,0x00000061,0x00050082,0x00000006,0x00000063,0x0000005f, + 0x00000062,0x0003003e,0x0000005a,0x00000063,0x0004003d,0x00000006,0x00000065,0x00000050, + 0x00050041,0x00000025,0x00000067,0x00000023,0x00000066,0x0004003d,0x00000006,0x00000068, + 0x00000067,0x00050080,0x00000006,0x00000069,0x00000065,0x00000068,0x00050041,0x00000025, + 0x0000006b,0x00000023,0x0000006a,0x0004003d,0x00000006,0x0000006c,0x0000006b,0x0007000c, + 0x00000006,0x0000006d,0x00000001,0x00000027,0x00000069,0x0000006c,0x0003003e,0x00000064, + 0x0000006d,0x0004003d,0x00000006,0x0000006f,0x0000005a,0x00050041,0x00000025,0x00000071, + 0x00000023,0x00000070,0x0004003d,0x00000006,0x00000072,0x00000071,0x00050080,0x00000006, + 0x00000073,0x0000006f,0x00000072,0x00050041,0x00000025,0x00000075,0x00000023,0x00000074, + 0x0004003d,0x00000006,0x00000076,0x00000075,0x0007000c,0x00000006,0x00000077,0x00000001, + 0x00000027,0x00000073,0x00000076,0x0003003e,0x0000006e,0x00000077,0x0004003d,0x00000006, + 0x00000078,0x00000050,0x0007000c,0x00000006,0x00000079,0x00000001,0x0000002a,0x00000078, + 0x00000041,0x0003003e,0x00000050,0x00000079,0x0004003d,0x00000006,0x0000007a,0x0000005a, + 0x0007000c,0x00000006,0x0000007b,0x00000001,0x0000002a,0x0000007a,0x00000041,0x0003003e, + 0x0000005a,0x0000007b,0x0003003e,0x0000007e,0x0000007f,0x0003003e,0x00000080,0x00000081, + 0x0004003d,0x00000006,0x00000083,0x00000045,0x00050041,0x00000025,0x00000084,0x00000023, + 0x00000041,0x0004003d,0x00000006,0x00000085,0x00000084,0x00050084,0x00000006,0x00000086, + 0x00000083,0x00000085,0x0004003d,0x00000006,0x00000087,0x00000039,0x00050080,0x00000006, + 0x00000088,0x00000086,0x00000087,0x00050041,0x00000025,0x00000089,0x00000023,0x0000006a, + 0x0004003d,0x00000006,0x0000008a,0x00000089,0x00050084,0x00000006,0x0000008b,0x00000088, + 0x0000008a,0x00050041,0x00000025,0x0000008c,0x00000023,0x00000074,0x0004003d,0x00000006, + 0x0000008d,0x0000008c,0x00050084,0x00000006,0x0000008e,0x0000008b,0x0000008d,0x0003003e, + 0x00000082,0x0000008e,0x0004003d,0x00000006,0x00000090,0x00000050,0x0003003e,0x0000008f, + 0x00000090,0x000200f9,0x00000091,0x000200f8,0x00000091,0x000400f6,0x00000093,0x00000094, + 0x00000000,0x000200f9,0x00000095,0x000200f8,0x00000095,0x0004003d,0x00000006,0x00000096, + 0x0000008f,0x0004003d,0x00000006,0x00000097,0x00000064,0x000500b1,0x00000028,0x00000098, + 0x00000096,0x00000097,0x000400fa,0x00000098,0x00000092,0x00000093,0x000200f8,0x00000092, + 0x0004003d,0x00000006,0x0000009a,0x0000005a,0x0003003e,0x00000099,0x0000009a,0x000200f9, + 0x0000009b,0x000200f8,0x0000009b,0x000400f6,0x0000009d,0x0000009e,0x00000000,0x000200f9, + 0x0000009f,0x000200f8,0x0000009f,0x0004003d,0x00000006,0x000000a0,0x00000099,0x0004003d, + 0x00000006,0x000000a1,0x0000006e,0x000500b1,0x00000028,0x000000a2,0x000000a0,0x000000a1, + 0x000400fa,0x000000a2,0x0000009c,0x0000009d,0x000200f8,0x0000009c,0x0004003d,0x00000006, + 0x000000a7,0x00000082,0x0004003d,0x00000006,0x000000a8,0x0000008f,0x00050041,0x00000025, + 0x000000a9,0x00000023,0x00000074,0x0004003d,0x00000006,0x000000aa,0x000000a9,0x00050084, + 0x00000006,0x000000ab,0x000000a8,0x000000aa,0x00050080,0x00000006,0x000000ac,0x000000a7, + 0x000000ab,0x0004003d,0x00000006,0x000000ad,0x00000099,0x00050080,0x00000006,0x000000ae, + 0x000000ac,0x000000ad,0x00060041,0x000000af,0x000000b0,0x000000a6,0x00000041,0x000000ae, + 0x0004003d,0x0000007c,0x000000b1,0x000000b0,0x0004003d,0x0000007c,0x000000b2,0x0000007e, + 0x000500ba,0x00000028,0x000000b3,0x000000b1,0x000000b2,0x000300f7,0x000000b5,0x00000000, + 0x000400fa,0x000000b3,0x000000b4,0x000000b5,0x000200f8,0x000000b4,0x0004003d,0x00000006, + 0x000000b6,0x0000008f,0x00050041,0x00000025,0x000000b7,0x00000023,0x00000074,0x0004003d, + 0x00000006,0x000000b8,0x000000b7,0x00050084,0x00000006,0x000000b9,0x000000b6,0x000000b8, + 0x0004003d,0x00000006,0x000000ba,0x00000099,0x00050080,0x00000006,0x000000bb,0x000000b9, + 0x000000ba,0x0003003e,0x00000080,0x000000bb,0x0004003d,0x00000006,0x000000bc,0x00000082, + 0x0004003d,0x00000006,0x000000bd,0x00000080,0x00050080,0x00000006,0x000000be,0x000000bc, + 0x000000bd,0x00060041,0x000000af,0x000000bf,0x000000a6,0x00000041,0x000000be,0x0004003d, + 0x0000007c,0x000000c0,0x000000bf,0x0003003e,0x0000007e,0x000000c0,0x000200f9,0x000000b5, + 0x000200f8,0x000000b5,0x000200f9,0x0000009e,0x000200f8,0x0000009e,0x0004003d,0x00000006, + 0x000000c1,0x00000099,0x00050080,0x00000006,0x000000c2,0x000000c1,0x0000006a,0x0003003e, + 0x00000099,0x000000c2,0x000200f9,0x0000009b,0x000200f8,0x0000009d,0x000200f9,0x00000094, + 0x000200f8,0x00000094,0x0004003d,0x00000006,0x000000c3,0x0000008f,0x00050080,0x00000006, + 0x000000c4,0x000000c3,0x0000006a,0x0003003e,0x0000008f,0x000000c4,0x000200f9,0x00000091, + 0x000200f8,0x00000093,0x0004003d,0x00000006,0x000000c9,0x00000019,0x0004003d,0x0000007c, + 0x000000ca,0x0000007e,0x00060041,0x000000af,0x000000cb,0x000000c8,0x00000041,0x000000c9, + 0x0003003e,0x000000cb,0x000000ca,0x00050041,0x00000025,0x000000cd,0x00000023,0x000000cc, + 0x0004003d,0x00000006,0x000000ce,0x000000cd,0x000500aa,0x00000028,0x000000cf,0x000000ce, + 0x0000006a,0x000300f7,0x000000d1,0x00000000,0x000400fa,0x000000cf,0x000000d0,0x000000d1, + 0x000200f8,0x000000d0,0x0004003d,0x00000006,0x000000d6,0x00000019,0x0004003d,0x00000006, + 0x000000d7,0x00000080,0x0004006f,0x0000007c,0x000000d8,0x000000d7,0x00060041,0x000000af, + 0x000000d9,0x000000d5,0x00000041,0x000000d6,0x0003003e,0x000000d9,0x000000d8,0x000200f9, + 0x000000d1,0x000200f8,0x000000d1,0x000200f9,0x0000001e,0x000200f8,0x0000001e,0x0004003d, + 0x00000006,0x000000da,0x00000008,0x0004003d,0x00000006,0x000000db,0x00000019,0x00050080, + 0x00000006,0x000000dc,0x000000db,0x000000da,0x0003003e,0x00000019,0x000000dc,0x000200f9, + 0x0000001b,0x000200f8,0x0000001d,0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/permute.comp b/modules/dnn/src/webgpu/shader/permute.comp new file mode 100644 index 000000000000..a5e1aceb164c --- /dev/null +++ b/modules/dnn/src/webgpu/shader/permute.comp @@ -0,0 +1,42 @@ +#version 450 +#define LOCAL_SZ_X 256 + +layout(binding = 0) buffer Input0{ + float in_buffer[]; +}; +layout(binding = 1) buffer Input1{ + int permute_order[]; +}; +layout(binding = 2) buffer Input2{ + int old_stride[]; +}; +layout(binding = 3) buffer Input3{ + int new_stride[]; +}; +layout(binding = 4) buffer Output{ + float out_buffer[]; +}; +layout(binding = 5) uniform pushBlock { + int nthreads; + int num_axes; + int global_size; +} p; +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; + +void main() +{ + for (int i = int(gl_GlobalInvocationID.x); i < p.nthreads; i += p.global_size) + { + int old_pos = 0; + int new_pos = i; + + for (int j = 0; j < p.num_axes; ++j) + { + int order = permute_order[j]; + old_pos += (new_pos / new_stride[j]) * old_stride[order]; + new_pos %= new_stride[j]; + } + + out_buffer[i] = in_buffer[old_pos]; + } +} diff --git a/modules/dnn/src/webgpu/shader/permute_spv.cpp b/modules/dnn/src/webgpu/shader/permute_spv.cpp new file mode 100644 index 000000000000..3392c3fad115 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/permute_spv.cpp @@ -0,0 +1,109 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int permute_spv[749] = { + 0x07230203,0x00010000,0x00080009,0x00000068,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00060010,0x00000004, + 0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, + 0x00000004,0x6e69616d,0x00000000,0x00030005,0x00000008,0x00000069,0x00080005,0x0000000c, + 0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005,0x00000018, + 0x68737570,0x636f6c42,0x0000006b,0x00060006,0x00000018,0x00000000,0x7268746e,0x73646165, + 0x00000000,0x00060006,0x00000018,0x00000001,0x5f6d756e,0x73657861,0x00000000,0x00060006, + 0x00000018,0x00000002,0x626f6c67,0x735f6c61,0x00657a69,0x00030005,0x0000001a,0x00000070, + 0x00040005,0x00000021,0x5f646c6f,0x00736f70,0x00040005,0x00000022,0x5f77656e,0x00736f70, + 0x00030005,0x00000024,0x0000006a,0x00040005,0x0000002f,0x6564726f,0x00000072,0x00040005, + 0x00000031,0x75706e49,0x00003174,0x00070006,0x00000031,0x00000000,0x6d726570,0x5f657475, + 0x6564726f,0x00000072,0x00030005,0x00000033,0x00000000,0x00040005,0x00000039,0x75706e49, + 0x00003374,0x00060006,0x00000039,0x00000000,0x5f77656e,0x69727473,0x00006564,0x00030005, + 0x0000003b,0x00000000,0x00040005,0x00000041,0x75706e49,0x00003274,0x00060006,0x00000041, + 0x00000000,0x5f646c6f,0x69727473,0x00006564,0x00030005,0x00000043,0x00000000,0x00040005, + 0x00000053,0x7074754f,0x00007475,0x00060006,0x00000053,0x00000000,0x5f74756f,0x66667562, + 0x00007265,0x00030005,0x00000055,0x00000000,0x00040005,0x00000058,0x75706e49,0x00003074, + 0x00060006,0x00000058,0x00000000,0x625f6e69,0x65666675,0x00000072,0x00030005,0x0000005a, + 0x00000000,0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00050048,0x00000018,0x00000000, + 0x00000023,0x00000000,0x00050048,0x00000018,0x00000001,0x00000023,0x00000004,0x00050048, + 0x00000018,0x00000002,0x00000023,0x00000008,0x00030047,0x00000018,0x00000002,0x00040047, + 0x0000001a,0x00000022,0x00000000,0x00040047,0x0000001a,0x00000021,0x00000005,0x00040047, + 0x00000030,0x00000006,0x00000004,0x00050048,0x00000031,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000031,0x00000003,0x00040047,0x00000033,0x00000022,0x00000000,0x00040047, + 0x00000033,0x00000021,0x00000001,0x00040047,0x00000038,0x00000006,0x00000004,0x00050048, + 0x00000039,0x00000000,0x00000023,0x00000000,0x00030047,0x00000039,0x00000003,0x00040047, + 0x0000003b,0x00000022,0x00000000,0x00040047,0x0000003b,0x00000021,0x00000003,0x00040047, + 0x00000040,0x00000006,0x00000004,0x00050048,0x00000041,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000041,0x00000003,0x00040047,0x00000043,0x00000022,0x00000000,0x00040047, + 0x00000043,0x00000021,0x00000002,0x00040047,0x00000052,0x00000006,0x00000004,0x00050048, + 0x00000053,0x00000000,0x00000023,0x00000000,0x00030047,0x00000053,0x00000003,0x00040047, + 0x00000055,0x00000022,0x00000000,0x00040047,0x00000055,0x00000021,0x00000004,0x00040047, + 0x00000057,0x00000006,0x00000004,0x00050048,0x00000058,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000058,0x00000003,0x00040047,0x0000005a,0x00000022,0x00000000,0x00040047, + 0x0000005a,0x00000021,0x00000000,0x00040047,0x00000067,0x0000000b,0x00000019,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000001, + 0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020,0x00000000, + 0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a, + 0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000, + 0x00040020,0x0000000e,0x00000001,0x00000009,0x0005001e,0x00000018,0x00000006,0x00000006, + 0x00000006,0x00040020,0x00000019,0x00000002,0x00000018,0x0004003b,0x00000019,0x0000001a, + 0x00000002,0x0004002b,0x00000006,0x0000001b,0x00000000,0x00040020,0x0000001c,0x00000002, + 0x00000006,0x00020014,0x0000001f,0x0004002b,0x00000006,0x0000002b,0x00000001,0x0003001d, + 0x00000030,0x00000006,0x0003001e,0x00000031,0x00000030,0x00040020,0x00000032,0x00000002, + 0x00000031,0x0004003b,0x00000032,0x00000033,0x00000002,0x0003001d,0x00000038,0x00000006, + 0x0003001e,0x00000039,0x00000038,0x00040020,0x0000003a,0x00000002,0x00000039,0x0004003b, + 0x0000003a,0x0000003b,0x00000002,0x0003001d,0x00000040,0x00000006,0x0003001e,0x00000041, + 0x00000040,0x00040020,0x00000042,0x00000002,0x00000041,0x0004003b,0x00000042,0x00000043, + 0x00000002,0x00030016,0x00000051,0x00000020,0x0003001d,0x00000052,0x00000051,0x0003001e, + 0x00000053,0x00000052,0x00040020,0x00000054,0x00000002,0x00000053,0x0004003b,0x00000054, + 0x00000055,0x00000002,0x0003001d,0x00000057,0x00000051,0x0003001e,0x00000058,0x00000057, + 0x00040020,0x00000059,0x00000002,0x00000058,0x0004003b,0x00000059,0x0000005a,0x00000002, + 0x00040020,0x0000005c,0x00000002,0x00000051,0x0004002b,0x00000006,0x00000060,0x00000002, + 0x0004002b,0x00000009,0x00000065,0x00000100,0x0004002b,0x00000009,0x00000066,0x00000001, + 0x0006002c,0x0000000a,0x00000067,0x00000065,0x00000066,0x00000066,0x00050036,0x00000002, + 0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008, + 0x00000007,0x0004003b,0x00000007,0x00000021,0x00000007,0x0004003b,0x00000007,0x00000022, + 0x00000007,0x0004003b,0x00000007,0x00000024,0x00000007,0x0004003b,0x00000007,0x0000002f, + 0x00000007,0x00050041,0x0000000e,0x0000000f,0x0000000c,0x0000000d,0x0004003d,0x00000009, + 0x00000010,0x0000000f,0x0004007c,0x00000006,0x00000011,0x00000010,0x0003003e,0x00000008, + 0x00000011,0x000200f9,0x00000012,0x000200f8,0x00000012,0x000400f6,0x00000014,0x00000015, + 0x00000000,0x000200f9,0x00000016,0x000200f8,0x00000016,0x0004003d,0x00000006,0x00000017, + 0x00000008,0x00050041,0x0000001c,0x0000001d,0x0000001a,0x0000001b,0x0004003d,0x00000006, + 0x0000001e,0x0000001d,0x000500b1,0x0000001f,0x00000020,0x00000017,0x0000001e,0x000400fa, + 0x00000020,0x00000013,0x00000014,0x000200f8,0x00000013,0x0003003e,0x00000021,0x0000001b, + 0x0004003d,0x00000006,0x00000023,0x00000008,0x0003003e,0x00000022,0x00000023,0x0003003e, + 0x00000024,0x0000001b,0x000200f9,0x00000025,0x000200f8,0x00000025,0x000400f6,0x00000027, + 0x00000028,0x00000000,0x000200f9,0x00000029,0x000200f8,0x00000029,0x0004003d,0x00000006, + 0x0000002a,0x00000024,0x00050041,0x0000001c,0x0000002c,0x0000001a,0x0000002b,0x0004003d, + 0x00000006,0x0000002d,0x0000002c,0x000500b1,0x0000001f,0x0000002e,0x0000002a,0x0000002d, + 0x000400fa,0x0000002e,0x00000026,0x00000027,0x000200f8,0x00000026,0x0004003d,0x00000006, + 0x00000034,0x00000024,0x00060041,0x0000001c,0x00000035,0x00000033,0x0000001b,0x00000034, + 0x0004003d,0x00000006,0x00000036,0x00000035,0x0003003e,0x0000002f,0x00000036,0x0004003d, + 0x00000006,0x00000037,0x00000022,0x0004003d,0x00000006,0x0000003c,0x00000024,0x00060041, + 0x0000001c,0x0000003d,0x0000003b,0x0000001b,0x0000003c,0x0004003d,0x00000006,0x0000003e, + 0x0000003d,0x00050087,0x00000006,0x0000003f,0x00000037,0x0000003e,0x0004003d,0x00000006, + 0x00000044,0x0000002f,0x00060041,0x0000001c,0x00000045,0x00000043,0x0000001b,0x00000044, + 0x0004003d,0x00000006,0x00000046,0x00000045,0x00050084,0x00000006,0x00000047,0x0000003f, + 0x00000046,0x0004003d,0x00000006,0x00000048,0x00000021,0x00050080,0x00000006,0x00000049, + 0x00000048,0x00000047,0x0003003e,0x00000021,0x00000049,0x0004003d,0x00000006,0x0000004a, + 0x00000024,0x00060041,0x0000001c,0x0000004b,0x0000003b,0x0000001b,0x0000004a,0x0004003d, + 0x00000006,0x0000004c,0x0000004b,0x0004003d,0x00000006,0x0000004d,0x00000022,0x0005008b, + 0x00000006,0x0000004e,0x0000004d,0x0000004c,0x0003003e,0x00000022,0x0000004e,0x000200f9, + 0x00000028,0x000200f8,0x00000028,0x0004003d,0x00000006,0x0000004f,0x00000024,0x00050080, + 0x00000006,0x00000050,0x0000004f,0x0000002b,0x0003003e,0x00000024,0x00000050,0x000200f9, + 0x00000025,0x000200f8,0x00000027,0x0004003d,0x00000006,0x00000056,0x00000008,0x0004003d, + 0x00000006,0x0000005b,0x00000021,0x00060041,0x0000005c,0x0000005d,0x0000005a,0x0000001b, + 0x0000005b,0x0004003d,0x00000051,0x0000005e,0x0000005d,0x00060041,0x0000005c,0x0000005f, + 0x00000055,0x0000001b,0x00000056,0x0003003e,0x0000005f,0x0000005e,0x000200f9,0x00000015, + 0x000200f8,0x00000015,0x00050041,0x0000001c,0x00000061,0x0000001a,0x00000060,0x0004003d, + 0x00000006,0x00000062,0x00000061,0x0004003d,0x00000006,0x00000063,0x00000008,0x00050080, + 0x00000006,0x00000064,0x00000063,0x00000062,0x0003003e,0x00000008,0x00000064,0x000200f9, + 0x00000012,0x000200f8,0x00000014,0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/prior_box.comp b/modules/dnn/src/webgpu/shader/prior_box.comp new file mode 100644 index 000000000000..c313130a6ec8 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/prior_box.comp @@ -0,0 +1,77 @@ +#version 450 +#define LOCAL_SZ_X 256 + +layout(binding = 0) buffer Input0{ + float offset_x[]; +}; +layout(binding = 1) buffer Input1{ + float offset_y[]; +}; +layout(binding = 2) buffer Input2{ + float widths[]; +}; +layout(binding = 3) buffer Input3{ + float heights[]; +}; +layout(binding = 4) buffer Input4{ + vec4 variance[]; +}; +layout(binding = 5) buffer Output{ + vec4 out_buffer[]; +}; +layout(binding = 6) uniform pushBlock { + int global_size; + int nthreads; + float step_x; + float step_y; + int offset_x_size; + int width_size; + int layer_w; + int image_h; + int image_w; + int clip; + int variance_off; +} p; + +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; + +void main() +{ + for (int index = int(gl_GlobalInvocationID.x); index < p.nthreads; index += p.global_size) + { + int w = index % p.layer_w; + int h = index / p.layer_w; + int output_offset = index * p.offset_x_size * p.width_size; + + float box_w, box_h; + vec4 outer; + for (int i = 0; i < p.width_size; ++i) + { + box_w = widths[i]; + box_h = heights[i]; + for (int j = 0; j < p.offset_x_size; ++j) + { + float center_x = (w + offset_x[j]) * p.step_x; + float center_y = (h + offset_y[j]) * p.step_y; + + outer.x = (center_x - box_w * 0.5f) / p.image_w; // xmin + outer.y = (center_y - box_h * 0.5f) / p.image_h; // ymin + outer.z = (center_x + box_w * 0.5f) / p.image_w; // xmax + outer.w = (center_y + box_h * 0.5f) / p.image_h; // ymax + + // clip + if (p.clip == 1) + { + vec4 start = vec4(0.f, 0.f, 0.f, 0.f); + vec4 end = vec4(1.f, 1.f, 1.f, 1.f); + outer = min(max(outer, start), end); + } + + //set variance + out_buffer[p.variance_off + output_offset] = variance[0]; + out_buffer[output_offset] = outer; + output_offset++; + } + } + } +} diff --git a/modules/dnn/src/webgpu/shader/prior_box_spv.cpp b/modules/dnn/src/webgpu/shader/prior_box_spv.cpp new file mode 100644 index 000000000000..ba038577ebfc --- /dev/null +++ b/modules/dnn/src/webgpu/shader/prior_box_spv.cpp @@ -0,0 +1,198 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int prior_box_spv[1460] = { + 0x07230203,0x00010000,0x00080009,0x000000da,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00060010,0x00000004, + 0x00000011,0x00000100,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005, + 0x00000004,0x6e69616d,0x00000000,0x00040005,0x00000008,0x65646e69,0x00000078,0x00080005, + 0x0000000c,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005, + 0x00000019,0x68737570,0x636f6c42,0x0000006b,0x00060006,0x00000019,0x00000000,0x626f6c67, + 0x735f6c61,0x00657a69,0x00060006,0x00000019,0x00000001,0x7268746e,0x73646165,0x00000000, + 0x00050006,0x00000019,0x00000002,0x70657473,0x0000785f,0x00050006,0x00000019,0x00000003, + 0x70657473,0x0000795f,0x00070006,0x00000019,0x00000004,0x7366666f,0x785f7465,0x7a69735f, + 0x00000065,0x00060006,0x00000019,0x00000005,0x74646977,0x69735f68,0x0000657a,0x00050006, + 0x00000019,0x00000006,0x6579616c,0x00775f72,0x00050006,0x00000019,0x00000007,0x67616d69, + 0x00685f65,0x00050006,0x00000019,0x00000008,0x67616d69,0x00775f65,0x00050006,0x00000019, + 0x00000009,0x70696c63,0x00000000,0x00070006,0x00000019,0x0000000a,0x69726176,0x65636e61, + 0x66666f5f,0x00000000,0x00030005,0x0000001b,0x00000070,0x00030005,0x00000022,0x00000077, + 0x00030005,0x00000028,0x00000068,0x00060005,0x0000002d,0x7074756f,0x6f5f7475,0x65736666, + 0x00000074,0x00030005,0x00000037,0x00000069,0x00040005,0x00000043,0x5f786f62,0x00000077, + 0x00040005,0x00000045,0x75706e49,0x00003274,0x00050006,0x00000045,0x00000000,0x74646977, + 0x00007368,0x00030005,0x00000047,0x00000000,0x00040005,0x0000004c,0x5f786f62,0x00000068, + 0x00040005,0x0000004e,0x75706e49,0x00003374,0x00050006,0x0000004e,0x00000000,0x67696568, + 0x00737468,0x00030005,0x00000050,0x00000000,0x00030005,0x00000054,0x0000006a,0x00050005, + 0x0000005e,0x746e6563,0x785f7265,0x00000000,0x00040005,0x00000062,0x75706e49,0x00003074, + 0x00060006,0x00000062,0x00000000,0x7366666f,0x785f7465,0x00000000,0x00030005,0x00000064, + 0x00000000,0x00050005,0x0000006d,0x746e6563,0x795f7265,0x00000000,0x00040005,0x00000071, + 0x75706e49,0x00003174,0x00060006,0x00000071,0x00000000,0x7366666f,0x795f7465,0x00000000, + 0x00030005,0x00000073,0x00000000,0x00040005,0x0000007e,0x6574756f,0x00000072,0x00040005, + 0x000000af,0x72617473,0x00000074,0x00030005,0x000000b2,0x00646e65,0x00040005,0x000000bb, + 0x7074754f,0x00007475,0x00060006,0x000000bb,0x00000000,0x5f74756f,0x66667562,0x00007265, + 0x00030005,0x000000bd,0x00000000,0x00040005,0x000000c4,0x75706e49,0x00003474,0x00060006, + 0x000000c4,0x00000000,0x69726176,0x65636e61,0x00000000,0x00030005,0x000000c6,0x00000000, + 0x00040047,0x0000000c,0x0000000b,0x0000001c,0x00050048,0x00000019,0x00000000,0x00000023, + 0x00000000,0x00050048,0x00000019,0x00000001,0x00000023,0x00000004,0x00050048,0x00000019, + 0x00000002,0x00000023,0x00000008,0x00050048,0x00000019,0x00000003,0x00000023,0x0000000c, + 0x00050048,0x00000019,0x00000004,0x00000023,0x00000010,0x00050048,0x00000019,0x00000005, + 0x00000023,0x00000014,0x00050048,0x00000019,0x00000006,0x00000023,0x00000018,0x00050048, + 0x00000019,0x00000007,0x00000023,0x0000001c,0x00050048,0x00000019,0x00000008,0x00000023, + 0x00000020,0x00050048,0x00000019,0x00000009,0x00000023,0x00000024,0x00050048,0x00000019, + 0x0000000a,0x00000023,0x00000028,0x00030047,0x00000019,0x00000002,0x00040047,0x0000001b, + 0x00000022,0x00000000,0x00040047,0x0000001b,0x00000021,0x00000006,0x00040047,0x00000044, + 0x00000006,0x00000004,0x00050048,0x00000045,0x00000000,0x00000023,0x00000000,0x00030047, + 0x00000045,0x00000003,0x00040047,0x00000047,0x00000022,0x00000000,0x00040047,0x00000047, + 0x00000021,0x00000002,0x00040047,0x0000004d,0x00000006,0x00000004,0x00050048,0x0000004e, + 0x00000000,0x00000023,0x00000000,0x00030047,0x0000004e,0x00000003,0x00040047,0x00000050, + 0x00000022,0x00000000,0x00040047,0x00000050,0x00000021,0x00000003,0x00040047,0x00000061, + 0x00000006,0x00000004,0x00050048,0x00000062,0x00000000,0x00000023,0x00000000,0x00030047, + 0x00000062,0x00000003,0x00040047,0x00000064,0x00000022,0x00000000,0x00040047,0x00000064, + 0x00000021,0x00000000,0x00040047,0x00000070,0x00000006,0x00000004,0x00050048,0x00000071, + 0x00000000,0x00000023,0x00000000,0x00030047,0x00000071,0x00000003,0x00040047,0x00000073, + 0x00000022,0x00000000,0x00040047,0x00000073,0x00000021,0x00000001,0x00040047,0x000000ba, + 0x00000006,0x00000010,0x00050048,0x000000bb,0x00000000,0x00000023,0x00000000,0x00030047, + 0x000000bb,0x00000003,0x00040047,0x000000bd,0x00000022,0x00000000,0x00040047,0x000000bd, + 0x00000021,0x00000005,0x00040047,0x000000c3,0x00000006,0x00000010,0x00050048,0x000000c4, + 0x00000000,0x00000023,0x00000000,0x00030047,0x000000c4,0x00000003,0x00040047,0x000000c6, + 0x00000022,0x00000000,0x00040047,0x000000c6,0x00000021,0x00000004,0x00040047,0x000000d9, + 0x0000000b,0x00000019,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015, + 0x00000006,0x00000020,0x00000001,0x00040020,0x00000007,0x00000007,0x00000006,0x00040015, + 0x00000009,0x00000020,0x00000000,0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020, + 0x0000000b,0x00000001,0x0000000a,0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b, + 0x00000009,0x0000000d,0x00000000,0x00040020,0x0000000e,0x00000001,0x00000009,0x00030016, + 0x00000018,0x00000020,0x000d001e,0x00000019,0x00000006,0x00000006,0x00000018,0x00000018, + 0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00040020, + 0x0000001a,0x00000002,0x00000019,0x0004003b,0x0000001a,0x0000001b,0x00000002,0x0004002b, + 0x00000006,0x0000001c,0x00000001,0x00040020,0x0000001d,0x00000002,0x00000006,0x00020014, + 0x00000020,0x0004002b,0x00000006,0x00000024,0x00000006,0x0004002b,0x00000006,0x0000002f, + 0x00000004,0x0004002b,0x00000006,0x00000033,0x00000005,0x0004002b,0x00000006,0x00000038, + 0x00000000,0x00040020,0x00000042,0x00000007,0x00000018,0x0003001d,0x00000044,0x00000018, + 0x0003001e,0x00000045,0x00000044,0x00040020,0x00000046,0x00000002,0x00000045,0x0004003b, + 0x00000046,0x00000047,0x00000002,0x00040020,0x00000049,0x00000002,0x00000018,0x0003001d, + 0x0000004d,0x00000018,0x0003001e,0x0000004e,0x0000004d,0x00040020,0x0000004f,0x00000002, + 0x0000004e,0x0004003b,0x0000004f,0x00000050,0x00000002,0x0003001d,0x00000061,0x00000018, + 0x0003001e,0x00000062,0x00000061,0x00040020,0x00000063,0x00000002,0x00000062,0x0004003b, + 0x00000063,0x00000064,0x00000002,0x0004002b,0x00000006,0x00000069,0x00000002,0x0003001d, + 0x00000070,0x00000018,0x0003001e,0x00000071,0x00000070,0x00040020,0x00000072,0x00000002, + 0x00000071,0x0004003b,0x00000072,0x00000073,0x00000002,0x0004002b,0x00000006,0x00000078, + 0x00000003,0x00040017,0x0000007c,0x00000018,0x00000004,0x00040020,0x0000007d,0x00000007, + 0x0000007c,0x0004002b,0x00000018,0x00000081,0x3f000000,0x0004002b,0x00000006,0x00000084, + 0x00000008,0x0004002b,0x00000006,0x0000008e,0x00000007,0x0004002b,0x00000009,0x00000093, + 0x00000001,0x0004002b,0x00000009,0x0000009d,0x00000002,0x0004002b,0x00000009,0x000000a7, + 0x00000003,0x0004002b,0x00000006,0x000000a9,0x00000009,0x0004002b,0x00000018,0x000000b0, + 0x00000000,0x0007002c,0x0000007c,0x000000b1,0x000000b0,0x000000b0,0x000000b0,0x000000b0, + 0x0004002b,0x00000018,0x000000b3,0x3f800000,0x0007002c,0x0000007c,0x000000b4,0x000000b3, + 0x000000b3,0x000000b3,0x000000b3,0x0003001d,0x000000ba,0x0000007c,0x0003001e,0x000000bb, + 0x000000ba,0x00040020,0x000000bc,0x00000002,0x000000bb,0x0004003b,0x000000bc,0x000000bd, + 0x00000002,0x0004002b,0x00000006,0x000000be,0x0000000a,0x0003001d,0x000000c3,0x0000007c, + 0x0003001e,0x000000c4,0x000000c3,0x00040020,0x000000c5,0x00000002,0x000000c4,0x0004003b, + 0x000000c5,0x000000c6,0x00000002,0x00040020,0x000000c7,0x00000002,0x0000007c,0x0004002b, + 0x00000009,0x000000d8,0x00000100,0x0006002c,0x0000000a,0x000000d9,0x000000d8,0x00000093, + 0x00000093,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005, + 0x0004003b,0x00000007,0x00000008,0x00000007,0x0004003b,0x00000007,0x00000022,0x00000007, + 0x0004003b,0x00000007,0x00000028,0x00000007,0x0004003b,0x00000007,0x0000002d,0x00000007, + 0x0004003b,0x00000007,0x00000037,0x00000007,0x0004003b,0x00000042,0x00000043,0x00000007, + 0x0004003b,0x00000042,0x0000004c,0x00000007,0x0004003b,0x00000007,0x00000054,0x00000007, + 0x0004003b,0x00000042,0x0000005e,0x00000007,0x0004003b,0x00000042,0x0000006d,0x00000007, + 0x0004003b,0x0000007d,0x0000007e,0x00000007,0x0004003b,0x0000007d,0x000000af,0x00000007, + 0x0004003b,0x0000007d,0x000000b2,0x00000007,0x00050041,0x0000000e,0x0000000f,0x0000000c, + 0x0000000d,0x0004003d,0x00000009,0x00000010,0x0000000f,0x0004007c,0x00000006,0x00000011, + 0x00000010,0x0003003e,0x00000008,0x00000011,0x000200f9,0x00000012,0x000200f8,0x00000012, + 0x000400f6,0x00000014,0x00000015,0x00000000,0x000200f9,0x00000016,0x000200f8,0x00000016, + 0x0004003d,0x00000006,0x00000017,0x00000008,0x00050041,0x0000001d,0x0000001e,0x0000001b, + 0x0000001c,0x0004003d,0x00000006,0x0000001f,0x0000001e,0x000500b1,0x00000020,0x00000021, + 0x00000017,0x0000001f,0x000400fa,0x00000021,0x00000013,0x00000014,0x000200f8,0x00000013, + 0x0004003d,0x00000006,0x00000023,0x00000008,0x00050041,0x0000001d,0x00000025,0x0000001b, + 0x00000024,0x0004003d,0x00000006,0x00000026,0x00000025,0x0005008b,0x00000006,0x00000027, + 0x00000023,0x00000026,0x0003003e,0x00000022,0x00000027,0x0004003d,0x00000006,0x00000029, + 0x00000008,0x00050041,0x0000001d,0x0000002a,0x0000001b,0x00000024,0x0004003d,0x00000006, + 0x0000002b,0x0000002a,0x00050087,0x00000006,0x0000002c,0x00000029,0x0000002b,0x0003003e, + 0x00000028,0x0000002c,0x0004003d,0x00000006,0x0000002e,0x00000008,0x00050041,0x0000001d, + 0x00000030,0x0000001b,0x0000002f,0x0004003d,0x00000006,0x00000031,0x00000030,0x00050084, + 0x00000006,0x00000032,0x0000002e,0x00000031,0x00050041,0x0000001d,0x00000034,0x0000001b, + 0x00000033,0x0004003d,0x00000006,0x00000035,0x00000034,0x00050084,0x00000006,0x00000036, + 0x00000032,0x00000035,0x0003003e,0x0000002d,0x00000036,0x0003003e,0x00000037,0x00000038, + 0x000200f9,0x00000039,0x000200f8,0x00000039,0x000400f6,0x0000003b,0x0000003c,0x00000000, + 0x000200f9,0x0000003d,0x000200f8,0x0000003d,0x0004003d,0x00000006,0x0000003e,0x00000037, + 0x00050041,0x0000001d,0x0000003f,0x0000001b,0x00000033,0x0004003d,0x00000006,0x00000040, + 0x0000003f,0x000500b1,0x00000020,0x00000041,0x0000003e,0x00000040,0x000400fa,0x00000041, + 0x0000003a,0x0000003b,0x000200f8,0x0000003a,0x0004003d,0x00000006,0x00000048,0x00000037, + 0x00060041,0x00000049,0x0000004a,0x00000047,0x00000038,0x00000048,0x0004003d,0x00000018, + 0x0000004b,0x0000004a,0x0003003e,0x00000043,0x0000004b,0x0004003d,0x00000006,0x00000051, + 0x00000037,0x00060041,0x00000049,0x00000052,0x00000050,0x00000038,0x00000051,0x0004003d, + 0x00000018,0x00000053,0x00000052,0x0003003e,0x0000004c,0x00000053,0x0003003e,0x00000054, + 0x00000038,0x000200f9,0x00000055,0x000200f8,0x00000055,0x000400f6,0x00000057,0x00000058, + 0x00000000,0x000200f9,0x00000059,0x000200f8,0x00000059,0x0004003d,0x00000006,0x0000005a, + 0x00000054,0x00050041,0x0000001d,0x0000005b,0x0000001b,0x0000002f,0x0004003d,0x00000006, + 0x0000005c,0x0000005b,0x000500b1,0x00000020,0x0000005d,0x0000005a,0x0000005c,0x000400fa, + 0x0000005d,0x00000056,0x00000057,0x000200f8,0x00000056,0x0004003d,0x00000006,0x0000005f, + 0x00000022,0x0004006f,0x00000018,0x00000060,0x0000005f,0x0004003d,0x00000006,0x00000065, + 0x00000054,0x00060041,0x00000049,0x00000066,0x00000064,0x00000038,0x00000065,0x0004003d, + 0x00000018,0x00000067,0x00000066,0x00050081,0x00000018,0x00000068,0x00000060,0x00000067, + 0x00050041,0x00000049,0x0000006a,0x0000001b,0x00000069,0x0004003d,0x00000018,0x0000006b, + 0x0000006a,0x00050085,0x00000018,0x0000006c,0x00000068,0x0000006b,0x0003003e,0x0000005e, + 0x0000006c,0x0004003d,0x00000006,0x0000006e,0x00000028,0x0004006f,0x00000018,0x0000006f, + 0x0000006e,0x0004003d,0x00000006,0x00000074,0x00000054,0x00060041,0x00000049,0x00000075, + 0x00000073,0x00000038,0x00000074,0x0004003d,0x00000018,0x00000076,0x00000075,0x00050081, + 0x00000018,0x00000077,0x0000006f,0x00000076,0x00050041,0x00000049,0x00000079,0x0000001b, + 0x00000078,0x0004003d,0x00000018,0x0000007a,0x00000079,0x00050085,0x00000018,0x0000007b, + 0x00000077,0x0000007a,0x0003003e,0x0000006d,0x0000007b,0x0004003d,0x00000018,0x0000007f, + 0x0000005e,0x0004003d,0x00000018,0x00000080,0x00000043,0x00050085,0x00000018,0x00000082, + 0x00000080,0x00000081,0x00050083,0x00000018,0x00000083,0x0000007f,0x00000082,0x00050041, + 0x0000001d,0x00000085,0x0000001b,0x00000084,0x0004003d,0x00000006,0x00000086,0x00000085, + 0x0004006f,0x00000018,0x00000087,0x00000086,0x00050088,0x00000018,0x00000088,0x00000083, + 0x00000087,0x00050041,0x00000042,0x00000089,0x0000007e,0x0000000d,0x0003003e,0x00000089, + 0x00000088,0x0004003d,0x00000018,0x0000008a,0x0000006d,0x0004003d,0x00000018,0x0000008b, + 0x0000004c,0x00050085,0x00000018,0x0000008c,0x0000008b,0x00000081,0x00050083,0x00000018, + 0x0000008d,0x0000008a,0x0000008c,0x00050041,0x0000001d,0x0000008f,0x0000001b,0x0000008e, + 0x0004003d,0x00000006,0x00000090,0x0000008f,0x0004006f,0x00000018,0x00000091,0x00000090, + 0x00050088,0x00000018,0x00000092,0x0000008d,0x00000091,0x00050041,0x00000042,0x00000094, + 0x0000007e,0x00000093,0x0003003e,0x00000094,0x00000092,0x0004003d,0x00000018,0x00000095, + 0x0000005e,0x0004003d,0x00000018,0x00000096,0x00000043,0x00050085,0x00000018,0x00000097, + 0x00000096,0x00000081,0x00050081,0x00000018,0x00000098,0x00000095,0x00000097,0x00050041, + 0x0000001d,0x00000099,0x0000001b,0x00000084,0x0004003d,0x00000006,0x0000009a,0x00000099, + 0x0004006f,0x00000018,0x0000009b,0x0000009a,0x00050088,0x00000018,0x0000009c,0x00000098, + 0x0000009b,0x00050041,0x00000042,0x0000009e,0x0000007e,0x0000009d,0x0003003e,0x0000009e, + 0x0000009c,0x0004003d,0x00000018,0x0000009f,0x0000006d,0x0004003d,0x00000018,0x000000a0, + 0x0000004c,0x00050085,0x00000018,0x000000a1,0x000000a0,0x00000081,0x00050081,0x00000018, + 0x000000a2,0x0000009f,0x000000a1,0x00050041,0x0000001d,0x000000a3,0x0000001b,0x0000008e, + 0x0004003d,0x00000006,0x000000a4,0x000000a3,0x0004006f,0x00000018,0x000000a5,0x000000a4, + 0x00050088,0x00000018,0x000000a6,0x000000a2,0x000000a5,0x00050041,0x00000042,0x000000a8, + 0x0000007e,0x000000a7,0x0003003e,0x000000a8,0x000000a6,0x00050041,0x0000001d,0x000000aa, + 0x0000001b,0x000000a9,0x0004003d,0x00000006,0x000000ab,0x000000aa,0x000500aa,0x00000020, + 0x000000ac,0x000000ab,0x0000001c,0x000300f7,0x000000ae,0x00000000,0x000400fa,0x000000ac, + 0x000000ad,0x000000ae,0x000200f8,0x000000ad,0x0003003e,0x000000af,0x000000b1,0x0003003e, + 0x000000b2,0x000000b4,0x0004003d,0x0000007c,0x000000b5,0x0000007e,0x0004003d,0x0000007c, + 0x000000b6,0x000000af,0x0007000c,0x0000007c,0x000000b7,0x00000001,0x00000028,0x000000b5, + 0x000000b6,0x0004003d,0x0000007c,0x000000b8,0x000000b2,0x0007000c,0x0000007c,0x000000b9, + 0x00000001,0x00000025,0x000000b7,0x000000b8,0x0003003e,0x0000007e,0x000000b9,0x000200f9, + 0x000000ae,0x000200f8,0x000000ae,0x00050041,0x0000001d,0x000000bf,0x0000001b,0x000000be, + 0x0004003d,0x00000006,0x000000c0,0x000000bf,0x0004003d,0x00000006,0x000000c1,0x0000002d, + 0x00050080,0x00000006,0x000000c2,0x000000c0,0x000000c1,0x00060041,0x000000c7,0x000000c8, + 0x000000c6,0x00000038,0x00000038,0x0004003d,0x0000007c,0x000000c9,0x000000c8,0x00060041, + 0x000000c7,0x000000ca,0x000000bd,0x00000038,0x000000c2,0x0003003e,0x000000ca,0x000000c9, + 0x0004003d,0x00000006,0x000000cb,0x0000002d,0x0004003d,0x0000007c,0x000000cc,0x0000007e, + 0x00060041,0x000000c7,0x000000cd,0x000000bd,0x00000038,0x000000cb,0x0003003e,0x000000cd, + 0x000000cc,0x0004003d,0x00000006,0x000000ce,0x0000002d,0x00050080,0x00000006,0x000000cf, + 0x000000ce,0x0000001c,0x0003003e,0x0000002d,0x000000cf,0x000200f9,0x00000058,0x000200f8, + 0x00000058,0x0004003d,0x00000006,0x000000d0,0x00000054,0x00050080,0x00000006,0x000000d1, + 0x000000d0,0x0000001c,0x0003003e,0x00000054,0x000000d1,0x000200f9,0x00000055,0x000200f8, + 0x00000057,0x000200f9,0x0000003c,0x000200f8,0x0000003c,0x0004003d,0x00000006,0x000000d2, + 0x00000037,0x00050080,0x00000006,0x000000d3,0x000000d2,0x0000001c,0x0003003e,0x00000037, + 0x000000d3,0x000200f9,0x00000039,0x000200f8,0x0000003b,0x000200f9,0x00000015,0x000200f8, + 0x00000015,0x00050041,0x0000001d,0x000000d4,0x0000001b,0x00000038,0x0004003d,0x00000006, + 0x000000d5,0x000000d4,0x0004003d,0x00000006,0x000000d6,0x00000008,0x00050080,0x00000006, + 0x000000d7,0x000000d6,0x000000d5,0x0003003e,0x00000008,0x000000d7,0x000200f9,0x00000012, + 0x000200f8,0x00000014,0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/relu.comp b/modules/dnn/src/webgpu/shader/relu.comp new file mode 100644 index 000000000000..2f6d215f6390 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/relu.comp @@ -0,0 +1,23 @@ +#version 450 +#define LOCAL_SZ_X 32 + +layout(binding = 0) buffer inbuf{ + float in_buffer[]; +}; + +layout(binding = 1) buffer outbuf{ + float out_buffer[]; +}; +layout(binding = 2) uniform pushBlock { + int total; + float slope; +} p; +layout(local_size_x = LOCAL_SZ_X, local_size_y = 1, local_size_z = 1) in; +void main() +{ + for (int i = int(gl_GlobalInvocationID.x); i < p.total; i += int(gl_NumWorkGroups.x * gl_WorkGroupSize.x)) + { + float in_val = in_buffer[i]; + out_buffer[i] = in_val >= 0.f ? in_val : p.slope * in_val; + } +} diff --git a/modules/dnn/src/webgpu/shader/relu_spv.cpp b/modules/dnn/src/webgpu/shader/relu_spv.cpp new file mode 100644 index 000000000000..d66875d643e0 --- /dev/null +++ b/modules/dnn/src/webgpu/shader/relu_spv.cpp @@ -0,0 +1,78 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../../precomp.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +extern const unsigned int relu_spv[498] = { + 0x07230203,0x00010000,0x00080009,0x0000004a,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0007000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00000040,0x00060010, + 0x00000004,0x00000011,0x00000020,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2, + 0x00040005,0x00000004,0x6e69616d,0x00000000,0x00030005,0x00000008,0x00000069,0x00080005, + 0x0000000c,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005, + 0x00000019,0x68737570,0x636f6c42,0x0000006b,0x00050006,0x00000019,0x00000000,0x61746f74, + 0x0000006c,0x00050006,0x00000019,0x00000001,0x706f6c73,0x00000065,0x00030005,0x0000001b, + 0x00000070,0x00040005,0x00000023,0x765f6e69,0x00006c61,0x00040005,0x00000025,0x75626e69, + 0x00000066,0x00060006,0x00000025,0x00000000,0x625f6e69,0x65666675,0x00000072,0x00030005, + 0x00000027,0x00000000,0x00040005,0x0000002d,0x6274756f,0x00006675,0x00060006,0x0000002d, + 0x00000000,0x5f74756f,0x66667562,0x00007265,0x00030005,0x0000002f,0x00000000,0x00070005, + 0x00000040,0x4e5f6c67,0x6f576d75,0x72476b72,0x7370756f,0x00000000,0x00040047,0x0000000c, + 0x0000000b,0x0000001c,0x00050048,0x00000019,0x00000000,0x00000023,0x00000000,0x00050048, + 0x00000019,0x00000001,0x00000023,0x00000004,0x00030047,0x00000019,0x00000002,0x00040047, + 0x0000001b,0x00000022,0x00000000,0x00040047,0x0000001b,0x00000021,0x00000002,0x00040047, + 0x00000024,0x00000006,0x00000004,0x00050048,0x00000025,0x00000000,0x00000023,0x00000000, + 0x00030047,0x00000025,0x00000003,0x00040047,0x00000027,0x00000022,0x00000000,0x00040047, + 0x00000027,0x00000021,0x00000000,0x00040047,0x0000002c,0x00000006,0x00000004,0x00050048, + 0x0000002d,0x00000000,0x00000023,0x00000000,0x00030047,0x0000002d,0x00000003,0x00040047, + 0x0000002f,0x00000022,0x00000000,0x00040047,0x0000002f,0x00000021,0x00000001,0x00040047, + 0x00000040,0x0000000b,0x00000018,0x00040047,0x00000049,0x0000000b,0x00000019,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000001, + 0x00040020,0x00000007,0x00000007,0x00000006,0x00040015,0x00000009,0x00000020,0x00000000, + 0x00040017,0x0000000a,0x00000009,0x00000003,0x00040020,0x0000000b,0x00000001,0x0000000a, + 0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x00000009,0x0000000d,0x00000000, + 0x00040020,0x0000000e,0x00000001,0x00000009,0x00030016,0x00000018,0x00000020,0x0004001e, + 0x00000019,0x00000006,0x00000018,0x00040020,0x0000001a,0x00000002,0x00000019,0x0004003b, + 0x0000001a,0x0000001b,0x00000002,0x0004002b,0x00000006,0x0000001c,0x00000000,0x00040020, + 0x0000001d,0x00000002,0x00000006,0x00020014,0x00000020,0x00040020,0x00000022,0x00000007, + 0x00000018,0x0003001d,0x00000024,0x00000018,0x0003001e,0x00000025,0x00000024,0x00040020, + 0x00000026,0x00000002,0x00000025,0x0004003b,0x00000026,0x00000027,0x00000002,0x00040020, + 0x00000029,0x00000002,0x00000018,0x0003001d,0x0000002c,0x00000018,0x0003001e,0x0000002d, + 0x0000002c,0x00040020,0x0000002e,0x00000002,0x0000002d,0x0004003b,0x0000002e,0x0000002f, + 0x00000002,0x0004002b,0x00000018,0x00000032,0x00000000,0x0004002b,0x00000006,0x00000039, + 0x00000001,0x0004003b,0x0000000b,0x00000040,0x00000001,0x0004002b,0x00000009,0x00000043, + 0x00000020,0x0004002b,0x00000009,0x00000048,0x00000001,0x0006002c,0x0000000a,0x00000049, + 0x00000043,0x00000048,0x00000048,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003, + 0x000200f8,0x00000005,0x0004003b,0x00000007,0x00000008,0x00000007,0x0004003b,0x00000022, + 0x00000023,0x00000007,0x0004003b,0x00000022,0x00000034,0x00000007,0x00050041,0x0000000e, + 0x0000000f,0x0000000c,0x0000000d,0x0004003d,0x00000009,0x00000010,0x0000000f,0x0004007c, + 0x00000006,0x00000011,0x00000010,0x0003003e,0x00000008,0x00000011,0x000200f9,0x00000012, + 0x000200f8,0x00000012,0x000400f6,0x00000014,0x00000015,0x00000000,0x000200f9,0x00000016, + 0x000200f8,0x00000016,0x0004003d,0x00000006,0x00000017,0x00000008,0x00050041,0x0000001d, + 0x0000001e,0x0000001b,0x0000001c,0x0004003d,0x00000006,0x0000001f,0x0000001e,0x000500b1, + 0x00000020,0x00000021,0x00000017,0x0000001f,0x000400fa,0x00000021,0x00000013,0x00000014, + 0x000200f8,0x00000013,0x0004003d,0x00000006,0x00000028,0x00000008,0x00060041,0x00000029, + 0x0000002a,0x00000027,0x0000001c,0x00000028,0x0004003d,0x00000018,0x0000002b,0x0000002a, + 0x0003003e,0x00000023,0x0000002b,0x0004003d,0x00000006,0x00000030,0x00000008,0x0004003d, + 0x00000018,0x00000031,0x00000023,0x000500be,0x00000020,0x00000033,0x00000031,0x00000032, + 0x000300f7,0x00000036,0x00000000,0x000400fa,0x00000033,0x00000035,0x00000038,0x000200f8, + 0x00000035,0x0004003d,0x00000018,0x00000037,0x00000023,0x0003003e,0x00000034,0x00000037, + 0x000200f9,0x00000036,0x000200f8,0x00000038,0x00050041,0x00000029,0x0000003a,0x0000001b, + 0x00000039,0x0004003d,0x00000018,0x0000003b,0x0000003a,0x0004003d,0x00000018,0x0000003c, + 0x00000023,0x00050085,0x00000018,0x0000003d,0x0000003b,0x0000003c,0x0003003e,0x00000034, + 0x0000003d,0x000200f9,0x00000036,0x000200f8,0x00000036,0x0004003d,0x00000018,0x0000003e, + 0x00000034,0x00060041,0x00000029,0x0000003f,0x0000002f,0x0000001c,0x00000030,0x0003003e, + 0x0000003f,0x0000003e,0x000200f9,0x00000015,0x000200f8,0x00000015,0x00050041,0x0000000e, + 0x00000041,0x00000040,0x0000000d,0x0004003d,0x00000009,0x00000042,0x00000041,0x00050084, + 0x00000009,0x00000044,0x00000042,0x00000043,0x0004007c,0x00000006,0x00000045,0x00000044, + 0x0004003d,0x00000006,0x00000046,0x00000008,0x00050080,0x00000006,0x00000047,0x00000046, + 0x00000045,0x0003003e,0x00000008,0x00000047,0x000200f9,0x00000012,0x000200f8,0x00000014, + 0x000100fd,0x00010038 +}; + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/shader/spv_shader.hpp b/modules/dnn/src/webgpu/shader/spv_shader.hpp index 9a2d3b31035d..3c5b9916c716 100644 --- a/modules/dnn/src/webgpu/shader/spv_shader.hpp +++ b/modules/dnn/src/webgpu/shader/spv_shader.hpp @@ -11,7 +11,17 @@ namespace cv { namespace dnn { namespace webgpu { +extern const unsigned int lrn_spv[1841]; +extern const unsigned int permute_spv[749]; +extern const unsigned int dw_conv_spv[1754]; +extern const unsigned int conv_spv[1888]; +extern const unsigned int relu_spv[498]; extern const unsigned int softmax_spv[1500]; +extern const unsigned int avg_pool_spv[1538]; +extern const unsigned int conv48_spv[10141]; +extern const unsigned int concat_spv[541]; +extern const unsigned int prior_box_spv[1460]; +extern const unsigned int max_pool_spv[1445]; }}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/buffer.cpp b/modules/dnn/src/webgpu/src/buffer.cpp index 77fb4f4dcdaa..9a38886d4f53 100644 --- a/modules/dnn/src/webgpu/src/buffer.cpp +++ b/modules/dnn/src/webgpu/src/buffer.cpp @@ -1,10 +1,13 @@ -#include "../include/buffer.hpp" +#include #include "../dawn/dawnUtils.hpp" +#include "../../precomp.hpp" #include "common.hpp" -#include +#include "internal.hpp" +#include "../include/buffer.hpp" + namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU Buffer::Buffer(std::shared_ptr device) { device_ = device; @@ -22,6 +25,7 @@ Buffer::Buffer(std::shared_ptr device, wgpu::BufferDescriptor descriptor = {}; descriptor.size = size; descriptor.usage = usage; + WGPU_CHECK_POINTER_RET_VOID(device_); buffer_ = device_->CreateBuffer(& descriptor); if(data) buffer_.SetSubData(0, size_, data); } @@ -36,6 +40,7 @@ Buffer::Buffer(const void* data, size_t size, wgpu::BufferDescriptor descriptor = {}; descriptor.size = size; descriptor.usage = usage; + WGPU_CHECK_POINTER_RET_VOID(device_) buffer_ = device_->CreateBuffer(& descriptor); if(data) buffer_.SetSubData(0, size_, data); } @@ -48,6 +53,7 @@ void Buffer::setBufferData(const void * data, size_t size) const void* Buffer::MapReadAsyncAndWait() { + if(size_ == 0) CV_Error(Error::StsError, "GPU buffer is null"); if(! gpuReadBuffer_) { wgpu::BufferDescriptor desc = {}; @@ -59,19 +65,17 @@ const void* Buffer::MapReadAsyncAndWait() encoder.CopyBufferToBuffer(buffer_, 0, gpuReadBuffer_, 0, size_); wgpu::CommandBuffer cmdBuffer = encoder.Finish(); - encoder.Release(); wQueue->Submit(1, &cmdBuffer); + encoder.Release(); cmdBuffer.Release(); gpuReadBuffer_.MapReadAsync(BufferMapReadCallback, this); - usleep(100); while(mappedData == nullptr) { device_->Tick(); - usleep(100); } return mappedData; } -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} //namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/common.hpp b/modules/dnn/src/webgpu/src/common.hpp index c0db85896e0a..77a9704c85b4 100644 --- a/modules/dnn/src/webgpu/src/common.hpp +++ b/modules/dnn/src/webgpu/src/common.hpp @@ -11,33 +11,56 @@ #include #include #include -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU #include -// #endif +#endif // HAVE_WEBGPU #include "opencv2/core/utils/logger.hpp" #include "../shader/spv_shader.hpp" -#include "../../precomp.hpp" #include "../include/wgpucom.hpp" -#include "context.hpp" namespace cv { namespace dnn { namespace webgpu { - -// #ifdef HAVE_WEBGPU - +#ifdef HAVE_WEBGPU extern std::shared_ptr wDevice; extern std::shared_ptr wQueue; extern cv::Mutex wContextMtx; enum ShapeIdx { - kShapeIdxBatch = 0, - kShapeIdxChannel, - kShapeIdxHeight, - kShapeIdxWidth, + wShapeIdxBatch = 0, + wShapeIdxChannel, + wShapeIdxHeight, + wShapeIdxWidth, }; +#define WGPU_CHECK_BOOL_RET_VAL(val, ret) \ +{ \ + bool res = (val); \ + if (!res) \ + { \ + CV_LOG_WARNING(NULL, "Check bool failed"); \ + return ret; \ + } \ +} + +#define WGPU_CHECK_POINTER_RET_VOID(p) \ +{ \ + if (NULL == (p)) \ + { \ + CV_LOG_WARNING(NULL, "Check pointer failed"); \ + return; \ + } \ +} + +#define WGPU_CHECK_POINTER_RET_VAL(p, val) \ +{ \ + if (NULL == (p)) \ + { \ + CV_LOG_WARNING(NULL, "Check pointer failed"); \ + return (val); \ + } \ +} -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU -}}} // namespace cv::dnn::vkcom +}}} // namespace cv::dnn::webgpu #endif // OPENCV_DNN_WEBGPU_COMMON_HPP \ No newline at end of file diff --git a/modules/dnn/src/webgpu/src/context.cpp b/modules/dnn/src/webgpu/src/context.cpp index 8791e9fa6525..59a3a3355135 100644 --- a/modules/dnn/src/webgpu/src/context.cpp +++ b/modules/dnn/src/webgpu/src/context.cpp @@ -1,11 +1,10 @@ #include "../../precomp.hpp" #include "common.hpp" #include "context.hpp" -#include #include "../dawn/dawnUtils.hpp" -#include + namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU std::shared_ptr wCtx; std::shared_ptr wDevice; @@ -16,7 +15,7 @@ cv::Mutex wContextMtx; void createContext() { cv::AutoLock lock(wContextMtx); - if (!wCtx && !wDevice) + if (!wCtx || !wDevice) { wCtx.reset(new Context()); } @@ -48,6 +47,6 @@ Context::~Context() wQueue->Release(); } -// #endif +#endif // HAVE_WEBGPU }}} // namespace cv::dnn::webgpu \ No newline at end of file diff --git a/modules/dnn/src/webgpu/src/context.hpp b/modules/dnn/src/webgpu/src/context.hpp index 1588fab79192..cd1bc25d257a 100644 --- a/modules/dnn/src/webgpu/src/context.hpp +++ b/modules/dnn/src/webgpu/src/context.hpp @@ -2,9 +2,9 @@ #define OPENCV_DNN_WEBGPU_CONTEXT_HPP namespace cv { namespace dnn { namespace webgpu { +#ifdef HAVE_WEBGPU class Context { -// #ifdef HAVE_WEBGPU public: Context(); @@ -13,7 +13,7 @@ class Context void createContext(); -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/internal.cpp b/modules/dnn/src/webgpu/src/internal.cpp index a888810de1a5..233ea417e4ed 100644 --- a/modules/dnn/src/webgpu/src/internal.cpp +++ b/modules/dnn/src/webgpu/src/internal.cpp @@ -11,7 +11,7 @@ namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU // std::vector compile(const std::string& name, // shaderc_shader_kind kind, @@ -47,27 +47,19 @@ namespace cv { namespace dnn { namespace webgpu { void bindTensor(Tensor& tensor, uint32_t binding, std::vector& bgEntries) { - wgpu::BindGroupEntry bgEntry = {}; - bgEntry.binding = binding; - bgEntry.buffer = * tensor.getBuffer()->getWebGPUBuffer(); - bgEntry.offset = 0; - bgEntry.size = tensor.size(); - bgEntry.sampler = nullptr; - bgEntry.textureView = nullptr; - bgEntries.push_back(bgEntry); + if(bgEntries.size() < binding) + CV_Error(Error::StsBadArg, "Binding buffer num does not match"); + bgEntries.at(binding).buffer = * tensor.getBuffer()->getWebGPUBuffer(); + bgEntries.at(binding).size = tensor.size(); } void bindUniform(Buffer& buffer, uint32_t binding, std::vector& bgEntries) { - wgpu::BindGroupEntry bgEntry = {}; - bgEntry.binding = binding; - bgEntry.buffer = * buffer.getWebGPUBuffer(); - bgEntry.offset = 0; - bgEntry.size = buffer.getSize(); - bgEntry.sampler = nullptr; - bgEntry.textureView = nullptr; - bgEntries.push_back(bgEntry); + if(bgEntries.size() < binding) + CV_Error(Error::StsBadArg, "Binding buffer num does not match"); + bgEntries.at(binding).buffer = * buffer.getWebGPUBuffer(); + bgEntries.at(binding).size = buffer.getSize(); } void computeConvOutputShapeAndPadding(const PaddingMode& padding_mode, @@ -157,7 +149,7 @@ void computePoolOutputShape(const PaddingMode& padding_mode, } } -// #endif +#endif // HAVE_WEBGPU }}} //namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/internal.hpp b/modules/dnn/src/webgpu/src/internal.hpp index 94b1bf316fb3..61c22d0db55c 100644 --- a/modules/dnn/src/webgpu/src/internal.hpp +++ b/modules/dnn/src/webgpu/src/internal.hpp @@ -14,7 +14,7 @@ typedef int shaderc_shader_kind; namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU std::vector compile(const std::string& name, shaderc_shader_kind kind, const std::string& data); @@ -76,7 +76,7 @@ inline int shapeCount(const Shape& shape, int start = -1, int end = -1) } return elems; } -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} //namespace::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_base.cpp b/modules/dnn/src/webgpu/src/op_base.cpp index ac104d3da555..3f1a82874b2c 100644 --- a/modules/dnn/src/webgpu/src/op_base.cpp +++ b/modules/dnn/src/webgpu/src/op_base.cpp @@ -6,7 +6,7 @@ #include namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU OpBase::OpBase() { createContext(); @@ -21,15 +21,15 @@ OpBase::OpBase() OpBase::~OpBase() { - module_.Release(); - bindgrouplayout_.Release(); - bindgroup_.Release(); - pipeline_.Release(); - pipeline_layout_.Release(); - cmd_buffer_.Release(); + if(module_) module_.Release(); + if(bindgrouplayout_) bindgrouplayout_.Release(); + if(bindgroup_) bindgroup_.Release(); + if(pipeline_layout_) pipeline_layout_.Release(); + if(pipeline_) pipeline_.Release(); + if(cmd_buffer_) cmd_buffer_.Release(); + if(uniformBuffer_) uniformBuffer_->getWebGPUBuffer()->Release(); } -// the wgpu::BindingType has to be specified -// UniformBuffer | StorageBuffer | ReadOnlyStorageBuffer | MapReadBuffer + void OpBase::createBindGroupLayout(int buffer_num) { if(buffer_num <= 0) @@ -42,17 +42,29 @@ void OpBase::createBindGroupLayout(int buffer_num) entry.type = wgpu::BindingType::StorageBuffer; entriesInitializer.push_back(entry); } - if(needsUniform) { - wgpu::BindGroupLayoutEntry entry = {}; - entry.binding = buffer_num; - entry.visibility = wgpu::ShaderStage::Compute; - entry.type = wgpu::BindingType::UniformBuffer; - entriesInitializer.push_back(entry); - } + // unfirom buffer + wgpu::BindGroupLayoutEntry entry = {}; + entry.binding = buffer_num; + entry.visibility = wgpu::ShaderStage::Compute; + entry.type = wgpu::BindingType::UniformBuffer; + entriesInitializer.push_back(entry); + wgpu::BindGroupLayoutDescriptor descriptor; descriptor.entryCount = entriesInitializer.size(); descriptor.entries = entriesInitializer.data(); bindgrouplayout_ = device_->CreateBindGroupLayout(&descriptor); + + for(int i = 0; i <= buffer_num; i++) + { + wgpu::BindGroupEntry bgEntry = {}; + bgEntry.binding = i; + bgEntry.buffer = nullptr; + bgEntry.offset = 0; + bgEntry.size = 0; + bgEntry.sampler = nullptr; + bgEntry.textureView = nullptr; + bgEntries.push_back(bgEntry); + } } void OpBase::createBindGroup() @@ -113,28 +125,13 @@ void OpBase::createCommandBuffer() cmd_buffer_ = encoder.Finish(); } -wgpu::FenceCompletionStatus OpBase::WaitForCompletedValue( - wgpu::Fence fence, uint64_t completedValue) -{ - if (fence.GetCompletedValue() < completedValue) - { - device_->Tick(); - usleep(100); - } - if(fence.GetCompletedValue() != completedValue) - { - return wgpu::FenceCompletionStatus::Error; - } - - return wgpu::FenceCompletionStatus::Success; -} - void OpBase::runCommandBuffer() { cv::AutoLock lock(wContextMtx); wQueue->Submit(1, &cmd_buffer_); + cmd_buffer_.Release(); } -// #endif //HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} // namsspace cv::dnn::webgpu \ No newline at end of file diff --git a/modules/dnn/src/webgpu/src/op_concat.cpp b/modules/dnn/src/webgpu/src/op_concat.cpp new file mode 100644 index 000000000000..2554cc7657ca --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_concat.cpp @@ -0,0 +1,132 @@ +#include "../../precomp.hpp" +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_concat.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +#define LOCAL_SZ_X 256 + +struct ConcatParam { + int out_concat_axis; + int accumulated_concat_axis; + int concat_size; + int total_concat_size; + int thread_num; +}; + +OpConcat::OpConcat(const int axis) +{ + init(axis); + type_ = "Concat"; +} + +bool OpConcat::init(const int axis) +{ + axis_ = axis; + createBindGroupLayout(2); + return true; +} + +void OpConcat::reshapeOutTensor(std::vector& in, Tensor& out) +{ + int sum_axis = 0; + + for (int i = 0; i < in.size(); ++i) + { + sum_axis += in[i]->dimSize(axis_); + } + + Shape shape = in[0]->getShape(); + shape[axis_] = sum_axis; + out.reshape(NULL, shape); +} + +bool OpConcat::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + return forward(ins, outs[0]); +} + +bool OpConcat::forward(std::vector& ins, Tensor& out) +{ + int input_num = ins.size(); + Tensor& first_tensor = ins[0]; + int sum_axis = first_tensor.dimSize(axis_); + int dim_num = first_tensor.dimNum(); + for (int i = 1; i < input_num; ++i) + { + Tensor& tensor = ins[i]; + assert(tensor.dimNum() == dim_num); + for (int d = 0; d < dim_num; ++d) + { + if (d == axis_) + { + sum_axis += tensor.dimSize(axis_);; + } + else + { + assert(first_tensor.dimSize(d) == tensor.dimSize(d)); + } + } + } + + assert(out.dimSize(axis_) == sum_axis); + for (int d = 0; d < dim_num; ++d) + { + if (d != axis_) + { + assert(out.dimSize(d) == first_tensor.dimSize(d)); + } + } + out_concat_axis_ = sum_axis; + concat_size_ = out.count(axis_ + 1); + if(pipeline_ == nullptr) + { + config_.local_size_x = LOCAL_SZ_X; + config_.block_height = 1; + config_.block_width = 1; + config_.block_depth = 1; + createShaderModule(concat_spv, sizeof(concat_spv)/sizeof(uint32_t)); + createComputePipeline(); + } + + accumulated_concat_axis_ = 0; + for (int i = 0; i < input_num; i++) + { + bindTensor(ins[i], 0, bgEntries); + bindTensor(out, 1, bgEntries); + total_concat_size_ = ins[i].count(axis_); + thread_num_ = ins[i].count(); + computeGroupCount(); + ConcatParam param = {out_concat_axis_, + accumulated_concat_axis_, + concat_size_, + total_concat_size_, + thread_num_}; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(ConcatParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(ConcatParam)); + bindUniform(* uniformBuffer_, 2, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + accumulated_concat_axis_ += ins[i].dimSize(axis_); + } + return true; +} + +bool OpConcat::computeGroupCount() +{ + group_x_ = alignSize(thread_num_, config_.local_size_x) / config_.local_size_x; + group_y_ = 1; + group_z_ = 1; + + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_conv.cpp b/modules/dnn/src/webgpu/src/op_conv.cpp new file mode 100644 index 000000000000..58e2e7266457 --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_conv.cpp @@ -0,0 +1,291 @@ +#include "../../precomp.hpp" +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_softmax.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +#define DEFAULT_LOCAL_SZ 256 +#define MAX_COMPUTE_GFLOPS 10 + +#define MAX_GROUP_COUNT_X 65535 +#define MAX_GROUP_COUNT_Y 65535 +#define MAX_GROUP_COUNT_Z 65535 + +struct ShaderConstant { + int lsz_x; + int lsz_y; + int lsz_z; + int in_h; + int in_w; + int out_w; + int stride_h; + int stride_w; + int pad_h; + int pad_w; + int filter_h; + int filter_w; + int channels; + int batch; + int m; + int k; + int n; + int tail_m; + int dilation_h; + int dilation_w; +}; + +struct ShaderParam { + int in_h; + int in_w; + int out_h; + int out_w; + int stride_h; + int stride_w; + int pad_h; + int pad_w; + int filter_h; + int filter_w; + int dilation_h; + int dilation_w; + int channels; + int batch; + int has_bias; + int M; + int K; + int N; + int basic_shader_batch_idx; + int basic_shader_partition_idx; + int basic_shader_partition_size; +}; + +OpConv::OpConv(const int out_channel, const bool has_bias, + const int* filter_size, const int* pad, + const int* stride, const int* dilation, + const int activation, const int group, + const int padding_mode) +{ + init(out_channel, has_bias, filter_size, pad, + stride, dilation, activation, group, padding_mode); + type_ = "Conv"; +} + +void OpConv::reshapeOutTensor(Tensor& in, Tensor& out) +{ + Shape in_shape = in.getShape(); + batch_ = in_shape[wShapeIdxBatch]; + in_height_ = in_shape[wShapeIdxHeight]; + in_width_ = in_shape[wShapeIdxWidth]; + computeConvOutputShapeAndPadding(padding_mode_, padding_top_, padding_left_, + in_height_, in_width_, + filter_height_, filter_width_, + dilation_height_, dilation_width_, + stride_height_, stride_width_, + out_height_, out_width_); + Shape shape = {batch_, out_channel_, out_height_, out_width_}; + out.reshape(NULL, shape); +} + +bool OpConv::init(const int out_channel, const bool has_bias, + const int* filter_size, const int* pad, + const int* stride, const int* dilation, + const int activation, const int group, + const int padding_mode) +{ + out_channel_ = out_channel; + filter_height_ = filter_size[0]; + filter_width_ = filter_size[1]; + padding_top_ = pad[0]; + padding_left_ = pad[1]; + stride_height_ = stride[0]; + stride_width_ = stride[1]; + dilation_height_ = dilation[0]; + dilation_width_ = dilation[1]; + padding_mode_ = (PaddingMode)padding_mode; + has_bias_ = has_bias ? 1 : 0; + activation_ = activation; + group_ = group; + createBindGroupLayout(4); + return true; +} + +bool OpConv::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + std::vector shape = {1}; + Tensor bias(0, shape); + + if (has_bias_) + { + assert(blobs.size() == 2); + bias = blobs[1]; + } + + return forward(ins[0], blobs[0], bias, outs[0]); +} + +bool OpConv::forward(Tensor& in, Tensor& filter_weights, Tensor& bias, Tensor& out) +{ + Shape in_shape = in.getShape(); + Shape out_shape = out.getShape(); + batch_ = in_shape[wShapeIdxBatch]; + in_height_ = in_shape[wShapeIdxHeight]; + in_width_ = in_shape[wShapeIdxWidth]; + in_channel_= in_shape[wShapeIdxChannel]; + out_height_ = out_shape[wShapeIdxHeight]; + out_width_ = out_shape[wShapeIdxWidth]; + int M = out_height_ * out_width_; + int K = filter_height_ * filter_width_ * in_channel_; + int N = out_channel_; + if(pipeline_ == nullptr) + { + config_.local_size_x = DEFAULT_LOCAL_SZ; + config_.local_size_y = 1; + config_.local_size_z = 1; + config_.block_height = 1; + config_.block_width = 1; + config_.block_depth = 1; + if ((N % 8 == 0) && (K % 4 == 0) && (M % 4) == 0) + { + assert(group_ == 1); // TODO: support group > 1 + config_.shader_type = wConvShaderType48; + config_.local_size_x = 1; + config_.local_size_y = DEFAULT_LOCAL_SZ; + config_.local_size_z = 1; + config_.block_height = 4; + config_.block_width = 8; + createShaderModule(conv48_spv, sizeof(conv48_spv)/sizeof(uint32_t)); + ShaderConstant shader_constant; + shader_constant.lsz_x = config_.local_size_x; + shader_constant.lsz_y = config_.local_size_y; + shader_constant.lsz_z = config_.local_size_z; + shader_constant.in_h = in_height_; + shader_constant.in_w = in_width_; + shader_constant.out_w = out_width_; + shader_constant.stride_h = stride_height_; + shader_constant.stride_w = stride_width_; + shader_constant.pad_h = padding_top_; + shader_constant.pad_w = padding_left_; + shader_constant.filter_h = filter_height_; + shader_constant.filter_w = filter_width_; + shader_constant.channels = in_channel_; + shader_constant.batch = batch_; + shader_constant.m = M; + shader_constant.k = K; + shader_constant.n = N; + shader_constant.tail_m = M % 4; + shader_constant.dilation_h = dilation_height_; + shader_constant.dilation_w = dilation_width_; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(&shader_constant, sizeof(ShaderConstant)); + else uniformBuffer_->setBufferData(&shader_constant, sizeof(ShaderConstant)); + } + else if (out_channel_ == in_channel_ && in_channel_ == group_) + { + config_.shader_type = wConvShaderTypeDepthWise; + createShaderModule(dw_conv_spv, sizeof(dw_conv_spv)/sizeof(uint32_t)); + } + else + { + assert(group_ == 1); // TODO: support group > 1 + config_.shader_type = wConvShaderTypeBasic; + createShaderModule(conv_spv, sizeof(conv_spv)/sizeof(uint32_t)); + } + createComputePipeline(); + computeGroupCount(); + } + + bindTensor(in, 0, bgEntries); + bindTensor(bias, 1, bgEntries); + bindTensor(filter_weights, 2, bgEntries); + bindTensor(out, 3, bgEntries); + if (config_.shader_type == wConvShaderTypeBasic || config_.shader_type == wConvShaderTypeDepthWise) + { + ShaderParam param = {in_height_, in_width_, + out_height_, out_width_, + stride_height_, stride_width_, + padding_top_, padding_left_, + filter_height_, filter_width_, + dilation_height_, dilation_width_, + in_channel_, batch_, has_bias_, + M, K, N, 0, 0, 0}; + int partition_num = 1; + if (config_.shader_type == wConvShaderTypeBasic) + { + param.basic_shader_partition_size = group_y_; + partition_num = (int)ceil(1.0 * out_channel_ / group_y_); + } + + for (int b = 0; b < batch_; b++) + { + param.basic_shader_batch_idx = b; + for (int n = 0; n < partition_num; n++) + { + param.basic_shader_partition_idx = n; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(ShaderParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(ShaderParam)); + bindUniform(*uniformBuffer_, 4, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + } + }; + } + else if(config_.shader_type == wConvShaderType48) + { + bindUniform(*uniformBuffer_, 4, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + } + return true; +} + +bool OpConv::computeGroupCount() +{ + if (config_.shader_type == wConvShaderTypeDepthWise) + { + group_x_ = alignSize(out_width_, config_.local_size_x) / config_.local_size_x; + group_y_ = alignSize(out_height_, config_.local_size_y) / config_.local_size_y; + group_z_ = alignSize(in_channel_, config_.local_size_z) / config_.local_size_z; + return true; + } + + int M = out_height_ * out_width_; + int N = out_channel_; + + if (config_.shader_type == wConvShaderTypeBasic) + { + + group_x_ = alignSize(out_height_ * out_width_, config_.local_size_x) / config_.local_size_x; + float GFLOPS = (2.0 * filter_height_ * filter_width_ * in_channel_ + 1) * + (out_channel_ * out_height_ * out_width_) / 1000 / 1000 / 1000; + CV_Assert(config_.local_size_y == 1); + group_y_ = std::min(MAX_GROUP_COUNT_Y, (int)floor(MAX_COMPUTE_GFLOPS / (GFLOPS / out_channel_))); + group_z_ = 1; + } + else if (config_.shader_type == wConvShaderType48) + { + assert(config_.block_width == 8 && + config_.block_height == 4 && + config_.block_depth == 1 && + config_.local_size_z == 1); + group_x_ = N / config_.block_width; + group_y_ = alignSize(alignSize(M, 4) / 4, config_.local_size_y) / config_.local_size_y; + group_z_ = batch_; + } + else + CV_Assert(0); + + CV_Assert(group_x_ <= MAX_GROUP_COUNT_X); + CV_Assert(group_y_ <= MAX_GROUP_COUNT_Y); + CV_Assert(group_z_ <= MAX_GROUP_COUNT_Z); + + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_lrn.cpp b/modules/dnn/src/webgpu/src/op_lrn.cpp new file mode 100644 index 000000000000..b54d4d8f8708 --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_lrn.cpp @@ -0,0 +1,110 @@ +#include "../../precomp.hpp" +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_lrn.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +#define LOCAL_SZ_X 256 +#define LOCAL_SZ_Y 1 +#define LOCAL_SZ_Z 1 + +struct LRNParam { + int thread_num; + int channels; + int height; + int width; + int filter_len; + int radius; + float alpha; + float bias; + float negative_beta; +}; + +OpLRN::OpLRN(const int radius, const float bias, + const float alpha, const float beta, + const bool norm_by_size) +{ + init(radius, bias, alpha, beta, norm_by_size); + type_ = "LRN"; +} + +void OpLRN::reshapeOutTensor(Tensor& in, Tensor& out) +{ + Shape shape = in.getShape(); + out.reshape(NULL, shape); +} + +bool OpLRN::init(const int radius, const float bias, + const float alpha, const float beta, + const bool norm_by_size) +{ + radius_ = radius; + filter_len_ = 2 * radius_ + 1; + bias_ = bias; + alpha_ = alpha; + beta_ = beta; + norm_by_size_ = norm_by_size; + createBindGroupLayout(2); + return true; +} + +bool OpLRN::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + return forward(ins[0], outs[0]); +} + +bool OpLRN::forward(Tensor& in, Tensor& out) +{ + Shape in_shape = in.getShape(); + batch_ = in_shape[wShapeIdxBatch]; + height_ = in_shape[wShapeIdxHeight]; + width_ = in_shape[wShapeIdxWidth]; + channels_= in_shape[wShapeIdxChannel]; + thread_num_ = batch_ * height_ * width_; + if(pipeline_ == nullptr) + { + config_.local_size_x = LOCAL_SZ_X; + config_.local_size_y = LOCAL_SZ_Y; + config_.local_size_z = LOCAL_SZ_Z; + config_.block_height = 1; + config_.block_width = 1; + config_.block_depth = 1; + config_.shader_type = kLRNShaderTypeBasic; + createShaderModule(lrn_spv, sizeof(lrn_spv)/sizeof(uint32_t)); + createComputePipeline(); + computeGroupCount(); + } + + bindTensor(in, 0, bgEntries); + bindTensor(out,1, bgEntries); + LRNParam param = {batch_ * height_ * width_, + channels_, height_, width_, + filter_len_, radius_, + alpha_ / (norm_by_size_ ? filter_len_ : 1), + bias_, -1 * beta_}; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(LRNParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(LRNParam)); + bindUniform(* uniformBuffer_, 2, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer();; + return true; +} + +bool OpLRN::computeGroupCount() +{ + group_x_ = alignSize(thread_num_, config_.local_size_x) / config_.local_size_x; + group_y_ = 1; + group_z_ = 1; + + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::vkcom diff --git a/modules/dnn/src/webgpu/src/op_permute.cpp b/modules/dnn/src/webgpu/src/op_permute.cpp new file mode 100644 index 000000000000..7364154a6cca --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_permute.cpp @@ -0,0 +1,182 @@ +#include "../../precomp.hpp" +#include +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_permute.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +struct PermuteParam { + int global_size; + int num_axes; + int nthreads; +}; + +static bool needForPermutation(std::vector& order) +{ + for (int i = 0; i < order.size(); ++i) + { + if (order[i] != i) + return true; + } + return false; +} + +OpPermute::OpPermute(std::vector& order) +{ + order_.assign(order.begin(), order.end()); + dims_ = order.size(); + need_permute_ = needForPermutation(order_); + type_ = "Permute"; + if (need_permute_) + createBindGroupLayout(5); +} + +OpPermute::~OpPermute() +{ + if(tensor_new_stride_) + delete tensor_new_stride_; + if(tensor_old_stride_) + delete tensor_old_stride_; + if(tensor_order_) + delete tensor_order_; +} + +void OpPermute::reshapeOutTensor(std::vector& ins, std::vector& outs) +{ + assert(!ins.empty()); + assert(ins.size() == outs.size()); + + if (need_permute_) + { + assert(dims_ == ins[0]->dimNum()); + + Shape shape_before = ins[0]->getShape(); + Shape shape_after; + for (size_t i = 0; i < dims_; i++) + { + shape_after.push_back(shape_before[order_[i]]); + } + + for (size_t i = 0; i < ins.size(); i++) + { + assert(ins[i]->dimNum() == 4); + assert(ins[i]->dimSize(2) == shape_before[2] && ins[i]->dimSize(3) == shape_before[3]); + assert(ins[i]->count() == shapeCount(shape_after)); + outs[i].reshape(NULL, shape_after); + } + } + else + { + for(int i = 0; i < ins.size(); i++) + { + Shape in_shape = ins[i]->getShape(); + outs[i].reshape(NULL, in_shape); + } + } +} + +void OpPermute::prepareStrides(const Shape &shape_before, const Shape &shape_after) +{ + assert(shape_before.size() == dims_); + assert(shape_after.size() == dims_); + + old_stride_.resize(dims_); + new_stride_.resize(dims_); + + old_stride_[dims_ - 1] = 1; + new_stride_[dims_ - 1] = 1; + + for(int i = dims_ - 2; i >= 0; i--) + { + old_stride_[i] = old_stride_[i + 1] * shape_before[i + 1]; + new_stride_[i] = new_stride_[i + 1] * shape_after[i + 1]; + } + + Shape shape(1, old_stride_.size()); + if(! tensor_old_stride_) + tensor_old_stride_ = new Tensor(old_stride_.data(), shape, wFormatInt32); + else + tensor_old_stride_->reshape((const char*)old_stride_.data(), shape, wFormatInt32); + if(! tensor_new_stride_) + tensor_new_stride_ = new Tensor(new_stride_.data(), shape, wFormatInt32); + else + tensor_new_stride_->reshape((const char*)new_stride_.data(), shape, wFormatInt32); +} + +bool OpPermute::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + return forward(ins, outs); +} + +bool OpPermute::forward(std::vector& ins, std::vector& outs) +{ + int num_ins = ins.size(); + in_shape_ = ins[0].getShape(); + out_shape_ = outs[0].getShape(); + if (!need_permute_) + { + for (int i = 0; i < num_ins; i++) + { + assert(outs[i].count() == ins[i].count()); + if (outs[i].getBuffer() != ins[i].getBuffer()) + ins[i].copyTo(outs[i]); + } + return true; + } + + if (pipeline_ == nullptr) + { + createShaderModule(permute_spv, sizeof(permute_spv)/sizeof(uint32_t)); + createComputePipeline(); + } + + prepareStrides(ins[0].getShape(), outs[0].getShape()); + std::vectorshape(1, order_.size()); + if(! tensor_order_) + tensor_order_ = new Tensor(order_.data(), shape, wFormatInt32); + else + tensor_order_->reshape((const char*)order_.data(), shape, wFormatInt32); + bindTensor(ins[0], 0, bgEntries); + bindTensor(* tensor_order_, 1, bgEntries); + bindTensor(* tensor_old_stride_, 2, bgEntries); + bindTensor(* tensor_new_stride_, 3, bgEntries); + bindTensor(outs[0], 4, bgEntries); + + nthreads_ = ins[0].count(); +#define LOCAL_SZ_X 256 + global_size_ = alignSize(nthreads_, LOCAL_SZ_X); + computeGroupCount(); + + PermuteParam param = {global_size_, dims_, nthreads_}; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(PermuteParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(PermuteParam)); + bindUniform(* uniformBuffer_, 5, bgEntries); + + for (int i = 0; i < num_ins; i++) + { + bindTensor(ins[i], 0, bgEntries); + bindTensor(outs[i], 4, bgEntries); + + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + } + return true; +} + +bool OpPermute::computeGroupCount() +{ + group_x_ = global_size_ / LOCAL_SZ_X; + group_y_ = 1; + group_z_ = 1; + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_pool.cpp b/modules/dnn/src/webgpu/src/op_pool.cpp new file mode 100644 index 000000000000..f0ed2ee8503d --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_pool.cpp @@ -0,0 +1,157 @@ +#include "../../precomp.hpp" +#include +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_pool.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +#define LOCAL_SZ_X 256 +#define LOCAL_SZ_Y 1 +#define LOCAL_SZ_Z 1 + +struct PoolParam { + int channels; + int in_height; + int in_width; + int out_height; + int out_width; + int padding_top; + int padding_left; + int filter_h; + int filter_w; + int stride_h; + int stride_w; + int total; + int mask_or_padded_area; +}; + +OpPool::OpPool(const int* filter_size, const int* pad, const int* stride, + const int padding_mode, const PoolType type, + const bool avg_pool_padded_area) +{ + init(filter_size, pad, stride, padding_mode, type, avg_pool_padded_area); + type_ = "Pool"; +} + +bool OpPool::init(const int* filter_size, const int* pad, const int* stride, + const int padding_mode, const PoolType type, bool avg_pool_padded_area) +{ + WGPU_CHECK_BOOL_RET_VAL(padding_mode >= 0 && padding_mode < wPaddingModeNum, false); + WGPU_CHECK_POINTER_RET_VAL(filter_size, false); + WGPU_CHECK_POINTER_RET_VAL(pad, false); + WGPU_CHECK_POINTER_RET_VAL(stride, false); + + filter_height_ = filter_size[0]; + filter_width_ = filter_size[1]; + padding_top_ = pad[0]; + padding_left_ = pad[1]; + padding_mode_ = (PaddingMode)padding_mode; + stride_height_ = stride[0]; + stride_width_ = stride[1]; + pool_type_ = type; + avg_pool_padded_area_ = avg_pool_padded_area ? 1 : 0; + + if (pool_type_ == wPoolTypeAvg) + createBindGroupLayout(2); + else if (pool_type_ == wPoolTypeMax) + createBindGroupLayout(3); + else + assert(0); + return true; +} + +void OpPool::reshapeOutTensor(Tensor& in, Tensor& out) +{ + Shape in_shape = in.getShape(); + batch_ = in_shape[wShapeIdxBatch]; + channels_ = in_shape[wShapeIdxChannel]; + in_height_ = in_shape[wShapeIdxHeight]; + in_width_ = in_shape[wShapeIdxWidth]; + computePoolOutputShape(padding_mode_, padding_top_, padding_left_, + in_height_, in_width_, + filter_height_, filter_width_, + stride_height_, stride_width_, + out_height_, out_width_); + Shape out_shape = {batch_, channels_, out_height_, out_width_}; + out.reshape(NULL, out_shape); +} + +bool OpPool::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + Tensor& inpMat = ins[0]; + Tensor& outMat = outs[0]; + Tensor maskMat = outs.size() > 1 ? outs[1] : Tensor(); + return forward(inpMat, outMat, maskMat); +} + +bool OpPool::forward(Tensor& in, Tensor& out, Tensor& mask) +{ + Shape in_shape = in.getShape(); + Shape out_shape = out.getShape(); + batch_ = in_shape[wShapeIdxBatch]; + channels_ = in_shape[wShapeIdxChannel]; + in_height_ = in_shape[wShapeIdxHeight]; + in_width_ = in_shape[wShapeIdxWidth]; + out_height_ = out_shape[wShapeIdxHeight]; + out_width_ = out_shape[wShapeIdxWidth]; + need_mask_ = mask.isEmpty() ? 0 : 1; + + if (pipeline_ == nullptr) + { + config_.local_size_x = LOCAL_SZ_X; + config_.local_size_y = LOCAL_SZ_Y; + config_.local_size_z = LOCAL_SZ_Z; + config_.block_height = 1; + config_.block_width = 1; + config_.block_depth = 1; + if (pool_type_ == wPoolTypeAvg) + createShaderModule(avg_pool_spv, sizeof(avg_pool_spv)/sizeof(uint32_t)); + else + createShaderModule(max_pool_spv, sizeof(max_pool_spv)/sizeof(uint32_t)); + createComputePipeline(); + computeGroupCount(); + } + + bindTensor(in, 0, bgEntries); + bindTensor(out, 1, bgEntries); + if (need_mask_) + bindTensor(mask, 2, bgEntries); + else + { + std::vector shape = {1,1}; + mask.reshape(NULL, shape); + bindTensor(mask, 2, bgEntries); + } + PoolParam param = {channels_, + in_height_, in_width_, + out_height_, out_width_, + padding_top_, padding_left_, + filter_height_, filter_width_, + stride_height_, stride_width_, out.count(), + pool_type_ == wPoolTypeAvg ? avg_pool_padded_area_ : need_mask_}; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(PoolParam)); + else uniformBuffer_->setBufferData(& param, sizeof(PoolParam)); + bindUniform(*uniformBuffer_, pool_type_ == wPoolTypeAvg ? 2 : 3, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + return true; +} + +bool OpPool::computeGroupCount() +{ +#define GLOBAL_SIZE (128 * 128) + group_x_ = alignSize(GLOBAL_SIZE, config_.local_size_x) / config_.local_size_x; + group_y_ = 1; + group_z_ = 1; + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_prior_box.cpp b/modules/dnn/src/webgpu/src/op_prior_box.cpp new file mode 100644 index 000000000000..79d12c6c234e --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_prior_box.cpp @@ -0,0 +1,174 @@ +#include "../../precomp.hpp" +#include +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_prior_box.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +#define LOCAL_SZ_X 256 +struct PriorBoxParam { + int global_size; + int nthreads; + float step_x; + float step_y; + int offsets_x_size; + int width_size; + int layer_w; + int image_h; + int image_w; + int clip; + int variance_off; +}; + +OpPriorBox::OpPriorBox(float step_x, + float step_y, + bool clip, + int num_priors, + std::vector& variance, + std::vector& offsets_x, + std::vector& offsets_y, + std::vector& box_widths, + std::vector& box_heights) +{ + step_x_ = step_x; + step_y_ = step_y; + clip_ = clip; + num_priors_ = num_priors; + variance_ = variance; + offsets_x_ = offsets_x; + offsets_y_ = offsets_y; + box_widths_ = box_widths; + box_heights_ = box_heights; + type_ = "PriorBox"; + createBindGroupLayout(6); +} + +OpPriorBox::~OpPriorBox() +{ + if(tensor_offsets_x_) + delete tensor_offsets_x_; + if(tensor_offsets_y_) + delete tensor_offsets_y_; + if(tensor_widths_) + delete tensor_widths_; + if(tensor_heights_) + delete tensor_heights_; + if(tensor_variance_) + delete tensor_variance_; +} + +void OpPriorBox::reshapeOutTensor(std::vector& ins, Tensor& out) +{ + assert(!ins.empty()); + + Shape in_shape = ins[0]->getShape(); + int layer_h = in_shape[wShapeIdxHeight]; + int layer_w = in_shape[wShapeIdxWidth]; + int out_num = 1; + int out_channel = 2; + Shape out_shape = {out_num, out_channel, layer_h * layer_w * num_priors_ * 4}; + out.reshape(NULL, out_shape); +} + +bool OpPriorBox::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + return forward(ins, outs[0]); +} + +bool OpPriorBox::forward(std::vector& ins, Tensor& out) +{ + assert(ins.size() == 2); + Shape in_shape = ins[0].getShape(); + Shape img_shape = ins[1].getShape(); + + in_h_ = in_shape[wShapeIdxHeight]; + in_w_ = in_shape[wShapeIdxWidth]; + img_h_ = img_shape[wShapeIdxHeight]; + img_w_ = img_shape[wShapeIdxWidth]; + out_channel_ = out.dimSize(1); + out_channel_size_ = out.dimSize(2); + nthreads_ = in_h_ * in_w_; + global_size_ = alignSize(nthreads_, LOCAL_SZ_X); + + if (pipeline_ == nullptr) + { + createShaderModule(prior_box_spv, sizeof(prior_box_spv)/sizeof(uint32_t)); + createComputePipeline(); + computeGroupCount(); + } + + std::vectorshape; + shape.push_back(offsets_x_.size()); + if(! tensor_offsets_x_) + tensor_offsets_x_ = new Tensor(offsets_x_.data(), shape); + else + tensor_offsets_x_->reshape((const char*)offsets_x_.data(), shape); + if(! tensor_offsets_y_) + tensor_offsets_y_ = new Tensor(offsets_y_.data(), shape); + else + tensor_offsets_y_->reshape((const char*)offsets_y_.data(), shape); + shape[0] = box_widths_.size(); + if(! tensor_widths_) + tensor_widths_ = new Tensor(box_widths_.data(), shape); + else + tensor_widths_->reshape((const char*)box_widths_.data(), shape); + if(! tensor_heights_) + tensor_heights_ = new Tensor(box_heights_.data(), shape); + else + tensor_heights_->reshape((const char*)box_heights_.data(), shape); + float variance[4] = {variance_[0], variance_[0], variance_[0], variance_[0]}; + if (variance_.size() > 1) + { + assert(variance_.size() == 4); + for (int i = 1; i < variance_.size(); i++) + variance[i] = variance_[i]; + } + shape[0] = 4; + if(! tensor_variance_) + tensor_variance_ = new Tensor(variance, shape); + else + tensor_variance_->reshape((const char*)variance, shape); + + bindTensor(* tensor_offsets_x_, 0, bgEntries); + bindTensor(* tensor_offsets_y_, 1, bgEntries); + bindTensor(* tensor_widths_, 2, bgEntries); + bindTensor(* tensor_heights_, 3, bgEntries); + bindTensor(* tensor_variance_, 4, bgEntries); + bindTensor(out, 5, bgEntries); + + PriorBoxParam param = {global_size_, + nthreads_, + step_x_, + step_y_, + (int)offsets_x_.size(), + (int)box_widths_.size(), + in_w_, + img_h_, + img_w_, + clip_ ? 1 : 0, + out_channel_size_ / 4}; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(PriorBoxParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(PriorBoxParam)); + bindUniform(* uniformBuffer_, 6, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + return true; +} + +bool OpPriorBox::computeGroupCount() +{ + group_x_ = global_size_ / LOCAL_SZ_X; + group_y_ = 1; + group_z_ = 1; + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_relu.cpp b/modules/dnn/src/webgpu/src/op_relu.cpp new file mode 100644 index 000000000000..df881066657a --- /dev/null +++ b/modules/dnn/src/webgpu/src/op_relu.cpp @@ -0,0 +1,71 @@ +#include "../../precomp.hpp" +#include "common.hpp" +#include "internal.hpp" +#include "../include/op_relu.hpp" + +namespace cv { namespace dnn { namespace webgpu { + +#ifdef HAVE_WEBGPU + +#define LOCAL_SZ_X 32 + +struct ReLUParam { + int total; + float slope; +}; + +OpReLU::OpReLU(const float slope) : slope_(slope) +{ + createBindGroupLayout(2); + type_ = "ReLU"; +} + +void OpReLU::reshapeOutTensor(Tensor& in, Tensor& out) +{ + Shape shape = in.getShape(); + out.reshape(NULL, shape); +} + +bool OpReLU::forward(std::vector& ins, + std::vector& blobs, + std::vector& outs) +{ + return forward(ins[0], outs[0]); +} + +bool OpReLU::forward(Tensor& in, Tensor& out) +{ + if (pipeline_ == nullptr) + { + total_ = in.count(); +#define maxComputeWorkGroupCount 65535 + computeGroupCount(); + createShaderModule(relu_spv, sizeof(relu_spv)/sizeof(uint32_t)); + createComputePipeline(); + } + + bindTensor(in, 0, bgEntries); + bindTensor(out, 1, bgEntries); + ReLUParam param = { total_, slope_ }; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(ReLUParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(ReLUParam)); + bindUniform(* uniformBuffer_, 2, bgEntries); + createBindGroup(); + createCommandBuffer(); + runCommandBuffer(); + return true; +} + +bool OpReLU::computeGroupCount() +{ + group_x_ = alignSize(total_, LOCAL_SZ_X) / LOCAL_SZ_X; + if (group_x_ > maxComputeWorkGroupCount) + group_x_ = maxComputeWorkGroupCount; + group_y_ = 1; + group_z_ = 1; + return true; +} + +#endif // HAVE_WEBGPU + +}}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/op_softmax.cpp b/modules/dnn/src/webgpu/src/op_softmax.cpp index 94f0245b0a42..3f523961d576 100644 --- a/modules/dnn/src/webgpu/src/op_softmax.cpp +++ b/modules/dnn/src/webgpu/src/op_softmax.cpp @@ -5,7 +5,7 @@ namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU #define LOCAL_SZ_X 256 #define LOCAL_SZ_Y 1 @@ -23,7 +23,6 @@ OpSoftmax::OpSoftmax(const int axis, const bool log_softmax) { init(axis, log_softmax); type_ = "Softmax"; - needsUniform = true; } OpSoftmax::~OpSoftmax() @@ -32,8 +31,6 @@ OpSoftmax::~OpSoftmax() delete max_tensor_; if (sum_tensor_) delete sum_tensor_; - if(uniformBuffer_) - uniformBuffer_->getWebGPUBuffer()->Release(); } void OpSoftmax::reshapeOutTensor(Tensor& in, Tensor& out) @@ -83,18 +80,17 @@ bool OpSoftmax::forward(Tensor& in, Tensor& out) max_tensor_ = new Tensor(NULL, shape); sum_tensor_ = new Tensor(NULL, shape); } - if(needsUniform) - { - SoftmaxParam param = {channel_size_, outer_size_, channels_, - log_softmax_ == true ? 1 : 0}; - uniformBuffer_ = new Buffer(¶m, sizeof(SoftmaxParam)); - } + + SoftmaxParam param = {channel_size_, outer_size_, channels_, + log_softmax_ == true ? 1 : 0}; + if(! uniformBuffer_) uniformBuffer_ = new Buffer(¶m, sizeof(SoftmaxParam)); + else uniformBuffer_->setBufferData(¶m, sizeof(SoftmaxParam)); bindTensor(in, 0, bgEntries); bindTensor(*max_tensor_, 1, bgEntries); bindTensor(*sum_tensor_, 2, bgEntries); bindTensor(out, 3, bgEntries); - bindUniform(* uniformBuffer_, 4, bgEntries); + bindUniform(*uniformBuffer_, 4, bgEntries); createBindGroup(); createCommandBuffer(); @@ -110,6 +106,6 @@ bool OpSoftmax::computeGroupCount() return true; } -// #endif // HAVE_WEBGPU +#endif // HAVE_WEBGPU }}} // namespace cv::dnn::webgpu diff --git a/modules/dnn/src/webgpu/src/tensor.cpp b/modules/dnn/src/webgpu/src/tensor.cpp index e9dd135216a5..6f01c112ad09 100644 --- a/modules/dnn/src/webgpu/src/tensor.cpp +++ b/modules/dnn/src/webgpu/src/tensor.cpp @@ -1,9 +1,9 @@ -#include "../include/tensor.hpp" +#include "../../precomp.hpp" #include "common.hpp" #include "internal.hpp" #include namespace cv { namespace dnn { namespace webgpu { -// #ifdef HAVE_WEBGPU +#ifdef HAVE_WEBGPU Tensor::Tensor(Format fmt) : size_in_byte_(0), format_(fmt) { createContext(); @@ -69,18 +69,7 @@ Tensor Tensor::reshape(const void* data, const std::vector& shape, if (alloc || new_size > size_in_byte_) alloc = true; size_in_byte_ = new_size; - if(alloc) - { - buffer_.reset(new Buffer(device_, data, size_in_byte_, usage_)); - return * this; - } - fillData(data); - return * this; -} - -Tensor Tensor::fillData(const void * data) -{ - if (!buffer_) + if(alloc || !buffer_) { buffer_.reset(new Buffer(device_, data, size_in_byte_, usage_)); } @@ -88,7 +77,7 @@ Tensor Tensor::fillData(const void * data) { buffer_->setBufferData(data, size_in_byte_); } - return * this; + return * this; } int Tensor::getFormat() const @@ -101,6 +90,6 @@ void Tensor::copyTo(Tensor & dst) dst.reshape(buffer_->MapReadAsyncAndWait(), shape_, true, format_); } -// #endif //HAVE_WEBGPU +#endif //HAVE_WEBGPU }}} //namespace cv::dnn:webgpu \ No newline at end of file diff --git a/modules/dnn/src/webgpu/src/webgpu_cpp.cpp b/modules/dnn/src/webgpu/src/webgpu_cpp.cpp index fd324184007c..7bfaa769e770 100644 --- a/modules/dnn/src/webgpu/src/webgpu_cpp.cpp +++ b/modules/dnn/src/webgpu/src/webgpu_cpp.cpp @@ -1,9 +1,9 @@ - -#include "dawn/webgpu_cpp.h" - +#include "../../precomp.hpp" +#ifdef HAVE_WEBGPU +#include +#endif // HAVE_WEBGPU namespace wgpu { - - +#ifdef HAVE_WEBGPU static_assert(sizeof(AdapterType) == sizeof(WGPUAdapterType), "sizeof mismatch for AdapterType"); static_assert(alignof(AdapterType) == alignof(WGPUAdapterType), "alignof mismatch for AdapterType"); @@ -1742,5 +1742,5 @@ namespace wgpu { Proc GetProcAddress(Device const& device, const char* procName) { return reinterpret_cast(wgpuGetProcAddress(device.Get(), procName)); } - -} +#endif // HAVE_WEBGPU +} \ No newline at end of file diff --git a/modules/dnn/test/test_backends.cpp b/modules/dnn/test/test_backends.cpp index 23a804c92a40..d2276adef938 100644 --- a/modules/dnn/test/test_backends.cpp +++ b/modules/dnn/test/test_backends.cpp @@ -518,6 +518,6 @@ TEST_P(DNNTestNetwork, FastNeuralStyle_eccv16) expectNoFallbacksFromCUDA(net); } -INSTANTIATE_TEST_CASE_P(/*nothing*/, DNNTestNetwork, dnnBackendsAndTargets(true, true, false, true, true)); +INSTANTIATE_TEST_CASE_P(/*nothing*/, DNNTestNetwork, dnnBackendsAndTargets(true, true, false, true, true, true)); }} // namespace diff --git a/modules/dnn/test/test_common.hpp b/modules/dnn/test/test_common.hpp index 3bc8fc3a8950..ecd411e01550 100644 --- a/modules/dnn/test/test_common.hpp +++ b/modules/dnn/test/test_common.hpp @@ -37,6 +37,7 @@ #define CV_TEST_TAG_DNN_SKIP_IE_MYRIAD CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_2, CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X #define CV_TEST_TAG_DNN_SKIP_VULKAN "dnn_skip_vulkan" +#define CV_TEST_TAG_DNN_SKIP_WGPU "dnn_skip_webgpu" #define CV_TEST_TAG_DNN_SKIP_CUDA "dnn_skip_cuda" #define CV_TEST_TAG_DNN_SKIP_CUDA_FP16 "dnn_skip_cuda_fp16" @@ -124,6 +125,7 @@ testing::internal::ParamGenerator< tuple > dnnBackendsAndTarget bool withHalide = false, bool withCpuOCV = true, bool withVkCom = true, + bool withWGPU = true, bool withCUDA = true, bool withNgraph = true ); diff --git a/modules/dnn/test/test_common.impl.hpp b/modules/dnn/test/test_common.impl.hpp index 9293e07f0ea6..3c46a8b02522 100644 --- a/modules/dnn/test/test_common.impl.hpp +++ b/modules/dnn/test/test_common.impl.hpp @@ -25,7 +25,7 @@ void PrintTo(const cv::dnn::Backend& v, std::ostream* os) case DNN_BACKEND_HALIDE: *os << "HALIDE"; return; case DNN_BACKEND_INFERENCE_ENGINE: *os << "DLIE*"; return; case DNN_BACKEND_VKCOM: *os << "VKCOM"; return; - case DNN_BACKEND_WGPU: *os << "WGPU"; return; + case DNN_BACKEND_WGPU: *os << "WEBGPU"; return; case DNN_BACKEND_OPENCV: *os << "OCV"; return; case DNN_BACKEND_CUDA: *os << "CUDA"; return; case DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019: *os << "DLIE"; return; @@ -42,7 +42,7 @@ void PrintTo(const cv::dnn::Target& v, std::ostream* os) case DNN_TARGET_OPENCL_FP16: *os << "OCL_FP16"; return; case DNN_TARGET_MYRIAD: *os << "MYRIAD"; return; case DNN_TARGET_VULKAN: *os << "VULKAN"; return; - case DNN_TARGET_WGPU: *os << "WGPU"; return; + case DNN_TARGET_WGPU: *os << "DAWN"; return; case DNN_TARGET_FPGA: *os << "FPGA"; return; case DNN_TARGET_CUDA: *os << "CUDA"; return; case DNN_TARGET_CUDA_FP16: *os << "CUDA_FP16"; return; @@ -195,6 +195,7 @@ testing::internal::ParamGenerator< tuple > dnnBackendsAndTarget bool withHalide /*= false*/, bool withCpuOCV /*= true*/, bool withVkCom /*= true*/, + bool withWGPU /*= true*/, bool withCUDA /*= true*/, bool withNgraph /*= true*/ ) @@ -243,6 +244,13 @@ testing::internal::ParamGenerator< tuple > dnnBackendsAndTarget targets.push_back(make_tuple(DNN_BACKEND_VKCOM, *i)); } + if(withWGPU) + { + available = getAvailableTargets(DNN_BACKEND_WGPU); + for (std::vector< Target >::const_iterator i = available.begin(); i != available.end(); ++i) + targets.push_back(make_tuple(DNN_BACKEND_WGPU, *i)); + } + #ifdef HAVE_CUDA if(withCUDA) { @@ -415,6 +423,12 @@ void initDNNTests() ); #endif +#ifdef HAVE_WEBGPU + registerGlobalSkipTag( + CV_TEST_TAG_DNN_SKIP_WGPU + ); +#endif // HAVE_WEBGPU + #ifdef HAVE_CUDA registerGlobalSkipTag( CV_TEST_TAG_DNN_SKIP_CUDA, CV_TEST_TAG_DNN_SKIP_CUDA_FP32, CV_TEST_TAG_DNN_SKIP_CUDA_FP16 diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp index 2dce3e4fe48f..69c34e2656fe 100644 --- a/modules/dnn/test/test_layers.cpp +++ b/modules/dnn/test/test_layers.cpp @@ -1629,6 +1629,47 @@ TEST(Layer_Test_PoolingIndices, Accuracy) normAssert(indices, outputs[1].reshape(1, 5)); } +static std::string path(const std::string& file) +{ + return findDataFile("dnn/tensorflow/" + file); +} +void runTensorFlowNet(const std::string& prefix, int layer) +{ + std::string netPath = path(prefix + "_net.pb"); + std::string netConfig = ""; + std::string inpPath = path(prefix + "_in.npy"); + std::string outPath = path(prefix + "_out.npy"); + + cv::Mat input = blobFromNPY(inpPath); + cv::Mat ref = blobFromNPY(outPath); + + Net net0, net1; + net0 = readNetFromTensorflow(netPath, netConfig); + net0.setPreferableBackend(DNN_BACKEND_WGPU); + net0.setPreferableTarget(DNN_TARGET_WGPU); + net0.setInput(input); + for(int i = 0; i < net0.getLayerNames().size(); i++) + { + std::cout< > > Layer_Test_ShuffleChannel; TEST_P(Layer_Test_ShuffleChannel, Accuracy) { diff --git a/modules/dnn/test/test_misc.cpp b/modules/dnn/test/test_misc.cpp index a1480b0e8b3a..a3c66d59a990 100644 --- a/modules/dnn/test/test_misc.cpp +++ b/modules/dnn/test/test_misc.cpp @@ -251,6 +251,8 @@ TEST_P(setInput, normalization) applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); if (backend == DNN_BACKEND_VKCOM && dtype != CV_32F) applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN); + if (backend == DNN_BACKEND_WGPU && dtype != CV_32F) + applyTestTag(CV_TEST_TAG_DNN_SKIP_WGPU); Mat inp(5, 5, CV_8UC3); randu(inp, 0, 255);