word_samples_msaa: an own-format sRGB sample's reads allow srgb-texel-decode as a word's do
With the RGB9E5Float blends checked as the device's blend (job 11181, PHOENIX: no wrong answers at either count), the lane reached its notice check on RADV for the first time and failed there: announced past [DeviceColorConversion, DeviceRoundedResolve, DeviceDenormals, FastMathRewrites, DeviceTexelConversion, NativeNanEncoding]: [SrgbTexelDecode] RADV holds R8Unorm_sRGB multisampled in its own format. The lane's reads of its samples go through the device's sRGB decode and announce srgb-texel-decode, but the lane allowed that notice only for a format held as its word. The allowance now covers an sRGB sample held either way, wherever the device's sampler is not Metal's; read() already bounds the decode alike for both. (cherry picked from commit acc53ee20437d7532c109e9c26de374174098e9b)
This commit is contained in:
1 parent
853e9205d9
commit
3ef2ca4e11
1 file changed
+13
-11
@@ -15,9 +15,10 @@
|
||||
//! attachments (`DeviceOptions::withheld_attachment_formats`), which holds each multisampled
|
||||
//! texture the device renders in its word's format (`image_plan::word_samples`) where the device
|
||||
//! renders the word at the count. Each leg prints which way it held each format. A word's samples
|
||||
//! are Metal's words, read as Metal reads them (an sRGB word's by the device's decode,
|
||||
//! `srgb-texel-decode`, within a code of the transfer where it is not Metal's, and a 5- or 6-bit
|
||||
//! field's by the device's widening, `device-texel-conversion`, within its bound there: [`read`]),
|
||||
//! are Metal's words, read as Metal reads them (an sRGB sample's, a word's or the format's own, by
|
||||
//! the device's decode, `srgb-texel-decode`, within a code of the transfer where it is not
|
||||
//! Metal's, and a 5- or 6-bit field's by the device's widening, `device-texel-conversion`, within
|
||||
//! its bound there: [`read`]),
|
||||
//! and its
|
||||
//! resolve, the crate-owned one, is Metal's
|
||||
//! for `R8Unorm_sRGB` and `RGB9E5Float` and within one code of each field of Metal's for the
|
||||
@@ -1064,6 +1065,15 @@ fn multisampled_word_formats_store_read_resolve_and_blend_as_metal() {
|
||||
if !lane.metal_sampler() {
|
||||
allowed.insert(Degradation::DeviceTexelConversion);
|
||||
}
|
||||
// An sRGB sample's reads, the device's decode where it is not Metal's: a word's and a
|
||||
// format's own alike (RADV holds `R8Unorm_sRGB` in its own format).
|
||||
let srgb = matches!(
|
||||
WordAttachment::layout(pf),
|
||||
Some(WordAttachment::Srgb8 { .. })
|
||||
);
|
||||
if srgb && !lane.metal_sampler() {
|
||||
allowed.insert(Degradation::SrgbTexelDecode);
|
||||
}
|
||||
match word {
|
||||
true => {
|
||||
kinds.insert(Degradation::ShaderResolve);
|
||||
@@ -1077,14 +1087,6 @@ fn multisampled_word_formats_store_read_resolve_and_blend_as_metal() {
|
||||
if blended {
|
||||
allowed.insert(Degradation::SamplePlanes);
|
||||
}
|
||||
// An sRGB word's reads, the device's decode where it is not Metal's.
|
||||
let srgb = matches!(
|
||||
WordAttachment::layout(pf),
|
||||
Some(WordAttachment::Srgb8 { .. })
|
||||
);
|
||||
if srgb && !lane.metal_sampler() {
|
||||
allowed.insert(Degradation::SrgbTexelDecode);
|
||||
}
|
||||
}
|
||||
false => {
|
||||
allowed.extend(resolve_kind(&lane.device, samples));
|
||||
|
||||
Reference in new issue
Block a user