intel/compiler: fix dynamic alpha-to-coverage handling

Got the wrong logic operation. Let's reuse the nicer NIR builder
helper.

Fixes a bunch of KHR-GL46.sample_variables.mask.rgba8.*.samples*.mask*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fd7debc8bb ("intel/fs: make alpha_to_coverage a tristate")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9568
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24716>
This commit is contained in:
Lionel Landwerlin 2023-08-25 18:02:05 +03:00 committed by Marge Bot
parent d74c301026
commit 9bf2a89127
2 changed files with 1 additions and 6 deletions

View file

@ -1,6 +1,3 @@
# driver seems flaky
KHR-GL46.sample_variables.mask.rgba8.*.samples.*.mask.*
# ???
spec@arb_query_buffer_object@qbo
spec@arb_query_buffer_object@qbo@query-GL_PRIMITIVES_SUBMITTED-ASYNC_CPU_READ_BEFORE-GL_UNSIGNED_INT64_ARB

View file

@ -175,9 +175,7 @@ brw_nir_lower_alpha_to_coverage(nir_shader *shader,
nir_def *push_flags =
nir_load_uniform(&b, 1, 32, nir_imm_int(&b, prog_data->msaa_flags_param * 4));
nir_def *alpha_to_coverage =
nir_i2b(&b,
nir_iadd_imm(&b, push_flags,
BRW_WM_MSAA_FLAG_ALPHA_TO_COVERAGE));
nir_test_mask(&b, push_flags, BRW_WM_MSAA_FLAG_ALPHA_TO_COVERAGE);
dither_mask = nir_bcsel(&b, alpha_to_coverage,
dither_mask, sample_mask_write->src[0].ssa);
}