From ecd29fdf38488386b928aa9eff399b05953854e9 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 19 Feb 2023 23:44:17 -0500 Subject: [PATCH] pan/bi: Call pan_nir_lower_zs_store late This will give the driver [notably, PanVK] a chance to lower dual source blending without having the dual stores turned into store_combined_output_pan. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/compiler/bifrost_compile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 1d131d5..830751a 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -4751,7 +4751,6 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id) } NIR_PASS_V(nir, nir_lower_ssbo); - NIR_PASS_V(nir, pan_nir_lower_zs_store); NIR_PASS_V(nir, pan_lower_sample_pos); NIR_PASS_V(nir, nir_lower_bit_size, bi_lower_bit_size, NULL); NIR_PASS_V(nir, nir_lower_64bit_phis); @@ -5167,6 +5166,11 @@ bifrost_compile_shader_nir(nir_shader *nir, { bifrost_debug = debug_get_option_bifrost_debug(); + /* Combine stores late, to give the driver a chance to lower dual-source + * blending as regular store_output intrinsics. + */ + NIR_PASS_V(nir, pan_nir_lower_zs_store); + bi_optimize_nir(nir, inputs->gpu_id, inputs->is_blend); info->tls_size = nir->scratch_size; -- 2.7.4