radv: print some information when RADV_TRACE_FILE is set

Just to be sure all options are enabled when trying to generate
a hang report.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset
2018-03-14 12:02:13 +01:00
parent 5be2757c35
commit 14c27c2511
3 changed files with 9 additions and 1 deletions

View File

@@ -593,7 +593,7 @@ radv_dump_dmesg(FILE *f)
pclose(p);
}
static void
void
radv_dump_enabled_options(struct radv_device *device, FILE *f)
{
uint64_t mask;

View File

@@ -61,4 +61,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_winsys_cs *cs);
void
radv_print_spirv(uint32_t *data, uint32_t size, FILE *fp);
void
radv_dump_enabled_options(struct radv_device *device, FILE *f);
#endif

View File

@@ -1322,10 +1322,15 @@ VkResult radv_CreateDevice(
device->physical_device->rad_info.max_se >= 2;
if (getenv("RADV_TRACE_FILE")) {
const char *filename = getenv("RADV_TRACE_FILE");
keep_shader_info = true;
if (!radv_init_trace(device))
goto fail;
fprintf(stderr, "Trace file will be dumped to %s\n", filename);
radv_dump_enabled_options(device, stderr);
}
device->keep_shader_info = keep_shader_info;