mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
nouveau/headers: Add a bool for whether or not to dump offsets
It's occasionally useful to shut them off. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29147>
This commit is contained in:
parent
99b0117243
commit
4842bbb200
1 changed files with 7 additions and 4 deletions
|
|
@ -67,6 +67,8 @@ vk_push_print(FILE *fp, const struct nv_push *push,
|
||||||
{
|
{
|
||||||
uint32_t *cur = push->start;
|
uint32_t *cur = push->start;
|
||||||
|
|
||||||
|
const bool print_offsets = true;
|
||||||
|
|
||||||
while (cur < push->end) {
|
while (cur < push->end) {
|
||||||
uint32_t hdr = *cur;
|
uint32_t hdr = *cur;
|
||||||
uint32_t type = hdr >> 29;
|
uint32_t type = hdr >> 29;
|
||||||
|
|
@ -79,12 +81,13 @@ vk_push_print(FILE *fp, const struct nv_push *push,
|
||||||
uint32_t value = 0;
|
uint32_t value = 0;
|
||||||
bool is_immd = false;
|
bool is_immd = false;
|
||||||
|
|
||||||
|
if (print_offsets)
|
||||||
|
fprintf(fp, "[0x%08" PRIxPTR "] ", cur - push->start);
|
||||||
|
|
||||||
if (is_tert && tert_op != 0) {
|
if (is_tert && tert_op != 0) {
|
||||||
fprintf(fp, "[0x%08" PRIxPTR "] HDR %x subch N/A",
|
fprintf(fp, "HDR %x subch N/A", hdr);
|
||||||
cur - push->start, hdr);
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(fp, "[0x%08" PRIxPTR "] HDR %x subch %i",
|
fprintf(fp, "HDR %x subch %i", hdr, subchan);
|
||||||
cur - push->start, hdr, subchan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur++;
|
cur++;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue