From: Pierre-Eric Pelloux-Prayer Date: Tue, 24 Mar 2020 14:58:59 +0000 (+0100) Subject: nir: update uses_demote flag in discard_to_demote pass X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=84da4ded4b90d0d13e3d89d97160eead9d5c8886 nir: update uses_demote flag in discard_to_demote pass 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: --- 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;