radv: dump application info in the GPU hang report
Like the name, version, as well as the engine and the API version. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7706>
This commit is contained in:
parent
8d7f78ccf8
commit
a61a398f7e
|
@ -528,6 +528,23 @@ radv_dump_enabled_options(struct radv_device *device, FILE *f)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
radv_dump_app_info(struct radv_device *device, FILE *f)
|
||||
{
|
||||
struct radv_instance *instance = device->instance;
|
||||
|
||||
fprintf(f, "Application name: %s\n", instance->applicationName);
|
||||
fprintf(f, "Application version: %d\n", instance->applicationVersion);
|
||||
fprintf(f, "Engine name: %s\n", instance->engineName);
|
||||
fprintf(f, "Engine version: %d\n", instance->engineVersion);
|
||||
fprintf(f, "API version: %d.%d.%d\n",
|
||||
VK_VERSION_MAJOR(instance->apiVersion),
|
||||
VK_VERSION_MINOR(instance->apiVersion),
|
||||
VK_VERSION_PATCH(instance->apiVersion));
|
||||
|
||||
radv_dump_enabled_options(device, f);
|
||||
}
|
||||
|
||||
static void
|
||||
radv_dump_device_name(struct radv_device *device, FILE *f)
|
||||
{
|
||||
|
@ -692,11 +709,11 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
|||
}
|
||||
}
|
||||
|
||||
/* Dump enabled debug/perftest options. */
|
||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "options.log");
|
||||
/* Dump app info. */
|
||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "app_info.log");
|
||||
f = fopen(dump_path, "w+");
|
||||
if (f) {
|
||||
radv_dump_enabled_options(device, f);
|
||||
radv_dump_app_info(device, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue