mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 01:50:12 +01:00
ac/parse_ib: Implement annotations
Annotates the IB dump with driver specified strings. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
This commit is contained in:
parent
0f436e0fe1
commit
bf15688fa1
2 changed files with 8 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ struct ac_ib_parser {
|
|||
enum amd_ip_type ip_type;
|
||||
ac_debug_addr_callback addr_callback;
|
||||
void *addr_callback_data;
|
||||
struct hash_table *annotations;
|
||||
|
||||
/* Internal */
|
||||
unsigned cur_dw;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "sid_tables.h"
|
||||
|
||||
#include "util/compiler.h"
|
||||
#include "util/hash_table.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/memstream.h"
|
||||
|
|
@ -695,6 +696,12 @@ static void parse_gfx_compute_ib(FILE *f, struct ac_ib_parser *ib)
|
|||
int current_trace_id = -1;
|
||||
|
||||
while (ib->cur_dw < ib->num_dw) {
|
||||
if (ib->annotations) {
|
||||
struct hash_entry *marker = _mesa_hash_table_search(ib->annotations, ib->ib + ib->cur_dw);
|
||||
if (marker)
|
||||
fprintf(f, "\n%s:", (char *)marker->data);
|
||||
}
|
||||
|
||||
uint32_t header = ac_ib_get(ib);
|
||||
unsigned type = PKT_TYPE_G(header);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue