From 84da4ded4b90d0d13e3d89d97160eead9d5c8886 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 24 Mar 2020 15:58:59 +0100 Subject: [PATCH] nir: update uses_demote flag in discard_to_demote pass MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise the ctx.ac.postponed_kill will not be allocated. Fixes: ce87da71e93 ("nir: add pass to lower discard() to demote()") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2662 Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_lower_discard_to_demote.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_discard_to_demote.c b/src/compiler/nir/nir_lower_discard_to_demote.c index cbb7da9a892..eb13796d952 100644 --- a/src/compiler/nir/nir_lower_discard_to_demote.c +++ b/src/compiler/nir/nir_lower_discard_to_demote.c @@ -50,9 +50,11 @@ nir_lower_discard_to_demote(nir_shader *shader) switch (intrin->intrinsic) { case nir_intrinsic_discard: intrin->intrinsic = nir_intrinsic_demote; + shader->info.fs.uses_demote = true; break; case nir_intrinsic_discard_if: intrin->intrinsic = nir_intrinsic_demote_if; + shader->info.fs.uses_demote = true; break; case nir_intrinsic_load_helper_invocation: intrin->intrinsic = nir_intrinsic_is_helper_invocation; -- 2.30.2