Module: Mesa Branch: main Commit: 7354d3a947945c4bd0fad9633a44bdc874923723 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7354d3a947945c4bd0fad9633a44bdc874923723
Author: Mark Janes <markja...@swizzler.org> Date: Thu Jan 4 14:59:36 2024 -0800 intel/dev: improve descriptions of workaround macros. Instructions for INTEL_WA_{num}_GFX_VER macros were confusing and contradicted itself. Acked-by: Caio Oliveira <caio.olive...@intel.com> Acked-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> Acked-by: Tapani Pälli <tapani.pa...@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26898> --- src/intel/dev/gen_wa_helpers.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/intel/dev/gen_wa_helpers.py b/src/intel/dev/gen_wa_helpers.py index 6aeacd7b860..9ffa4e72f12 100644 --- a/src/intel/dev/gen_wa_helpers.py +++ b/src/intel/dev/gen_wa_helpers.py @@ -77,18 +77,20 @@ enum intel_workaround_id { INTEL_WA_NUM }; -/* These defines are used to identify when a workaround potentially applies - * in genxml code. They should not be used directly. intel_needs_workaround() - * checks these definitions to eliminate bitset tests at compile time. +/* These defines apply workarounds to a subset of platforms within a graphics + * generation. They must be used in conjunction with intel_needs_workaround() + * to check platform details. Use these macros to compile out genxml code on + * generations where it can never execute. Whenever possible, prefer use of + * INTEL_NEEDS_WA_{num} instead of INTEL_WA_{num}_GFX_VER */ % for a in wa_def: #define INTEL_WA_${a}_GFX_VER ${wa_macro[a]} % endfor -/* These defines are suitable for use to compile out genxml code using #if - * guards. Workarounds that apply to part of a generation must use a - * combination of run time checks and INTEL_WA_{NUM}_GFX_VER macros. Those - * workarounds are 'poisoned' below. +/* These defines may be used to compile out genxml workaround implementations + * using #if guards. If a definition has been 'poisoned' below, then it applies to a + * subset of a graphics generation. In that case, use INTEL_WA_{NUM}_GFX_VER macros + * in conjunction with calls to intel_needs_workaround(). */ % for a in partial_gens: % if partial_gens[a]: