Conformance: the textures table's guard leaves the 4:2:2 formats to chroma_pairs
With GBGR422 and BGRG422 held as their bytes in R8G8_UNORM, the translator's byte format of each is a 2-byte texel, so the guard asked the textures round-trip table for them (cases::textures::tests::the_table_is_exactly_the_formats_whose_texels_are_metals_bytes failed, conformance suite job m3-max-87880). Their host round trips are chroma_pairs' copy cases', on and off the 2-texel pairs, so the guard sets them aside as it sets aside the copies-only formats.
This commit is contained in:
1 parent
ffec1a43ab
commit
10ef459cd0
1 file changed
+6
-1
@@ -147,13 +147,18 @@ const FORMATS: [(PixelFormat, u32, &str); 76] = [
|
||||
/// for copies alone (`metal::format::copies_only`) is
|
||||
/// [`format_footprints`](crate::cases::format_footprints)'s, which records the same host round
|
||||
/// trip of it beside the footprints and texture types Metal answers for it, so it is none here.
|
||||
/// So is a 4:2:2 format (`GBGR422`, `BGRG422`), whose image holds Metal's bytes two to a texel of a
|
||||
/// 2-texel block: [`chroma_pairs`](crate::cases::chroma_pairs)' copy cases record its host round
|
||||
/// trips, of regions on and off the pairs.
|
||||
///
|
||||
/// It is the table's guard and nothing else reads it: [`FORMATS`] holds the names a case must
|
||||
/// answer with as static strings, so the list cannot be built from the predicate at run time, and
|
||||
/// this is what keeps the two from parting.
|
||||
#[cfg(test)]
|
||||
fn texel_bytes(pf: PixelFormat) -> Option<u32> {
|
||||
if metal2vulkan::metal::format::copies_only(pf) {
|
||||
if metal2vulkan::metal::format::copies_only(pf)
|
||||
|| matches!(pf, PixelFormat::GBGR422 | PixelFormat::BGRG422)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let block = metal2vulkan::metal::format::byte_format(pf)?.block()?;
|
||||
|
||||
Reference in new issue
Block a user