mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add debug flag to print driver diagnostics to cout.
- New registry flags can be used for applications that wants to dump driver diagnostics without using any additional tools - When flag is on , context is being created with driver diagnostics and hint level is being set to debug variable - If application is already using driver diagnostics the hint level is overwritten Change-Id: I9912c0a7e8f23adb8372997144e5b75f9cc05b1d
This commit is contained in:
committed by
sys_ocldev
parent
e579578bc8
commit
bee295415f
@@ -107,7 +107,12 @@ class Context : public BaseObject<_cl_context> {
|
||||
char hint[DriverDiagnostics::maxHintStringSize];
|
||||
snprintf(hint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[performanceHint], std::forward<Args>(args)..., 0);
|
||||
if (driverDiagnostics->validFlags(flags)) {
|
||||
contextCallback(hint, &flags, sizeof(flags), userData);
|
||||
if (contextCallback) {
|
||||
contextCallback(hint, &flags, sizeof(flags), userData);
|
||||
}
|
||||
if (DebugManager.flags.PrintDriverDiagnostics.get() != -1) {
|
||||
printf("\n%s\n", hint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user