radv: Add radv_trace_mode

...and add the RADV specific trace modes to the VK instance.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20573>
This commit is contained in:
Konstantin Seurer
2023-05-10 19:21:09 +02:00
committed by Marge Bot
parent 70489edce4
commit 15d6618a12
2 changed files with 16 additions and 0 deletions

View File

@@ -110,6 +110,12 @@ radv_get_perftest_option_name(int id)
return radv_perftest_options[id].string;
}
static const struct debug_control trace_options[] = {
{"rgp", RADV_TRACE_MODE_RGP},
{"rra", RADV_TRACE_MODE_RRA},
{NULL, 0},
};
// clang-format off
static const driOptionDescription radv_dri_options[] = {
DRI_CONF_SECTION_PERFORMANCE
@@ -266,6 +272,8 @@ radv_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationC
return vk_error(NULL, result);
}
vk_instance_add_driver_trace_modes(&instance->vk, trace_options);
instance->debug_flags = parse_debug_string(getenv("RADV_DEBUG"), radv_debug_options);
instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"), radv_perftest_options);