intel/isl: Add a debug option to override modifer list

Developers can limit supported modifers to a single
modifier provided in INTEL_MODIFIER_OVERRIDE environment
variable for debug purposes. For example, setting it
makes Vulkan CTS only run modifier tests against the
specified modifier instead of all modifiers in production
code.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25651>
This commit is contained in:
Jianxun Zhang
2023-09-21 17:09:55 -07:00
committed by Marge Bot
parent 8f8cde4c60
commit 3b885926e9
2 changed files with 16 additions and 0 deletions

View File

@@ -190,6 +190,14 @@ uint32_t
isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
uint64_t modifier)
{
/* We want to know the absence of the debug environment variable
* and don't want to provide a default value either, so we don't
* use debug_get_num_option() here.
*/
const char *mod_str = getenv("INTEL_MODIFIER_OVERRIDE");
if (mod_str != NULL) {
return modifier == strtoul(mod_str, NULL, 0);
}
/* FINISHME: Add gfx12 modifiers */
switch (modifier) {
default: