panvk: Do not emit blend shader when color_mask is 0

Also do not emit when color write is disabled.
Fix "dEQP-VK.renderpass.suballocation.attachment_write_mask.attachment_count_*.start_index_*" failures.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
This commit is contained in:
Mary Guillemard 2024-06-24 09:42:31 +02:00 committed by Marge Bot
parent 52c9cc6ed8
commit ecbe3b30be

View file

@ -362,6 +362,11 @@ panvk_per_arch(blend_emit_descs)(
for (uint8_t i = 0; i < cb->attachment_count; i++) {
struct pan_blend_rt_state *rt = &bs.rts[i];
if (!(cb->color_write_enables & BITFIELD_BIT(i))) {
rt->equation.color_mask = 0;
continue;
}
if (bs.logicop_enable && bs.logicop_func == PIPE_LOGICOP_NOOP) {
rt->equation.color_mask = 0;
continue;
@ -372,6 +377,11 @@ panvk_per_arch(blend_emit_descs)(
continue;
}
if (!cb->attachments[i].write_mask) {
rt->equation.color_mask = 0;
continue;
}
rt->format = vk_format_to_pipe_format(color_attachment_formats[i]);
rt->nr_samples = color_attachment_samples[i];