From f91f69e88f62d79c23886668f6696b35238feaa8 Mon Sep 17 00:00:00 2001 From: Sludge <96552222+SludgePhD@users.noreply.github.com> Date: Thu, 9 Nov 2023 03:10:22 +0100 Subject: [PATCH] Reexport `wgpu::Maintain` (#10461) # Objective Calling `RenderDevice::poll` requires an instance of `wgpu::Maintain`, but the type was not reexported by bevy. Working around it requires adding a dependency on `wgpu`, since bevy does not reexport the `wgpu` crate as a whole anywhere. ## Solution Reexport `wgpu::Maintain` in `render_resource`, where the other wgpu types are reexported. --- crates/bevy_render/src/render_resource/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_render/src/render_resource/mod.rs b/crates/bevy_render/src/render_resource/mod.rs index b7d245b0bd..5ccf34bf85 100644 --- a/crates/bevy_render/src/render_resource/mod.rs +++ b/crates/bevy_render/src/render_resource/mod.rs @@ -38,9 +38,9 @@ pub use wgpu::{ ComputePipelineDescriptor as RawComputePipelineDescriptor, DepthBiasState, DepthStencilState, Extent3d, Face, Features as WgpuFeatures, FilterMode, FragmentState as RawFragmentState, FrontFace, ImageCopyBuffer, ImageCopyBufferBase, ImageCopyTexture, ImageCopyTextureBase, - ImageDataLayout, ImageSubresourceRange, IndexFormat, Limits as WgpuLimits, LoadOp, MapMode, - MultisampleState, Operations, Origin3d, PipelineLayout, PipelineLayoutDescriptor, PolygonMode, - PrimitiveState, PrimitiveTopology, PushConstantRange, RenderPassColorAttachment, + ImageDataLayout, ImageSubresourceRange, IndexFormat, Limits as WgpuLimits, LoadOp, Maintain, + MapMode, MultisampleState, Operations, Origin3d, PipelineLayout, PipelineLayoutDescriptor, + PolygonMode, PrimitiveState, PrimitiveTopology, PushConstantRange, RenderPassColorAttachment, RenderPassDepthStencilAttachment, RenderPassDescriptor, RenderPipelineDescriptor as RawRenderPipelineDescriptor, SamplerBindingType, SamplerDescriptor, ShaderModule, ShaderModuleDescriptor, ShaderSource, ShaderStages, StencilFaceState,