mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
radv: fix dumping debug/perftest options when there are holes
Also fix the wrong assertion.
Fixes: 8c1e2ac03b ("radv: Refactor RADV_DEBUG=shaders to be a combination of other options.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32276>
This commit is contained in:
parent
e0f48568c7
commit
3f646d43dd
1 changed files with 12 additions and 4 deletions
|
|
@ -90,8 +90,12 @@ static const struct debug_control radv_debug_options[] = {{"nofastclears", RADV_
|
|||
const char *
|
||||
radv_get_debug_option_name(int id)
|
||||
{
|
||||
assert(id < ARRAY_SIZE(radv_debug_options) - 1);
|
||||
return radv_debug_options[id].string;
|
||||
assert(id < ARRAY_SIZE(radv_debug_options));
|
||||
for (uint32_t i = 0; i < ARRAY_SIZE(radv_debug_options); i++) {
|
||||
if (radv_debug_options[i].flag == (1ull << id))
|
||||
return radv_debug_options[i].string;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const struct debug_control radv_perftest_options[] = {{"localbos", RADV_PERFTEST_LOCAL_BOS},
|
||||
|
|
@ -124,8 +128,12 @@ static const struct debug_control radv_trap_excp_options[] = {
|
|||
const char *
|
||||
radv_get_perftest_option_name(int id)
|
||||
{
|
||||
assert(id < ARRAY_SIZE(radv_perftest_options) - 1);
|
||||
return radv_perftest_options[id].string;
|
||||
assert(id < ARRAY_SIZE(radv_perftest_options));
|
||||
for (uint32_t i = 0; i < ARRAY_SIZE(radv_perftest_options); i++) {
|
||||
if (radv_perftest_options[i].flag == (1ull << id))
|
||||
return radv_perftest_options[i].string;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const struct debug_control trace_options[] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue