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

metal: fix Depth24Plus | Depth24PlusStencil8 capabilities #2686

Merged
merged 1 commit into from
May 22, 2022
Merged
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
20 changes: 12 additions & 8 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,24 @@ impl crate::Adapter<super::Api> for super::Adapter {
flags
}
Tf::Depth32Float | Tf::Depth32FloatStencil8 => {
let mut flats =
let mut flags =
Tfc::DEPTH_STENCIL_ATTACHMENT | Tfc::MULTISAMPLE | msaa_resolve_apple3x_if;
if pc.format_depth32float_filter {
flats |= Tfc::SAMPLED_LINEAR
flags |= Tfc::SAMPLED_LINEAR
}
flats
flags
}
Tf::Depth24Plus => Tfc::empty(),
Tf::Depth24PlusStencil8 => {
if pc.msaa_desktop {
Tfc::DEPTH_STENCIL_ATTACHMENT | Tfc::SAMPLED_LINEAR | Tfc::MULTISAMPLE
Tf::Depth24Plus | Tf::Depth24PlusStencil8 => {
let mut flags = Tfc::DEPTH_STENCIL_ATTACHMENT | Tfc::MULTISAMPLE;
if pc.format_depth24_stencil8 {
flags |= Tfc::SAMPLED_LINEAR | Tfc::MULTISAMPLE_RESOLVE
} else {
Tfc::empty()
flags |= msaa_resolve_apple3x_if;
if pc.format_depth32float_filter {
flags |= Tfc::SAMPLED_LINEAR
}
}
flags
}
Tf::Rgb9e5Ufloat => {
if pc.msaa_apple3 {
Expand Down