|
| 1 | +//! `moz-webgpu-cts`' custom subset of WPT metadata. The conceptual entry point of this module is |
| 2 | +//! the [`File`] API. |
| 3 | +
|
1 | 4 | use std::{ |
2 | 5 | collections::BTreeMap, |
3 | 6 | fmt::{self, Display, Formatter}, |
@@ -601,6 +604,10 @@ fn format_file_properties(props: &FileProps) -> impl Display + '_ { |
601 | 604 | }) |
602 | 605 | } |
603 | 606 |
|
| 607 | +/// A `implementation-status` property value; see also the `implementation-status` entry in [WPT |
| 608 | +/// upstream documentation]. |
| 609 | +/// |
| 610 | +/// [WPT upstream]: https://web-platform-tests.org/tools/wptrunner/docs/expectation.html#web-platform-tests-metadata |
604 | 611 | #[derive(Debug, Default, EnumSetType, Serialize, ValueEnum)] |
605 | 612 | pub enum ImplementationStatus { |
606 | 613 | /// Indicates that functionality governing test(s) is implemented or currently being |
@@ -906,13 +913,23 @@ where |
906 | 913 | }) |
907 | 914 | } |
908 | 915 |
|
| 916 | +/// The subset of WPT run environments can be handled by `moz-webgpu-cts`. Part of |
| 917 | +/// [`Applicability`]. |
| 918 | +/// |
| 919 | +/// This is essentially the set of OSes, software versions, and hardware that Firefox's WebGPU team |
| 920 | +/// uses in CI for WebGPU. When that changes, this changes accordingly. |
909 | 921 | #[derive(Clone, Copy, Debug, Enum, EnumIter, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] |
910 | 922 | pub enum Platform { |
911 | 923 | Windows, |
912 | 924 | Linux, |
913 | 925 | MacOs, |
914 | 926 | } |
915 | 927 |
|
| 928 | +/// The subset of browser build profiles can be handled by `moz-webgpu-cts`. Part of |
| 929 | +/// [`Applicability`]. |
| 930 | +/// |
| 931 | +/// This is essentially the set of profiles that Firefox's WebGPU team uses in CI for WebGPU. When |
| 932 | +/// that changes, this changes accordingly. |
916 | 933 | #[derive(Clone, Copy, Debug, Enum, EnumIter, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] |
917 | 934 | pub enum BuildProfile { |
918 | 935 | Debug, |
@@ -1020,6 +1037,10 @@ where |
1020 | 1037 | } |
1021 | 1038 | } |
1022 | 1039 |
|
| 1040 | +/// The strict subset of WPT property conditionals that can be handled with `moz-webgpu-cts`. |
| 1041 | +/// |
| 1042 | +/// The entire set of possible values here should be small enough that, when it is a key like in |
| 1043 | +/// [`ExpandedPropertyValue`], significant performance gains are possible. |
1023 | 1044 | #[derive(Clone, Debug, Default)] |
1024 | 1045 | pub struct Applicability { |
1025 | 1046 | pub platform: Option<Platform>, |
|
0 commit comments