add downlevel flag for BC || (ETC2 && ASTC)

This commit is contained in:
teoxoy authored and Teodor Tanasoaia committed 2026-06-03 23:36:32 +02:00
1 parent 939776d5dc
commit e9b9a82981
4 files changed
+28

No files matched your search

+9
View File
@@ -574,6 +574,15 @@ impl super::Adapter {
);
}
downlevel_flags.set(
wgt::DownlevelFlags::TEXTURE_COMPRESSION,
features.contains(wgt::Features::TEXTURE_COMPRESSION_BC)
|| features.contains(
wgt::Features::TEXTURE_COMPRESSION_ETC2
| wgt::Features::TEXTURE_COMPRESSION_ASTC,
),
);
features.set(
wgt::Features::FLOAT32_FILTERABLE,
extensions.contains("GL_ARB_color_buffer_float")
+4
View File
@@ -1314,6 +1314,10 @@ impl super::CapabilitiesQuery {
wgt::DownlevelFlags::MSL2_1,
self.msl_version >= MTLLanguageVersion::Version2_1,
);
downlevel.flags.set(
wgt::DownlevelFlags::TEXTURE_COMPRESSION,
self.format_bc || (self.format_eac_etc && self.format_astc),
);
let limits = crate::auxil::adjust_raw_limits(wgt::Limits {
//
+9
View File
@@ -2270,6 +2270,15 @@ impl super::Instance {
);
}
downlevel_flags.set(
wgt::DownlevelFlags::TEXTURE_COMPRESSION,
available_features.contains(wgt::Features::TEXTURE_COMPRESSION_BC)
|| available_features.contains(
wgt::Features::TEXTURE_COMPRESSION_ETC2
| wgt::Features::TEXTURE_COMPRESSION_ASTC,
),
);
let has_robust_buffer_access2 = phd_features
.robustness2
.as_ref()
+6
View File
@@ -1082,6 +1082,12 @@ bitflags::bitflags! {
/// Supports features introduced in MSL 2.1.
const MSL2_1 = 1 << 24;
/// The adapter supports the WebGPU texture compression requirement:
/// BC || (ETC2 && ASTC).
///
/// See <https://www.w3.org/TR/webgpu/#adapter-capability-guarantees>.
const TEXTURE_COMPRESSION = 1 << 25;
}
}