From 15b4cab4d5f70e86a66c52a865cdfcbcc3a7a570 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 10 Jun 2021 16:29:34 +0200 Subject: [PATCH] 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 Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_blend.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_lower_blend.c b/src/compiler/nir/nir_lower_blend.c index e22cc52837e..7198647ca30 100644 --- a/src/compiler/nir/nir_lower_blend.c +++ b/src/compiler/nir/nir_lower_blend.c @@ -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 */