intel: Add and use intel_engines_class_to_string()

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18975>
This commit is contained in:
José Roberto de Souza
2022-10-05 13:27:08 -07:00
committed by Marge Bot
parent 772dfd60ad
commit 86c9aa6bfe
4 changed files with 22 additions and 36 deletions
+19
View File
@@ -106,3 +106,22 @@ intel_engines_count(const struct intel_query_engine_info *info,
return count;
}
const char *
intel_engines_class_to_string(enum intel_engine_class engine_class)
{
switch (engine_class) {
case INTEL_ENGINE_CLASS_RENDER:
return "render";
case INTEL_ENGINE_CLASS_COPY:
return "copy";
case INTEL_ENGINE_CLASS_VIDEO:
return "video";
case INTEL_ENGINE_CLASS_VIDEO_ENHANCE:
return "video-enh";
case INTEL_ENGINE_CLASS_COMPUTE:
return "compute";
default:
return "unknown";
}
}