zink: fix zink_format_is_voidable_rgba_variant()

this should just match whatever X formats are emulated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
This commit is contained in:
Mike Blumenkrantz 2024-09-20 08:55:23 -04:00 committed by Marge Bot
parent 42648508f7
commit f96dc11e41

View file

@ -208,25 +208,7 @@ zink_format_emulate_x8(enum pipe_format format)
bool
zink_format_is_voidable_rgba_variant(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
unsigned chan;
if(desc->block.width != 1 ||
desc->block.height != 1 ||
(desc->block.bits != 32 && desc->block.bits != 64 &&
desc->block.bits != 128))
return false;
if (desc->nr_channels != 4)
return false;
unsigned size = desc->channel[0].size;
for(chan = 0; chan < 4; ++chan) {
if(desc->channel[chan].size != size)
return false;
}
return true;
return format != zink_format_emulate_x8(format);
}
void