mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
pvr: Change how desc set debug output section dividers are printed.
Instead of hard coding in the exact string to print out for the divider, now we're printing the same char n times so we only need to specify the character and how many times to retreat it. Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
This commit is contained in:
parent
02626072e2
commit
260db8112a
1 changed files with 23 additions and 10 deletions
|
|
@ -684,10 +684,20 @@ static void
|
|||
pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
|
||||
const struct pvr_pipeline_layout *layout)
|
||||
{
|
||||
# define SEPARATOR_LENGTH 52
|
||||
# define LOGD_CHAR_NTIMES(c, times) \
|
||||
do { \
|
||||
char _c_buffer[times + 1]; \
|
||||
for (uint32_t i = 0; i < times; i++) \
|
||||
_c_buffer[i] = c; \
|
||||
_c_buffer[times] = '\0'; \
|
||||
mesa_logd("%s", _c_buffer); \
|
||||
} while (0)
|
||||
|
||||
mesa_logd("=== SET LAYOUT ===");
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
mesa_logd(" in registers:");
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
|
||||
for (uint32_t stage = 0;
|
||||
stage < ARRAY_SIZE(layout->register_layout_in_dwords_per_stage);
|
||||
|
|
@ -695,7 +705,7 @@ pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
|
|||
uint32_t dynamic_offset = 0;
|
||||
|
||||
mesa_logd("| %-48s |", stage_names[stage].primary_dynamic);
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
|
||||
if (layout->per_stage_reg_info[stage].primary_dynamic_size_in_dwords) {
|
||||
/* Print dynamic primaries. */
|
||||
|
|
@ -729,9 +739,9 @@ pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
|
|||
}
|
||||
}
|
||||
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
mesa_logd("| %-48s |", stage_names[stage].secondary_dynamic);
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
|
||||
if (layout->per_stage_reg_info[stage].secondary_dynamic_size_in_dwords) {
|
||||
/* Print dynamic secondaries. */
|
||||
|
|
@ -765,9 +775,9 @@ pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
|
|||
}
|
||||
}
|
||||
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
mesa_logd("| %-48s |", stage_names[stage].primary);
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
|
||||
/* Print primaries. */
|
||||
for (uint32_t set_num = 0; set_num < layout->set_count; set_num++) {
|
||||
|
|
@ -797,9 +807,9 @@ pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
|
|||
}
|
||||
}
|
||||
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
mesa_logd("| %-48s |", stage_names[stage].secondary);
|
||||
mesa_logd("----------------------------------------------------");
|
||||
LOGD_CHAR_NTIMES('-', SEPARATOR_LENGTH);
|
||||
|
||||
/* Print secondaries. */
|
||||
for (uint32_t set_num = 0; set_num < layout->set_count; set_num++) {
|
||||
|
|
@ -830,8 +840,11 @@ pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
|
|||
}
|
||||
}
|
||||
|
||||
mesa_logd("====================================================");
|
||||
LOGD_CHAR_NTIMES('=', SEPARATOR_LENGTH);
|
||||
}
|
||||
|
||||
# undef LOGD_CHAR_NTIMES
|
||||
# undef SEPARATOR_LENGTH
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue