Skip to content

Commit

Permalink
fix TEXTURE_FORMAT_NV12 feature for vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 committed Oct 27, 2023
1 parent 79c66ec commit b99d346
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ impl PhysicalDeviceFeatures {
vk::Format::G8_B8R8_2PLANE_420_UNORM,
vk::ImageTiling::OPTIMAL,
vk::FormatFeatureFlags::SAMPLED_IMAGE
| vk::FormatFeatureFlags::STORAGE_IMAGE
| vk::FormatFeatureFlags::TRANSFER_SRC
| vk::FormatFeatureFlags::TRANSFER_DST,
),
Expand Down Expand Up @@ -1541,14 +1540,14 @@ impl crate::Adapter<super::Api> for super::Adapter {
.framebuffer_stencil_sample_counts
.min(limits.sampled_image_stencil_sample_counts)
} else {
match format.sample_type(None).unwrap() {
wgt::TextureSampleType::Float { filterable: _ } => limits
match format.sample_type(None) {
Some(wgt::TextureSampleType::Float { filterable: _ }) => limits
.framebuffer_color_sample_counts
.min(limits.sampled_image_color_sample_counts),
wgt::TextureSampleType::Sint | wgt::TextureSampleType::Uint => {
Some(wgt::TextureSampleType::Sint) | Some(wgt::TextureSampleType::Uint) => {
limits.sampled_image_integer_sample_counts
}
_ => unreachable!(),
_ => vk::SampleCountFlags::TYPE_1,
}
};

Expand Down

0 comments on commit b99d346

Please sign in to comment.