From: Caio Oliveira Date: Wed, 16 Mar 2022 00:15:17 +0000 (-0700) Subject: intel/fs: Initialize the sample mask in flags register when using demote X-Git-Tag: upstream/22.3.5~11245 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb311c22dfb7627111cf76cd2fb619c4c6fe8b79;p=platform%2Fupstream%2Fmesa.git intel/fs: Initialize the sample mask in flags register when using demote Without this change, a check for "is helper invocation" could read uninitialized values. Fixes: 45f5db5a84a ("intel/fs: Implement "demote to helper invocation"") Reviewed-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Part-of: --- diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index f71ab86..97f0aee 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -9694,7 +9694,8 @@ brw_nir_populate_wm_prog_data(const nir_shader *shader, * so the shader definitely kills pixels. */ prog_data->uses_kill = shader->info.fs.uses_discard || - key->emit_alpha_test; + shader->info.fs.uses_demote || + key->emit_alpha_test; prog_data->uses_omask = !key->ignore_sample_mask_out && (shader->info.outputs_written & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)); prog_data->computed_depth_mode = computed_depth_mode(shader);