mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
Prevent get_texture_format_features from saying textures always support COPY_*
This commit is contained in:
parent
7e369fdd57
commit
59f4efe93a
@ -215,8 +215,10 @@ impl<A: HalApi> Adapter<A> {
|
||||
use hal::TextureFormatCapabilities as Tfc;
|
||||
|
||||
let caps = unsafe { self.raw.adapter.texture_format_capabilities(format) };
|
||||
let mut allowed_usages = format.describe().guaranteed_format_features.allowed_usages;
|
||||
let mut allowed_usages = wgt::TextureUsages::empty();
|
||||
|
||||
allowed_usages.set(wgt::TextureUsages::COPY_SRC, caps.contains(Tfc::COPY_SRC));
|
||||
allowed_usages.set(wgt::TextureUsages::COPY_DST, caps.contains(Tfc::COPY_DST));
|
||||
allowed_usages.set(
|
||||
wgt::TextureUsages::TEXTURE_BINDING,
|
||||
caps.contains(Tfc::SAMPLED),
|
||||
|
Loading…
Reference in New Issue
Block a user