Skip to content

Commit

Permalink
Fix missing wgt re-export on wgpu for CopyExternalImageDestInfo (#6962
Browse files Browse the repository at this point in the history
)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
Wumpf authored and cwfitzgerald committed Jan 22, 2025
1 parent 0fcae47 commit cd5911a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/tests/external_texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions wgpu/src/backend/webgpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions wgpu/src/backend/wgpu_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions wgpu/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down
24 changes: 12 additions & 12 deletions wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit cd5911a

Please sign in to comment.