Skip to content

Commit 5dcfa52

Browse files
authored
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::<RenderAdapter>(); 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
1 parent 989b360 commit 5dcfa52

File tree

1 file changed

+4
-4
lines changed
  • crates/bevy_render/src/render_resource

1 file changed

+4
-4
lines changed

crates/bevy_render/src/render_resource/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ pub use wgpu::{
5555
ShaderModule, ShaderModuleDescriptor, ShaderSource, ShaderStages, StencilFaceState,
5656
StencilOperation, StencilState, StorageTextureAccess, StoreOp, TexelCopyBufferInfo,
5757
TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect, TextureDescriptor,
58-
TextureDimension, TextureFormat, TextureSampleType, TextureUsages,
59-
TextureView as WgpuTextureView, TextureViewDescriptor, TextureViewDimension, VertexAttribute,
60-
VertexBufferLayout as RawVertexBufferLayout, VertexFormat, VertexState as RawVertexState,
61-
VertexStepMode, COPY_BUFFER_ALIGNMENT,
58+
TextureDimension, TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures,
59+
TextureSampleType, TextureUsages, TextureView as WgpuTextureView, TextureViewDescriptor,
60+
TextureViewDimension, VertexAttribute, VertexBufferLayout as RawVertexBufferLayout,
61+
VertexFormat, VertexState as RawVertexState, VertexStepMode, COPY_BUFFER_ALIGNMENT,
6262
};
6363

6464
pub use crate::mesh::VertexBufferLayout;

0 commit comments

Comments
 (0)