nir/lower_blend: Don't lower RTs whose format is set to NONE

The caller doesn't necessarily want to lower blend operations on all
render targets since some of them might be supported natively (panvk
will be in that case). Let's just skip RTs that have a format set to
PIPE_FORMAT_NONE to allow that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060>
This commit is contained in:
Boris Brezillon
2021-06-10 16:29:34 +02:00
parent 637cd5ac00
commit 15b4cab4d5
+4
View File
@@ -344,6 +344,10 @@ nir_lower_blend_instr(nir_builder *b, nir_instr *instr, void *data)
(var->data.location == FRAG_RESULT_COLOR) ? 0 :
(var->data.location - FRAG_RESULT_DATA0);
/* No blend lowering requested on this RT */
if (options->format[rt] == PIPE_FORMAT_NONE)
return false;
b->cursor = nir_before_instr(instr);
/* Grab the input color */