Improve vk format msaa capabilities detection (#3429)

* Improve vk format msaa capabilities detection

* Update CHANGELOG

* Follow the suggestions

* Update wgpu-hal/src/vulkan/adapter.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
This commit is contained in:
Jinlei Li 2023-01-28 20:03:43 +08:00 committed by GitHub
parent fe2b230b0e
commit b31069f14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View File

@ -46,6 +46,10 @@ Bottom level categories:
- Implement `CommandEncoder::clear_buffer`. By @raphlinus in [#3426](https://github.com/gfx-rs/wgpu/pull/3426)
#### Vulkan
- Improve format MSAA capabilities detection. By @jinleili in [#3429](https://github.com/gfx-rs/wgpu/pull/3429)
## wgpu-0.15.0 (2023-01-25)
### Major Changes

View File

@ -1502,11 +1502,15 @@ impl crate::Adapter<super::Api> for super::Adapter {
.framebuffer_stencil_sample_counts
.min(limits.sampled_image_stencil_sample_counts)
} else {
limits
.framebuffer_color_sample_counts
.min(limits.sampled_image_color_sample_counts)
.min(limits.sampled_image_integer_sample_counts)
.min(limits.storage_image_sample_counts)
match format.describe().sample_type {
wgt::TextureSampleType::Float { filterable: _ } => limits
.framebuffer_color_sample_counts
.min(limits.sampled_image_color_sample_counts),
wgt::TextureSampleType::Sint | wgt::TextureSampleType::Uint => {
limits.sampled_image_integer_sample_counts
}
_ => unreachable!(),
}
};
flags.set(
@ -1517,7 +1521,6 @@ impl crate::Adapter<super::Api> for super::Adapter {
Tfc::MULTISAMPLE_X4,
sample_flags.contains(vk::SampleCountFlags::TYPE_4),
);
flags.set(
Tfc::MULTISAMPLE_X8,
sample_flags.contains(vk::SampleCountFlags::TYPE_8),