diff --git a/CHANGELOG.md b/CHANGELOG.md index b729575cea..390c8b72ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Bottom level categories: * Fix `wgpu` not building with `--no-default-features` on when targeting `wasm32-unknown-unknown`. By @wumpf in [#6946](https://github.com/gfx-rs/wgpu/pull/6946). * Implement `Clone` on `ShaderModule`. By @a1phyr in [#6937](https://github.com/gfx-rs/wgpu/pull/6937). +- Fix `CopyExternalImageDestInfo` not exported on `wgpu`. By @wumpf in [#6962](https://github.com/gfx-rs/wgpu/pull/6962). ## v24.0.0 (2025-01-15) diff --git a/tests/tests/external_texture.rs b/tests/tests/external_texture.rs index 60c4eb1b2f..f577afc0d0 100644 --- a/tests/tests/external_texture.rs +++ b/tests/tests/external_texture.rs @@ -274,7 +274,7 @@ static IMAGE_BITMAP_IMPORT: GpuTestConfiguration = origin: src_origin, flip_y: src_flip_y, }, - wgt::CopyExternalImageDestInfo { + wgpu::CopyExternalImageDestInfo { texture: &texture, mip_level: 0, origin: dest_origin, diff --git a/wgpu/src/backend/webgpu.rs b/wgpu/src/backend/webgpu.rs index 9c11a129c2..dd83bff768 100644 --- a/wgpu/src/backend/webgpu.rs +++ b/wgpu/src/backend/webgpu.rs @@ -658,7 +658,7 @@ fn map_texture_copy_view( } fn map_tagged_texture_copy_view( - view: wgt::CopyExternalImageDestInfo<&crate::api::Texture>, + view: crate::CopyExternalImageDestInfo<&crate::api::Texture>, ) -> webgpu_sys::GpuCopyExternalImageDestInfo { let texture = view.texture.inner.as_webgpu(); let mapped = webgpu_sys::GpuCopyExternalImageDestInfo::new(&texture.inner); @@ -2554,8 +2554,8 @@ impl dispatch::QueueInterface for WebQueue { fn copy_external_image_to_texture( &self, - source: &wgt::CopyExternalImageSourceInfo, - dest: wgt::CopyExternalImageDestInfo<&crate::api::Texture>, + source: &crate::CopyExternalImageSourceInfo, + dest: crate::CopyExternalImageDestInfo<&crate::api::Texture>, size: crate::Extent3d, ) { self.inner diff --git a/wgpu/src/backend/wgpu_core.rs b/wgpu/src/backend/wgpu_core.rs index ad750860bc..d72865cce5 100644 --- a/wgpu/src/backend/wgpu_core.rs +++ b/wgpu/src/backend/wgpu_core.rs @@ -385,7 +385,7 @@ fn map_texture_copy_view( expect(unused) )] fn map_texture_tagged_copy_view( - view: wgt::CopyExternalImageDestInfo<&api::Texture>, + view: crate::CopyExternalImageDestInfo<&api::Texture>, ) -> wgc::command::CopyExternalImageDestInfo { wgc::command::CopyExternalImageDestInfo { texture: view.texture.inner.as_core().id, @@ -1771,8 +1771,8 @@ impl dispatch::QueueInterface for CoreQueue { #[cfg(any(webgpu, webgl))] fn copy_external_image_to_texture( &self, - source: &wgt::CopyExternalImageSourceInfo, - dest: wgt::CopyExternalImageDestInfo<&crate::api::Texture>, + source: &crate::CopyExternalImageSourceInfo, + dest: crate::CopyExternalImageDestInfo<&crate::api::Texture>, size: crate::Extent3d, ) { match self.context.0.queue_copy_external_image_to_texture( diff --git a/wgpu/src/dispatch.rs b/wgpu/src/dispatch.rs index f243e51ad8..c33e558aae 100644 --- a/wgpu/src/dispatch.rs +++ b/wgpu/src/dispatch.rs @@ -227,8 +227,8 @@ pub trait QueueInterface: CommonTraits { #[cfg(any(webgpu, webgl))] fn copy_external_image_to_texture( &self, - source: &wgt::CopyExternalImageSourceInfo, - dest: wgt::CopyExternalImageDestInfo<&crate::api::Texture>, + source: &crate::CopyExternalImageSourceInfo, + dest: crate::CopyExternalImageDestInfo<&crate::api::Texture>, size: crate::Extent3d, ); diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index f94be6bdf1..512f145f95 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -55,17 +55,18 @@ pub use wgt::{ AdapterInfo, AddressMode, AstcBlock, AstcChannel, Backend, BackendOptions, Backends, BindGroupLayoutEntry, BindingType, BlendComponent, BlendFactor, BlendOperation, BlendState, BufferAddress, BufferBindingType, BufferSize, BufferUsages, Color, ColorTargetState, - ColorWrites, CommandBufferDescriptor, CompareFunction, CompositeAlphaMode, CoreCounters, - DepthBiasState, DepthStencilState, DeviceLostReason, DeviceType, DownlevelCapabilities, - DownlevelFlags, Dx12BackendOptions, Dx12Compiler, DynamicOffset, Extent3d, Face, Features, - FilterMode, FrontFace, GlBackendOptions, Gles3MinorVersion, HalCounters, ImageSubresourceRange, - IndexFormat, InstanceDescriptor, InstanceFlags, InternalCounters, Limits, MaintainResult, - MemoryHints, MultisampleState, Origin2d, Origin3d, PipelineStatisticsTypes, PolygonMode, - PowerPreference, PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, - PrimitiveTopology, PushConstantRange, QueryType, RenderBundleDepthStencil, SamplerBindingType, - SamplerBorderColor, ShaderLocation, ShaderModel, ShaderRuntimeChecks, ShaderStages, - StencilFaceState, StencilOperation, StencilState, StorageTextureAccess, SurfaceCapabilities, - SurfaceStatus, TexelCopyBufferLayout, TextureAspect, TextureDimension, TextureFormat, + ColorWrites, CommandBufferDescriptor, CompareFunction, CompositeAlphaMode, + CopyExternalImageDestInfo, CoreCounters, DepthBiasState, DepthStencilState, DeviceLostReason, + DeviceType, DownlevelCapabilities, DownlevelFlags, Dx12BackendOptions, Dx12Compiler, + DynamicOffset, Extent3d, Face, Features, FilterMode, FrontFace, GlBackendOptions, + Gles3MinorVersion, HalCounters, ImageSubresourceRange, IndexFormat, InstanceDescriptor, + InstanceFlags, InternalCounters, Limits, MaintainResult, MemoryHints, MultisampleState, + Origin2d, Origin3d, PipelineStatisticsTypes, PolygonMode, PowerPreference, + PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, PrimitiveTopology, + PushConstantRange, QueryType, RenderBundleDepthStencil, SamplerBindingType, SamplerBorderColor, + ShaderLocation, ShaderModel, ShaderRuntimeChecks, ShaderStages, StencilFaceState, + StencilOperation, StencilState, StorageTextureAccess, SurfaceCapabilities, SurfaceStatus, + TexelCopyBufferLayout, TextureAspect, TextureDimension, TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType, TextureUsages, TextureViewDimension, VertexAttribute, VertexFormat, VertexStepMode, WasmNotSend, WasmNotSendSync, WasmNotSync, COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT, @@ -81,7 +82,6 @@ pub use wgt::{ImageCopyBuffer, ImageCopyTexture, ImageCopyTextureTagged, ImageDa pub use wgt::ImageCopyExternalImage; #[cfg(any(webgpu, webgl))] pub use wgt::{CopyExternalImageSourceInfo, ExternalImageSource}; - // // // Re-exports of dependencies