diff options
author | Samuel Pitoiset <[email protected]> | 2017-09-07 11:05:29 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-09-14 10:37:57 +0200 |
commit | f0d09d90127ee1a2f9040fc75016c64b48354bdd (patch) | |
tree | 02f6ac4aaf4301034f6b4f037c2d0950db0da3f7 /src/amd/common/ac_debug.h | |
parent | 8181427b1465ed16b2dfe515d1c6e5554d598cbe (diff) |
radeonsi: move si_get_wave_info() to AMD common code
This will allow us to use it from radv.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common/ac_debug.h')
-rw-r--r-- | src/amd/common/ac_debug.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/amd/common/ac_debug.h b/src/amd/common/ac_debug.h index 35e950014b0..df207526531 100644 --- a/src/amd/common/ac_debug.h +++ b/src/amd/common/ac_debug.h @@ -36,6 +36,22 @@ #define AC_IS_TRACE_POINT(x) (((x) & 0xcafe0000) == 0xcafe0000) #define AC_GET_TRACE_POINT_ID(x) ((x) & 0xffff) +#define AC_MAX_WAVES_PER_CHIP (64 * 40) + +struct ac_wave_info { + unsigned se; /* shader engine */ + unsigned sh; /* shader array */ + unsigned cu; /* compute unit */ + unsigned simd; + unsigned wave; + uint32_t status; + uint64_t pc; /* program counter */ + uint32_t inst_dw0; + uint32_t inst_dw1; + uint64_t exec; + bool matched; /* whether the wave is used by a currently-bound shader */ +}; + typedef void *(*ac_debug_addr_callback)(void *data, uint64_t addr); void ac_dump_reg(FILE *file, enum chip_class chip_class, unsigned offset, @@ -50,4 +66,6 @@ void ac_parse_ib(FILE *f, uint32_t *ib, int num_dw, const int *trace_ids, bool ac_vm_fault_occured(enum chip_class chip_class, uint64_t *old_dmesg_timestamp, uint64_t *out_addr); +unsigned ac_get_wave_info(struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP]); + #endif |