From 5d2a290cc7b5f850674cc03f9a6a7526b6b87d20 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 7 Dec 2022 19:29:43 -0800 Subject: [PATCH] intel/blorp: Set key->msaa_16 unconditionally on Gfx9+ This will result in us using the TXF_CMS_W message rather than the TXF_CMS message on Skylake through Tigerlake for 2/4/8x MSAA blits, which is technically slightly worse. However, it shouldn't be that much worse: the TXF_CMS message was removed altogether on Alchemist. iris and anv set key->msaa_16 unconditionally, to avoid paying the cost of shader recompiles for a miniscule gain. crocus and hasvk don't need to set it as they don't support 16x MSAA. BLORP already recompiles based on the sample count, so it could easily keep doing this for the minor benefit. But avoiding it will let us drop the entire msaa_16 key field out of the compiler, which is nice. Reviewed-by: Jason Ekstrand Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/blorp/blorp_blit.c | 4 ++-- src/intel/blorp/blorp_clear.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index b49d29b1cc2..7ab52736478 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1527,7 +1527,7 @@ brw_blorp_get_blit_kernel_fs(struct blorp_batch *batch, struct brw_wm_prog_key wm_key; brw_blorp_init_wm_prog_key(&wm_key); - wm_key.base.tex.msaa_16 = key->tex_samples == 16; + wm_key.base.tex.msaa_16 = blorp->isl_dev->info->ver >= 9; wm_key.multisample_fbo = key->rt_samples > 1; program = blorp_compile_fs(blorp, mem_ctx, nir, &wm_key, false, @@ -1567,7 +1567,7 @@ brw_blorp_get_blit_kernel_cs(struct blorp_batch *batch, struct brw_cs_prog_key cs_key; brw_blorp_init_cs_prog_key(&cs_key); - cs_key.base.tex.msaa_16 = prog_key->tex_samples == 16; + cs_key.base.tex.msaa_16 = blorp->isl_dev->info->ver >= 9; assert(prog_key->rt_samples == 1); program = blorp_compile_cs(blorp, mem_ctx, nir, &cs_key, &prog_data); diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 82ad45aea8e..fedbe0c9203 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -1371,7 +1371,7 @@ blorp_params_get_mcs_partial_resolve_kernel(struct blorp_batch *batch, struct brw_wm_prog_key wm_key; brw_blorp_init_wm_prog_key(&wm_key); - wm_key.base.tex.msaa_16 = blorp_key.num_samples == 16; + wm_key.base.tex.msaa_16 = blorp->isl_dev->info->ver >= 9; wm_key.multisample_fbo = true; struct brw_wm_prog_data prog_data;