mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
radv: dump the list of enabled options when a hang occured
Useful to know which debug/perftest options were enabled when a hang report is generated. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
302e34d24b
commit
49c72d84c2
3 changed files with 46 additions and 0 deletions
|
|
@ -581,6 +581,30 @@ radv_dump_dmesg(FILE *f)
|
|||
pclose(p);
|
||||
}
|
||||
|
||||
static void
|
||||
radv_dump_enabled_options(struct radv_device *device, FILE *f)
|
||||
{
|
||||
uint64_t mask;
|
||||
|
||||
fprintf(f, "Enabled debug options: ");
|
||||
|
||||
mask = device->debug_flags;
|
||||
while (mask) {
|
||||
int i = u_bit_scan64(&mask);
|
||||
fprintf(f, "%s, ", radv_get_debug_option_name(i));
|
||||
}
|
||||
fprintf(f, "\n");
|
||||
|
||||
fprintf(f, "Enabled perftest options: ");
|
||||
|
||||
mask = device->instance->perftest_flags;
|
||||
while (mask) {
|
||||
int i = u_bit_scan64(&mask);
|
||||
fprintf(f, "%s, ", radv_get_perftest_option_name(i));
|
||||
}
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
static bool
|
||||
radv_gpu_hang_occured(struct radv_queue *queue, enum ring_type ring)
|
||||
{
|
||||
|
|
@ -613,6 +637,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_winsys_cs *cs)
|
|||
graphics_pipeline = radv_get_saved_graphics_pipeline(device);
|
||||
compute_pipeline = radv_get_saved_compute_pipeline(device);
|
||||
|
||||
radv_dump_enabled_options(device, stderr);
|
||||
radv_dump_dmesg(stderr);
|
||||
|
||||
if (vm_fault_occurred) {
|
||||
|
|
|
|||
|
|
@ -417,12 +417,26 @@ static const struct debug_control radv_debug_options[] = {
|
|||
{NULL, 0}
|
||||
};
|
||||
|
||||
const char *
|
||||
radv_get_debug_option_name(int id)
|
||||
{
|
||||
assert(id < ARRAY_SIZE(radv_debug_options) - 1);
|
||||
return radv_debug_options[id].string;
|
||||
}
|
||||
|
||||
static const struct debug_control radv_perftest_options[] = {
|
||||
{"nobatchchain", RADV_PERFTEST_NO_BATCHCHAIN},
|
||||
{"sisched", RADV_PERFTEST_SISCHED},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
const char *
|
||||
radv_get_perftest_option_name(int id)
|
||||
{
|
||||
assert(id < ARRAY_SIZE(radv_debug_options) - 1);
|
||||
return radv_perftest_options[id].string;
|
||||
}
|
||||
|
||||
VkResult radv_CreateInstance(
|
||||
const VkInstanceCreateInfo* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
|
|
|
|||
|
|
@ -744,6 +744,13 @@ extern const struct radv_dynamic_state default_dynamic_state;
|
|||
void radv_dynamic_state_copy(struct radv_dynamic_state *dest,
|
||||
const struct radv_dynamic_state *src,
|
||||
uint32_t copy_mask);
|
||||
|
||||
const char *
|
||||
radv_get_debug_option_name(int id);
|
||||
|
||||
const char *
|
||||
radv_get_perftest_option_name(int id);
|
||||
|
||||
/**
|
||||
* Attachment state when recording a renderpass instance.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue