Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,22 @@ impl Adapter {
caps.contains(Tfc::STORAGE_READ_WRITE),
);

// Force storage write capability for common formats that modern GPUs support
// but DX12 may not correctly report via D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE.
// This is needed for Vello's compute shaders which use Rgba8Unorm storage textures.
// See: https://github.com/gfx-rs/wgpu/issues/8670
if matches!(
format,
wgt::TextureFormat::Rgba8Unorm
| wgt::TextureFormat::Rgba8Snorm
| wgt::TextureFormat::Bgra8Unorm
) {
flags.set(wgt::TextureFormatFeatureFlags::STORAGE_READ_ONLY, true);
flags.set(wgt::TextureFormatFeatureFlags::STORAGE_WRITE_ONLY, true);
flags.set(wgt::TextureFormatFeatureFlags::STORAGE_READ_WRITE, true);
allowed_usages.set(wgt::TextureUsages::STORAGE_BINDING, true);
}

flags.set(
wgt::TextureFormatFeatureFlags::STORAGE_ATOMIC,
caps.contains(Tfc::STORAGE_ATOMIC),
Expand Down
Loading