diff options
author | Samuel Pitoiset <[email protected]> | 2017-09-11 22:28:42 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-09-14 10:37:57 +0200 |
commit | 49c72d84c27b698bca73978869e15cad4414ab7e (patch) | |
tree | 7eb3c4eeca166be5b85eb07553187268e313efb5 /src/amd/vulkan/radv_device.c | |
parent | 302e34d24bdac1abf5b14aadf7a3857f033e01b2 (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 8de1bb3b0c1..c112453e395 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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, |