Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bgra8unorm-storage #4228

Merged
merged 13 commits into from
Oct 13, 2023
Prev Previous commit
Next Next commit
Update wgpu-hal/src/vulkan/adapter.rs
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
  • Loading branch information
nical and teoxoy committed Oct 12, 2023
commit 981dc24ff927435fb1fdc7efa381bee1533cb6ab
7 changes: 2 additions & 5 deletions wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1784,10 +1784,7 @@ fn supports_bgra8unorm_storage(
let features2 = properties2.format_properties.optimal_tiling_features;
let features3 = properties3.optimal_tiling_features;

let base_requirements = features2.contains(vk::FormatFeatureFlags::STORAGE_IMAGE);
let vk_1_3_reequirements =
features3.contains(vk::FormatFeatureFlags2::STORAGE_WRITE_WITHOUT_FORMAT_KHR);

base_requirements && vk_1_3_reequirements
features2.contains(vk::FormatFeatureFlags::STORAGE_IMAGE)
&& features3.contains(vk::FormatFeatureFlags2::STORAGE_WRITE_WITHOUT_FORMAT)
}
}