From 3b1cda2ebdaf8d3f5e7c68f58d97d1b54d69b205 Mon Sep 17 00:00:00 2001 From: Brian Reavis Date: Fri, 4 Apr 2025 20:44:37 -0700 Subject: [PATCH] Expose `TextureFormatFeatureFlags`, `TextureFormatFeatures` from wgpu (#18721) # Objective This PR exposes the wgpu types necessary to use the result of `RenderAdapter::get_texture_format_features`: ```rust use bevy::render::render_resource::TextureFormatFeatureFlags; // ^ now available let adapter = world.resource::(); let flags = adapter.get_texture_format_features(TextureFormat::R32Float).flags; let filtering = flags.contains(TextureFormatFeatureFlags::FILTERABLE); ``` ## Solution - Expose `TextureFormatFeatureFlags`, `TextureFormatFeatures` like other wgpu types in bevy_render --- crates/bevy_render/src/render_resource/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bevy_render/src/render_resource/mod.rs b/crates/bevy_render/src/render_resource/mod.rs index aab2fe5b6a..b777d96290 100644 --- a/crates/bevy_render/src/render_resource/mod.rs +++ b/crates/bevy_render/src/render_resource/mod.rs @@ -55,10 +55,10 @@ pub use wgpu::{ ShaderModule, ShaderModuleDescriptor, ShaderSource, ShaderStages, StencilFaceState, StencilOperation, StencilState, StorageTextureAccess, StoreOp, TexelCopyBufferInfo, TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect, TextureDescriptor, - TextureDimension, TextureFormat, TextureSampleType, TextureUsages, - TextureView as WgpuTextureView, TextureViewDescriptor, TextureViewDimension, VertexAttribute, - VertexBufferLayout as RawVertexBufferLayout, VertexFormat, VertexState as RawVertexState, - VertexStepMode, COPY_BUFFER_ALIGNMENT, + TextureDimension, TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, + TextureSampleType, TextureUsages, TextureView as WgpuTextureView, TextureViewDescriptor, + TextureViewDimension, VertexAttribute, VertexBufferLayout as RawVertexBufferLayout, + VertexFormat, VertexState as RawVertexState, VertexStepMode, COPY_BUFFER_ALIGNMENT, }; pub use crate::mesh::VertexBufferLayout;