From a9ee498347113781ba97e5eec6bad0b8f96c7905 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 24 Feb 2025 13:14:19 +0200 Subject: [PATCH] brw: add helpers to check if a fragment shader execution is dynamic Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_compiler.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index e1ca6155231..b548dcfc105 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -383,6 +383,14 @@ struct brw_wm_prog_key { uint64_t padding:35; }; +static inline bool +brw_wm_prog_key_is_dynamic(const struct brw_wm_prog_key *key) +{ + return key->alpha_to_coverage == INTEL_SOMETIMES || + key->persample_interp == INTEL_SOMETIMES || + key->multisample_fbo == INTEL_SOMETIMES; +} + struct brw_cs_prog_key { struct brw_base_prog_key base; }; @@ -782,6 +790,14 @@ struct brw_wm_prog_data { uint8_t urb_setup_attribs_count; }; +static inline bool +brw_wm_prog_data_is_dynamic(const struct brw_wm_prog_data *prog_data) +{ + return prog_data->alpha_to_coverage == INTEL_SOMETIMES || + prog_data->coarse_pixel_dispatch == INTEL_SOMETIMES || + prog_data->persample_dispatch == INTEL_SOMETIMES; +} + #ifdef GFX_VERx10 #if GFX_VERx10 >= 200