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:
@@ -703,6 +703,14 @@ Intel driver environment variables
|
||||
|
||||
``INTEL_MEASURE=cpu {workload}``
|
||||
|
||||
.. envvar:: INTEL_MODIFIER_OVERRIDE
|
||||
|
||||
if set, determines the single DRM modifier reported back to (Vulkan)
|
||||
applications, in order to make selecting modifier deterministic
|
||||
between Vulkan driver and applications. The value can be one of the
|
||||
supported modifiers on a platform, but other values are also acceptable
|
||||
for debug purposes.
|
||||
|
||||
.. envvar:: INTEL_NO_HW
|
||||
|
||||
if set to 1, true or yes, prevents batches from being submitted to the
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user