From 0a3f3fd193d06330e9f196c6b3dd45ba350980a0 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 12 Jan 2026 14:07:57 +0200 Subject: [PATCH] brw: drop unused color_outputs_valid key Signed-off-by: Lionel Landwerlin Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/iris/iris_program.c | 1 - src/intel/compiler/brw/brw_compiler.h | 4 +--- src/intel/vulkan/anv_shader_compile.c | 7 ++----- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index a630ea55bb9..5d53e4c53ea 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -582,7 +582,6 @@ iris_to_brw_fs_key(const struct iris_screen *screen, .persample_interp = key->persample_interp ? INTEL_ALWAYS : INTEL_NEVER, .multisample_fbo = key->multisample_fbo ? INTEL_ALWAYS : INTEL_NEVER, .force_dual_color_blend = key->force_dual_color_blend, - .color_outputs_valid = key->color_outputs_valid, .ignore_sample_mask_out = !key->multisample_fbo, }; } diff --git a/src/intel/compiler/brw/brw_compiler.h b/src/intel/compiler/brw/brw_compiler.h index ecce25d1fe9..23c34c97c33 100644 --- a/src/intel/compiler/brw/brw_compiler.h +++ b/src/intel/compiler/brw/brw_compiler.h @@ -403,8 +403,6 @@ struct brw_wm_prog_key { float min_sample_shading; - uint8_t color_outputs_valid; - /* Some collection of BRW_WM_IZ_* */ unsigned nr_color_regions:5; bool alpha_test_replicate_alpha:1; @@ -434,7 +432,7 @@ struct brw_wm_prog_key { bool ignore_sample_mask_out:1; bool coarse_pixel:1; bool api_sample_shading:1; - unsigned pad:4; + unsigned pad:12; }; static inline bool diff --git a/src/intel/vulkan/anv_shader_compile.c b/src/intel/vulkan/anv_shader_compile.c index 7059724a2d2..27508c89916 100644 --- a/src/intel/vulkan/anv_shader_compile.c +++ b/src/intel/vulkan/anv_shader_compile.c @@ -480,8 +480,7 @@ populate_wm_prog_key(struct brw_wm_prog_key *key, populate_base_gfx_prog_key(&key->base, device, rs, state, link_stages); /* Consider all inputs as valid until look at the NIR variables. */ - key->color_outputs_valid = rp_color_mask(state); - key->nr_color_regions = util_last_bit(key->color_outputs_valid); + key->nr_color_regions = util_last_bit(rp_color_mask(state)); /* To reduce possible shader recompilations we would need to know if * there is a SampleMask output variable to compute if we should emit @@ -522,7 +521,6 @@ populate_wm_prog_key(struct brw_wm_prog_key *key, key->ignore_sample_mask_out = !key->multisample_fbo; } else { /* Consider all inputs as valid until we look at the NIR variables. */ - key->color_outputs_valid = BITFIELD_MASK(MAX_RTS); key->nr_color_regions = MAX_RTS; key->alpha_to_coverage = INTEL_SOMETIMES; @@ -1200,9 +1198,8 @@ anv_shader_compute_fragment_rts(const struct brw_compiler *compiler, const unsigned num_rts = util_last_bit64(rt_mask); struct anv_pipeline_binding rt_bindings[MAX_RTS]; - shader_data->key.wm.color_outputs_valid = rt_mask & rp_color_mask(state); shader_data->key.wm.nr_color_regions = - util_last_bit(shader_data->key.wm.color_outputs_valid); + util_last_bit(rt_mask & rp_color_mask(state)); if (num_rts > 0) { for (unsigned rt = 0; rt < num_rts; rt++) {